/* ==========================================================================
   翊豆工坊 — 拼豆图纸工具
   自设计 UI · 豆粒橙 #FF7A1A · 原生 CSS
   ========================================================================== */

:root {
    --orange: #ef887c;
    --orange-deep: #d96b68;
    --orange-soft: #fff1ef;
    --orange-line: #ffd4cf;
    --ink: #3b2b2f;
    --ink-2: #655157;
    --muted: #9b858a;
    --muted-2: #bca9ad;
    --cream: #fff8f5;
    --paper: #fffdfc;
    --line: #f3e2e1;
    --line-2: #fbf0ef;
    --green: #7eaa91;
    --green-soft: #eef8f1;
    --blue: #87a9c3;
    --blue-soft: #f0f6fa;
    --pink: #e49aaa;
    --pink-soft: #fdf0f4;
    --lavender: #c8b6e2;
    --lavender-soft: #f7f2fc;
    --yellow: #e8bb72;
    --danger: #c55a56;
    --danger-soft: #fdf0ef;
    --shadow-sm: 0 3px 12px rgba(133, 82, 82, .06);
    --shadow-md: 0 14px 38px rgba(133, 82, 82, .1);
    --radius: 16px;
    --radius-sm: 10px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--cream);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: .45;
    background-image: radial-gradient(rgba(164, 128, 99, .15) .7px, transparent .7px);
    background-size: 17px 17px;
    mask-image: linear-gradient(#000, transparent 72%);
    -webkit-mask-image: linear-gradient(#000, transparent 72%);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
::selection { background: #ffd7b8; color: var(--ink); }
[hidden] { display: none !important; }

.ico { width: 18px; height: 18px; flex: 0 0 auto; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.container { width: min(1220px, calc(100% - 48px)); margin: 0 auto; }

/* ---------- 品牌 ---------- */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    line-height: 1;
    user-select: none;
    flex: 0 0 auto;
}
.brand img { width: 31px; height: 31px; object-fit: contain; }
.brand-text { font-size: 20px; font-weight: 800; letter-spacing: -.6px; color: var(--ink); }
.brand-badge {
    background: var(--ink);
    color: #fff;
    border-radius: 4px;
    padding: 3px 5px;
    font-size: 9px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: .6px;
    transform: translateY(-1px);
}
.brand.small img { width: 24px; height: 24px; }
.brand.small .brand-text { font-size: 16px; }
.brand.small .brand-badge { font-size: 8px; padding: 2px 4px; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: #fff;
    border-radius: 10px;
    padding: 11px 19px;
    font-size: 13.5px;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease, opacity .16s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(43, 33, 27, .14); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn[disabled], .btn.is-disabled { opacity: .42; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn.primary:hover { background: var(--orange-deep); border-color: var(--orange-deep); }
.btn.soft { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn.soft:hover { border-color: var(--orange-line); background: #fffaf4; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: #f8efe6; box-shadow: none; }
.btn.danger { background: var(--danger-soft); border-color: #f3d3cc; color: var(--danger); }
.btn.pill { border-radius: 999px; }
.btn.lg { padding: 14px 24px; font-size: 15px; border-radius: 11px; }
.btn.sm { padding: 7px 12px; font-size: 12px; border-radius: 7px; }
.btn.block { width: 100%; }
.btn .ico { width: 17px; height: 17px; }
.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 8px;
    color: var(--muted);
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.icon-btn:hover { background: #f8efe6; color: var(--ink); }
.icon-btn .ico { width: 17px; height: 17px; }
.link { color: var(--orange-deep); }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 顶部导航 ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 250, 244, .86);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(240, 229, 217, .7);
}
.site-header-inner {
    height: 68px;
    display: flex;
    align-items: center;
    gap: 32px;
}
.site-nav { display: flex; align-items: center; gap: 3px; margin-left: 10px; }
.site-nav a {
    padding: 8px 13px;
    border-radius: 8px;
    color: #6f5f53;
    font-size: 13.5px;
    transition: color .15s ease, background .15s ease;
}
.site-nav a:hover, .site-nav a.active { color: var(--ink); background: #fff2e6; }
.site-nav a.active { font-weight: 650; }
.nav-spacer { flex: 1; }
.header-actions { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.header-login { padding: 7px 4px; font-size: 13px; color: #6f5f53; }
.header-login:hover { color: var(--ink); }
.user-menu-wrap { position: relative; }
.user-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px 5px 5px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.user-trigger:hover { border-color: var(--orange-line); box-shadow: var(--shadow-sm); }
.user-trigger .ico { width: 14px; height: 14px; color: var(--muted); }
.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f3ddc9;
    color: #8b5c33;
    display: inline-grid;
    place-items: center;
    overflow: hidden;
    font-size: 13px;
    font-weight: 750;
    flex: 0 0 auto;
    border: 1px solid rgba(255,255,255,.8);
    position: relative;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.avatar-fallback { position: relative; z-index: 0; }
.avatar.lg { width: 76px; height: 76px; font-size: 26px; }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.user-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 9px);
    width: 195px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 6px;
    display: none;
    z-index: 50;
}
.user-menu.open { display: block; animation: menu-in .14s ease; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.user-menu-head { padding: 8px 10px 9px; border-bottom: 1px solid var(--line-2); margin-bottom: 5px; }
.user-menu-head b { display: block; font-size: 12.5px; }
.user-menu-head span { color: var(--muted); font-size: 10.5px; }
.user-menu a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 7px;
    color: #5c4c41;
    font-size: 12.5px;
}
.user-menu a:hover { background: #fff4e9; color: var(--ink); }
.user-menu a .ico { width: 15px; height: 15px; color: var(--muted); }
.user-menu .sep { height: 1px; background: var(--line-2); margin: 5px 0; }
.mobile-nav-btn { display: none; }
.mobile-nav { display: none; }

/* ---------- Flash / 加载 ---------- */
.flash {
    position: fixed;
    right: 22px;
    top: 22px;
    z-index: 100;
    max-width: min(420px, calc(100vw - 34px));
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: var(--shadow-md);
    font-size: 12.5px;
    line-height: 1.6;
    animation: flash-in .2s ease;
}
.flash-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-top: 7px; flex: 0 0 auto; }
.flash.error .flash-dot { background: var(--danger); }
.flash-close { border: 0; background: none; color: var(--muted); margin-left: auto; padding: 0 2px; font-size: 16px; line-height: 1; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
#loading-bar {
    position: fixed;
    left: 0;
    top: 0;
    height: 3px;
    width: 0;
    z-index: 200;
    background: linear-gradient(90deg, var(--orange), #ffb36b);
    box-shadow: 0 0 8px rgba(255, 122, 26, .5);
    transition: width .2s ease, opacity .35s ease;
    opacity: 0;
    pointer-events: none;
}
#loading-bar.loading { width: 72%; opacity: 1; }
#loading-bar.done { width: 100%; opacity: 0; }
#app-main.pjax-loading { opacity: .42; transition: opacity .12s ease; }

/* ---------- 通用页面 ---------- */
.page-shell { padding: 40px 0 72px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--orange-deep);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin: 0 0 9px;
}
.page-title { font-size: 28px; line-height: 1.3; letter-spacing: -.045em; font-weight: 800; margin: 0 0 6px; }
.page-sub { color: var(--muted); font-size: 12.5px; margin: 0; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.card-pad { padding: 22px; }
.divider { height: 1px; background: var(--line-2); margin: 18px 0; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 999px;
    padding: 4px 9px;
    background: var(--orange-soft);
    color: var(--orange-deep);
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}
.chip.green { background: var(--green-soft); color: var(--green); }
.chip.blue { background: var(--blue-soft); color: #4b7f9c; }
.chip.gray { background: #f6f1eb; color: #8f8177; }
.chip.red { background: var(--danger-soft); color: var(--danger); }
.chip.pink { background: var(--pink-soft); color: #b45e75; }
.empty {
    padding: 54px 24px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed #e6d8ca;
    border-radius: var(--radius);
    background: #fffdfa;
}
.empty .ico { width: 34px; height: 34px; margin: 0 auto 12px; color: #c9a98e; }
.empty h3 { margin: 0 0 5px; font-size: 14px; color: var(--ink-2); }
.empty p { margin: 0 0 17px; font-size: 12px; }
.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-title h2 { font-size: 20px; letter-spacing: -.03em; margin: 0; }
.section-title p { color: var(--muted); font-size: 12px; margin: 4px 0 0; }
.section-title a { color: var(--muted); font-size: 12px; }
.section-title a:hover { color: var(--orange-deep); }

/* ---------- 首页 ---------- */
.hero { position: relative; padding: 64px 0 48px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(360px, .98fr); align-items: center; gap: 54px; }
.hero-copy { max-width: 580px; min-width: 0; }
.hero h1 {
    font-size: clamp(42px, 5vw, 68px);
    line-height: 1.12;
    letter-spacing: -.065em;
    font-weight: 850;
    margin: 8px 0 18px;
}
.hero h1 .accent { color: var(--orange); position: relative; display: inline-block; }
.hero h1 .accent::after {
    content: "";
    position: absolute;
    left: 2%;
    right: 2%;
    bottom: 2px;
    height: 8px;
    border-radius: 99px;
    background: #ffcfaa;
    z-index: -1;
    transform: rotate(-1deg);
}
.hero-sub { font-size: 16px; line-height: 1.85; color: #76665b; max-width: 470px; margin: 0 0 27px; }
.hero-actions { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.hero-note { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11.5px; margin-top: 16px; }
.hero-note .ico { width: 14px; height: 14px; color: var(--green); }
.hero-art { position: relative; min-height: 390px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hero-art::before {
    content: "";
    position: absolute;
    width: 84%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff6e9, #ffe3c8 58%, #ffd6b1);
    filter: blur(1px);
    opacity: .9;
}
.hero-art::after {
    content: "";
    position: absolute;
    width: 62%;
    height: 21%;
    bottom: 5%;
    border-radius: 50%;
    background: rgba(125, 83, 52, .13);
    filter: blur(18px);
}
.pixel-frame {
    position: relative;
    z-index: 1;
    width: min(370px, 92%);
    border-radius: 24px;
    background: rgba(255, 253, 249, .82);
    border: 1px solid rgba(255,255,255,.9);
    box-shadow: 0 22px 55px rgba(133, 82, 44, .16);
    padding: 15px;
    transform: rotate(-2.2deg);
    overflow: hidden;
}
.pixel-frame svg { width: 100%; height: auto; border-radius: 12px; display: block; }
.hero-sticker {
    position: absolute;
    z-index: 2;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    padding: 7px 12px;
    font-size: 11px;
    color: #78685c;
    display: flex;
    align-items: center;
    gap: 6px;
}
.hero-sticker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.hero-sticker.s1 { left: 5%; top: 11%; transform: rotate(-4deg); }
.hero-sticker.s2 { right: 0; bottom: 15%; transform: rotate(3deg); }
.hero-sticker.s3 { right: 9%; top: 3%; transform: rotate(5deg); }
.bead-art-grid { display: grid; grid-template-columns: repeat(18, minmax(0, 1fr)); grid-template-rows: repeat(18, minmax(0, 1fr)); gap: 3px; padding: 7px; background: #fffaf4; border-radius: 15px; border: 1px solid #f2e3d3; width: 312px; height: 312px; max-width: 100%; margin: 0 auto; overflow: hidden; }
.bead-art-grid span { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; border-radius: 50%; background: transparent; box-shadow: inset 0 -1px 1px rgba(0,0,0,.08); }
.bead-art-grid span.bead-empty { background: rgba(255,255,255,.35); box-shadow: none; }
.mini-bead-grid { display: grid; gap: 2.5px; width: 100%; }
.mini-bead-grid span { aspect-ratio: 1; border-radius: 50%; background: transparent; }
.mini-bead-grid span.bead-empty { background: transparent; }
.hero-stats { display: flex; gap: 34px; margin-top: 28px; flex-wrap: wrap; }
.hero-stat b { display: block; font-size: 19px; letter-spacing: -.02em; }
.hero-stat span { color: var(--muted); font-size: 10.5px; }

.landing-section { padding: 40px 0; }
.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.feature-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 23px 21px;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    position: relative;
    overflow: hidden;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #f2d6be; }
.feature-card::after {
    content: "";
    position: absolute;
    right: -25px;
    bottom: -32px;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: var(--orange-soft);
    opacity: .65;
}
.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--orange-soft);
    color: var(--orange-deep);
    display: grid;
    place-items: center;
    margin-bottom: 16px;
}
.feature-icon .ico { width: 20px; height: 20px; }
.feature-card:nth-child(2) .feature-icon { background: var(--green-soft); color: var(--green); }
.feature-card:nth-child(3) .feature-icon { background: var(--blue-soft); color: #4f83a3; }
.feature-card:nth-child(4) .feature-icon { background: var(--pink-soft); color: #bc6a6a; }
.feature-card h3 { margin: 0 0 7px; font-size: 14.5px; letter-spacing: -.02em; }
.feature-card p { color: var(--muted); font-size: 11.5px; line-height: 1.75; margin: 0; position: relative; z-index: 1; }

.sample-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.sample-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
}
.sample-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.sample-art { aspect-ratio: 1.55; background: #fbf3e9; display: grid; place-items: center; padding: 14px; }
.sample-art svg { width: 86%; height: 86%; object-fit: contain; }
.sample-meta { padding: 10px 13px; display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line-2); font-size: 10.5px; color: var(--muted); }
.sample-meta b { color: var(--ink-2); font-weight: 650; font-size: 11.5px; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; counter-reset: step; }
.step-card { position: relative; padding: 2px 0 0 53px; }
.step-card::before {
    counter-increment: step;
    content: "0" counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--orange-deep);
    font-size: 11px;
    font-weight: 800;
    box-shadow: var(--shadow-sm);
}
.step-card h3 { margin: 3px 0 6px; font-size: 14px; }
.step-card p { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.8; }
.privacy-strip {
    display: flex;
    align-items: center;
    gap: 15px;
    border-radius: 14px;
    background: #f1f8f2;
    border: 1px solid #deeee2;
    color: #527b61;
    padding: 15px 18px;
    font-size: 12px;
    line-height: 1.75;
    margin: 28px 0 0;
}
.privacy-strip .ico { width: 21px; height: 21px; color: var(--green); flex: 0 0 auto; }
.cta-band {
    margin-top: 44px;
    border-radius: 20px;
    background: linear-gradient(135deg, #2f2119, #4a3123);
    color: #fff;
    padding: 38px 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    overflow: hidden;
    position: relative;
}
.cta-band::after {
    content: "";
    position: absolute;
    right: 12%;
    top: -60px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 143, 66, .4), transparent 66%);
}
.cta-band h2 { margin: 0 0 7px; font-size: 23px; letter-spacing: -.03em; }
.cta-band p { margin: 0; color: rgba(255,255,255,.62); font-size: 12.5px; }
.cta-band .btn { position: relative; z-index: 1; background: var(--orange); border-color: var(--orange); flex: 0 0 auto; }

.site-footer { margin-top: 30px; border-top: 1px solid var(--line); padding: 28px 0 34px; }
.site-footer-inner { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.footer-brand p { color: var(--muted); font-size: 11px; margin: 8px 0 0; }
.footer-links { display: flex; gap: 20px; color: var(--muted); font-size: 11.5px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--orange-deep); }
.footer-note { color: #b5a79a; font-size: 10.5px; margin-top: 18px; width: 100%; }

/* ---------- 编辑器 ---------- */
.editor-page { padding: 22px 0 34px; }
.editor-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; flex-wrap: wrap; }
.editor-title { display: flex; align-items: center; gap: 11px; min-width: 0; }
.editor-title h1 { font-size: 21px; letter-spacing: -.035em; margin: 0; }
.editor-title .chip { flex: 0 0 auto; }
.editor-top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.quota-note { color: var(--muted); font-size: 10.5px; }
.editor-grid { display: grid; grid-template-columns: 272px minmax(0, 1fr) 286px; gap: 14px; align-items: start; }
.editor-grid > * { min-width: 0; }
.panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    min-width: 0;
}
.panel-head { padding: 15px 16px 12px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-head h2 { font-size: 12.5px; margin: 0; font-weight: 750; letter-spacing: .01em; }
.panel-head .ico { width: 16px; height: 16px; color: var(--muted); }
.panel-body { padding: 15px 16px 17px; }
.panel-section + .panel-section { border-top: 1px solid var(--line-2); margin-top: 15px; padding-top: 15px; }
.control-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; font-weight: 650; color: #5c4d42; margin-bottom: 8px; }
.control-label span { font-weight: 400; color: var(--muted); font-size: 10.5px; }
.control-help { color: #a7978a; font-size: 10px; line-height: 1.6; margin-top: 6px; }
.upload-zone {
    border: 1.5px dashed #eccdaf;
    background: #fffaf3;
    border-radius: 11px;
    padding: 23px 14px;
    text-align: center;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease;
}
.upload-zone:hover, .upload-zone.dragover { background: #fff4e7; border-color: var(--orange); }
.upload-zone .upload-icon { width: 37px; height: 37px; border-radius: 11px; background: #ffead5; color: var(--orange-deep); margin: 0 auto 9px; display: grid; place-items: center; }
.upload-zone .upload-icon .ico { width: 18px; height: 18px; }
.upload-zone b { display: block; font-size: 12px; margin-bottom: 3px; }
.upload-zone span { font-size: 10px; color: var(--muted); }
.file-input { display: none; }
.upload-mini { display: flex; gap: 8px; margin-top: 9px; }
.upload-mini .btn { flex: 1; }
.input-line { display: flex; align-items: center; gap: 8px; }
.range { width: 100%; accent-color: var(--orange); height: 4px; }
.number-input, .text-input, .select-input, .textarea-input {
    width: 100%;
    border: 1px solid #e9dbcd;
    background: #fffdfa;
    border-radius: 8px;
    padding: 9px 10px;
    font-size: 12px;
    outline: 0;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.number-input { width: 66px; text-align: center; padding: 8px 4px; }
.text-input:focus, .select-input:focus, .textarea-input:focus, .number-input:focus { border-color: #ffb57b; box-shadow: 0 0 0 3px rgba(255, 122, 26, .09); background: #fff; }
.textarea-input { min-height: 74px; resize: vertical; line-height: 1.6; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 11.5px; color: #5c4d42; }
.switch { position: relative; width: 34px; height: 20px; flex: 0 0 auto; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; z-index: 2; cursor: pointer; }
.switch span { position: absolute; inset: 0; background: #e9ddd2; border-radius: 99px; transition: .16s ease; cursor: pointer; }
.switch span::after { content: ""; position: absolute; width: 14px; height: 14px; left: 3px; top: 3px; background: #fff; border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.12); transition: .16s ease; }
.switch input:checked + span { background: var(--orange); }
.switch input:checked + span::after { transform: translateX(14px); }
.segment { display: flex; background: #f8f1e9; border-radius: 8px; padding: 3px; gap: 2px; }
.segment button { flex: 1; border: 0; background: transparent; border-radius: 6px; padding: 6px 4px; font-size: 10.5px; color: #8d7c6e; }
.segment button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(100, 68, 44, .1); font-weight: 650; }
.canvas-panel { min-width: 0; }
.canvas-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line-2);
    flex-wrap: wrap;
}
.tool-btn {
    width: 32px;
    height: 32px;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 7px;
    display: grid;
    place-items: center;
    color: #79695c;
}
.tool-btn:hover { background: #f9f0e6; color: var(--ink); }
.tool-btn.active { background: var(--orange-soft); border-color: #ffd7b4; color: var(--orange-deep); }
.tool-btn .ico { width: 16px; height: 16px; }
.tool-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.toolbar-spacer { flex: 1; }
.zoom-label { color: var(--muted); font-size: 10px; min-width: 40px; text-align: center; }
.canvas-stage {
    min-height: 530px;
    max-height: calc(100vh - 245px);
    background: #fbf5ed;
    background-image: radial-gradient(rgba(180, 148, 118, .2) 1px, transparent 1px);
    background-size: 15px 15px;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
}
.dropzone {
    text-align: center;
    max-width: 360px;
    padding: 40px 26px;
    border: 1.5px dashed #e4c7ab;
    border-radius: 17px;
    background: rgba(255, 253, 249, .8);
    cursor: pointer;
    transition: .16s ease;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--orange); background: #fff8ef; }
.dropzone .drop-art { width: 66px; height: 66px; margin: 0 auto 15px; border-radius: 19px; background: linear-gradient(145deg, #ffe5cc, #ffd0a5); display: grid; place-items: center; color: #b2672a; transform: rotate(-4deg); }
.dropzone .drop-art .ico { width: 30px; height: 30px; }
.dropzone h2 { font-size: 17px; letter-spacing: -.02em; margin: 0 0 6px; }
.dropzone p { color: var(--muted); font-size: 11.5px; line-height: 1.75; margin: 0 0 15px; }
.dropzone .hint { font-size: 10px; color: #ad9d8f; margin-top: 10px; }
.canvas-viewport { width: 100%; height: 100%; overflow: auto; display: none; align-items: flex-start; justify-content: center; }
.canvas-viewport.active { display: flex; }
#bead-canvas { background: #fff; border-radius: 8px; box-shadow: 0 9px 30px rgba(100, 64, 35, .12); image-rendering: auto; touch-action: none; cursor: crosshair; }
.canvas-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--line-2); color: var(--muted); font-size: 10px; flex-wrap: wrap; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #b8a99c; display: inline-block; margin-right: 5px; }
.status-dot.ready { background: var(--green); }
.canvas-empty-note { font-size: 10px; color: var(--muted); }

.stats-total { display: flex; align-items: flex-end; gap: 9px; padding: 3px 0 10px; }
.stats-total b { font-size: 30px; letter-spacing: -.05em; line-height: 1; }
.stats-total span { color: var(--muted); font-size: 10.5px; padding-bottom: 3px; }
.stat-mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.stat-mini { background: #fbf6f0; border-radius: 8px; padding: 8px 10px; }
.stat-mini span { display: block; color: var(--muted); font-size: 9.5px; }
.stat-mini b { display: block; font-size: 13px; margin-top: 2px; }
.color-list { max-height: 300px; overflow: auto; margin: 0 -4px; padding: 0 4px; }
.color-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #f8f1e9; font-size: 10.5px; }
.color-row:last-child { border-bottom: 0; }
.color-swatch { width: 19px; height: 19px; border-radius: 6px; border: 1px solid rgba(0,0,0,.08); flex: 0 0 auto; }
.color-name { min-width: 0; flex: 1; }
.color-name b { display: block; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.color-name span { color: var(--muted); font-size: 9px; }
.color-count { font-family: var(--mono); color: var(--ink-2); font-size: 10px; }
.color-row .remove-color { border: 0; background: transparent; color: #c2afa0; padding: 2px; }
.color-row .remove-color:hover { color: var(--danger); }
.color-row .remove-color .ico { width: 12px; height: 12px; }
.stats-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 13px; }
.quota-pill { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #f8f2ea; border-radius: 8px; padding: 8px 10px; color: var(--muted); font-size: 10px; margin-top: 12px; }
.quota-pill b { color: var(--ink-2); font-size: 11px; }
.palette-picker { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; max-height: 128px; overflow: auto; padding: 3px; border: 1px solid var(--line-2); border-radius: 8px; background: #fffdfa; }
.palette-dot { width: 100%; aspect-ratio: 1; border-radius: 4px; border: 1px solid rgba(43,33,27,.12); padding: 0; min-width: 0; }
.palette-dot:hover { transform: scale(1.12); }
.palette-dot.active { outline: 2px solid var(--orange); outline-offset: 1px; }
.save-progress { color: var(--muted); font-size: 10px; margin-top: 7px; min-height: 14px; }
.color-row .remove-color { font-size: 13px; line-height: 1; }

/* ---------- 大厅 ---------- */
.hall-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.sort-tabs { display: inline-flex; padding: 3px; background: #fff; border: 1px solid var(--line); border-radius: 9px; gap: 2px; }
.sort-tabs a { padding: 6px 13px; border-radius: 7px; color: var(--muted); font-size: 11.5px; }
.sort-tabs a.active { background: var(--orange-soft); color: var(--orange-deep); font-weight: 650; }
.hall-count { color: var(--muted); font-size: 11px; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.project-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #ecd2ba; }
.project-thumb { position: relative; aspect-ratio: 1.22; background: #fbf3e8; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.project-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 13px; transition: transform .25s ease; }
.project-card:hover .project-thumb img { transform: scale(1.025); }
.project-thumb .badge-float { position: absolute; left: 10px; top: 10px; background: rgba(255,255,255,.88); backdrop-filter: blur(6px); border-radius: 999px; padding: 4px 8px; font-size: 9.5px; color: #7b6a5d; }
.project-body { padding: 12px 14px 11px; }
.project-name { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 6px; }
.project-by { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.project-by .avatar { width: 21px; height: 21px; font-size: 9px; }
.project-stats { display: flex; align-items: center; gap: 12px; color: #a29487; font-size: 10px; margin-left: auto; }
.project-stats span { display: inline-flex; align-items: center; gap: 3px; }
.project-stats .ico { width: 12px; height: 12px; }
.project-foot { display: flex; align-items: center; border-top: 1px solid var(--line-2); padding: 7px 14px; color: #a29487; font-size: 9.5px; gap: 10px; }
.project-foot span { display: inline-flex; align-items: center; gap: 4px; }
.project-foot .ico { width: 12px; height: 12px; }

/* ---------- 作品详情 ---------- */
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(310px, .7fr); gap: 22px; align-items: start; }
.detail-art { background: #fbf3e8; border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: grid; place-items: center; min-height: 460px; }
.detail-art img { max-width: 100%; max-height: 72vh; object-fit: contain; border-radius: 8px; box-shadow: 0 10px 30px rgba(106, 71, 43, .09); }
.detail-side { display: flex; flex-direction: column; gap: 13px; }
.detail-title h1 { font-size: 24px; letter-spacing: -.04em; margin: 0 0 7px; line-height: 1.35; }
.detail-author { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.detail-desc { color: #76675b; font-size: 12px; line-height: 1.8; margin: 12px 0 0; white-space: pre-line; }
.detail-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 15px; }
.detail-stat { background: #fbf6ef; border-radius: 9px; padding: 9px 10px; }
.detail-stat span { color: var(--muted); font-size: 9.5px; display: block; }
.detail-stat b { display: block; font-size: 14px; margin-top: 2px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 3px; }
.detail-actions .btn { flex: 1; min-width: 112px; }
.action-btn.active { background: var(--orange-soft); border-color: var(--orange-line); color: var(--orange-deep); }
.action-btn.active .ico { fill: currentColor; }
.owner-bar { border-top: 1px solid var(--line-2); padding-top: 12px; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 7px; }
.comments-card { margin-top: 22px; }
.comment-form textarea { width: 100%; min-height: 82px; border: 1px solid var(--line); background: #fffdfa; border-radius: 9px; padding: 10px 12px; font-size: 12px; outline: 0; resize: vertical; }
.comment-form textarea:focus { border-color: #ffb67c; box-shadow: 0 0 0 3px rgba(255,122,26,.08); }
.comment-form-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: 10px; }
.comment-list { margin-top: 18px; }
.comment { display: flex; gap: 10px; padding: 13px 0; border-top: 1px solid var(--line-2); }
.comment-main { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.comment-head b { color: var(--ink-2); font-size: 11px; }
.comment-text { font-size: 12px; line-height: 1.8; color: #5e5046; margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-del { border: 0; background: none; color: #bcae9f; font-size: 10px; padding: 2px 0; }
.comment-del:hover { color: var(--danger); }

/* ---------- 个人中心 ---------- */
.user-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: start; }
.user-side { position: sticky; top: 88px; }
.user-profile-mini { text-align: center; padding: 20px 14px 16px; border-bottom: 1px solid var(--line-2); }
.user-profile-mini .avatar { margin: 0 auto 9px; }
.user-profile-mini b { display: block; font-size: 13px; }
.user-profile-mini span { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; }
.user-nav { padding: 7px; display: flex; flex-direction: column; gap: 2px; }
.user-nav a { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 8px; color: #6f6054; font-size: 12px; }
.user-nav a .ico { width: 15px; height: 15px; color: #a99a8d; }
.user-nav a:hover { background: #faf2e9; }
.user-nav a.active { background: var(--orange-soft); color: var(--orange-deep); font-weight: 650; }
.user-nav a.active .ico { color: var(--orange-deep); }
.user-nav .count { margin-left: auto; color: #b3a396; font-size: 10px; }
.user-content .project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tab-counts { display: flex; gap: 18px; margin-bottom: 18px; flex-wrap: wrap; }
.tab-count { color: var(--muted); font-size: 11px; }
.tab-count b { color: var(--ink); font-size: 16px; margin-left: 4px; }
.profile-card { max-width: 660px; }
.profile-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--line-2); font-size: 12px; }
.profile-row:last-child { border: 0; }
.profile-row .label { color: var(--muted); }
.profile-row .value { color: var(--ink-2); text-align: right; }
.danger-zone { border-color: #f3d8d2; background: #fffaf9; }
.danger-zone h3 { color: var(--danger); font-size: 13px; margin: 0 0 5px; }
.danger-zone p { color: #9e7f78; font-size: 11px; line-height: 1.7; margin: 0 0 13px; }

/* ---------- 分页 ---------- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 28px; flex-wrap: wrap; }
.pagination a, .pagination span {
    min-width: 31px;
    height: 31px;
    padding: 0 9px;
    border-radius: 7px;
    border: 1px solid var(--line);
    background: #fff;
    color: #8b7b6e;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.pagination a:hover { border-color: var(--orange-line); color: var(--orange-deep); }
.pagination .active span, .pagination span.current { background: var(--ink); border-color: var(--ink); color: #fff; }
.pagination .disabled span { opacity: .42; }
.pagination ul { display: flex; align-items: center; gap: 5px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.pagination li { display: inline-flex; }
.pagination li a, .pagination li span { min-width: 31px; height: 31px; padding: 0 9px; border-radius: 7px; border: 1px solid var(--line); background: #fff; color: #8b7b6e; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.pagination li.active span { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- 表单 / 弹窗 ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 11px; font-weight: 650; color: #625247; }
.field label span { font-weight: 400; color: var(--muted); margin-left: 4px; }
.field .text-input, .field .select-input, .field .textarea-input { width: 100%; }
.form-actions { display: flex; align-items: center; gap: 9px; margin-top: 18px; flex-wrap: wrap; }
.modal { position: fixed; inset: 0; z-index: 120; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(43, 33, 27, .34); backdrop-filter: blur(3px); }
.modal.open { display: flex; }
.modal-card { width: min(460px, 100%); background: #fffdfa; border-radius: 16px; border: 1px solid #f1e3d5; box-shadow: 0 24px 80px rgba(59, 38, 22, .22); padding: 22px; animation: modal-in .18s ease; }
@keyframes modal-in { from { opacity: 0; transform: translateY(7px) scale(.99); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.modal-head h2 { font-size: 17px; letter-spacing: -.025em; margin: 0; }
.modal-head p { color: var(--muted); font-size: 10.5px; margin: 4px 0 0; line-height: 1.6; }
.modal-close { border: 0; background: #f7efe7; width: 28px; height: 28px; border-radius: 8px; color: var(--muted); display: grid; place-items: center; flex: 0 0 auto; }
.modal-close .ico { width: 14px; height: 14px; }
.modal .form-actions { justify-content: flex-end; }
.visibility-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 12px; }
.visibility-option input { position: absolute; opacity: 0; }
.visibility-option label { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; cursor: pointer; font-size: 11.5px; color: var(--ink-2); }
.visibility-option label small { color: var(--muted); font-size: 9.5px; }
.visibility-option input:checked + label { border-color: var(--orange); background: #fff8f0; box-shadow: inset 0 0 0 1px var(--orange); }

/* ---------- 管理后台 ---------- */
.admin-body { background: #f7f2eb; }
.admin-shell { min-height: 100vh; display: flex; }
.admin-sidebar {
    width: 224px;
    flex: 0 0 224px;
    background: #2c211b;
    color: #fff;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px 13px 14px;
}
.admin-sidebar .brand-text { color: #fff; font-size: 18px; }
.admin-sidebar .brand img { filter: brightness(0) invert(1); opacity: .9; }
.admin-sidebar .brand-badge { background: var(--orange); }
.admin-label { color: #9b8879; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; margin: 25px 10px 9px; }
.admin-nav { display: flex; flex-direction: column; gap: 3px; }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: #cbb9aa; font-size: 12px; }
.admin-nav a .ico { width: 15px; height: 15px; color: #8d7969; }
.admin-nav a:hover { background: #3a2c24; color: #fff; }
.admin-nav a.active { background: var(--orange); color: #fff; font-weight: 650; }
.admin-nav a.active .ico { color: #fff; }
.admin-side-bottom { margin-top: auto; border-top: 1px solid #45352b; padding-top: 12px; }
.admin-user { color: #b9a697; font-size: 10.5px; padding: 0 10px 10px; }
.admin-user b { display: block; color: #fff; font-size: 12px; }
.admin-main { flex: 1; min-width: 0; }
.admin-topbar { height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 28px; border-bottom: 1px solid #eadfd3; background: rgba(255,253,249,.85); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 20; }
.admin-topbar .crumb { color: var(--muted); font-size: 11px; }
.admin-topbar .crumb b { color: var(--ink); }
.admin-content { padding: 25px 28px 50px; max-width: 1400px; }
.admin-page-title { font-size: 22px; letter-spacing: -.035em; margin: 0 0 5px; }
.admin-page-sub { color: var(--muted); font-size: 11.5px; margin: 0 0 22px; }
.admin-stat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
.admin-stat { background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 13px 14px; }
.admin-stat span { color: var(--muted); font-size: 9.5px; }
.admin-stat b { display: block; font-size: 21px; margin-top: 4px; letter-spacing: -.03em; }
.admin-grid-2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 16px; align-items: start; }
.admin-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.admin-card-head { padding: 14px 16px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.admin-card-head h2 { margin: 0; font-size: 12.5px; }
.admin-card-body { padding: 16px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.data-table th { background: #fcf8f3; color: #9b8c7e; font-size: 9.5px; font-weight: 500; text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid #f8f1e9; font-size: 11px; color: #5c4e43; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table td b { color: var(--ink); font-weight: 650; }
.data-table .tiny { color: var(--muted); font-size: 9.5px; }
.data-table .actions { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.data-table .empty-cell { text-align: center; color: var(--muted); padding: 32px; font-size: 11px; }
.trend-chart { display: flex; align-items: flex-end; gap: 5px; height: 150px; padding: 12px 0 0; }
.trend-bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.trend-bar i { display: block; width: 100%; max-width: 14px; background: linear-gradient(180deg, #ffad6b, var(--orange)); border-radius: 3px 3px 0 0; min-height: 2px; }
.trend-bar span { font-size: 7px; color: #b4a598; white-space: nowrap; transform: rotate(-55deg); transform-origin: center; }
.trend-axis { color: var(--muted); font-size: 9px; display: flex; justify-content: space-between; margin-top: 8px; }
.filter-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-bar .text-input { width: 220px; }
.admin-form-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.admin-form-card h2 { font-size: 13px; margin: 0 0 13px; }
.settings-note { background: #faf5ef; border-radius: 9px; padding: 11px 13px; color: #8d7d6f; font-size: 10.5px; line-height: 1.7; }
.env-status { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.env-pill { border-radius: 999px; padding: 4px 9px; background: var(--green-soft); color: var(--green); font-size: 9.5px; }
.env-pill.bad { background: var(--danger-soft); color: var(--danger); }
.palette-swatches { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.palette-swatches span { width: 16px; height: 16px; border-radius: 5px; border: 1px solid rgba(0,0,0,.06); }
.palette-form { background: #fcf8f3; border: 1px solid var(--line-2); border-radius: 10px; padding: 14px; margin-bottom: 16px; }
.palette-form h3 { font-size: 12px; margin: 0 0 12px; }

/* ---------- 管理员登录 ---------- */
.admin-login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, .92fr) minmax(420px, 1.08fr); }
.admin-login-visual { background: #2c211b; color: #fff; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 52px; }
.admin-login-visual::before { content: ""; position: absolute; inset: -15%; background: radial-gradient(circle at 30% 25%, rgba(255,153,86,.62), transparent 34%), radial-gradient(circle at 72% 58%, rgba(105,65,41,.7), transparent 46%), linear-gradient(150deg, #f3c394, #b87544 34%, #4b2f20 68%, #1f1712); }
.admin-login-visual::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1px); background-size: 22px 22px; opacity: .4; }
.admin-login-quote, .admin-login-sub { position: relative; z-index: 1; }
.admin-login-quote { font-size: clamp(25px, 2.4vw, 36px); line-height: 1.7; font-weight: 300; letter-spacing: -.02em; }
.admin-login-sub { margin-top: 14px; font-size: 10px; letter-spacing: .2em; color: rgba(255,255,255,.52); text-transform: uppercase; }
.admin-login-panel { display: flex; align-items: center; justify-content: center; padding: 38px 26px; background: #fffaf4; }
.admin-login-box { width: min(390px, 100%); }
.admin-login-box h1 { font-size: 31px; letter-spacing: -.05em; margin: 0 0 6px; }
.admin-login-foot { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 10.5px; margin-top: 21px; }
.admin-login-foot code { background: #f4ece2; padding: 2px 5px; border-radius: 4px; font-family: var(--mono); }
.admin-login-foot a:hover { color: var(--orange-deep); }

/* ---------- 错误页 ---------- */.error-page { min-height: 100vh; display: grid; place-items: center; padding: 30px; text-align: center; background: radial-gradient(ellipse at 50% 35%, #fff7ec, #fffdfa 63%); }
.error-code { font-size: 86px; line-height: 1; letter-spacing: -.08em; font-weight: 850; color: var(--ink); }
.error-page h1 { font-size: 21px; margin: 13px 0 7px; }
.error-page p { color: var(--muted); font-size: 12.5px; margin: 0 0 22px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
    .editor-grid { grid-template-columns: 250px minmax(0, 1fr); }
    .editor-grid .stats-panel { grid-column: 1 / -1; }
    .stats-panel .panel-body { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
    .stats-panel .stats-actions { flex-direction: row; flex-wrap: wrap; }
    .admin-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
    .container { width: min(100% - 36px, 1220px); }
    .hero-inner { gap: 30px; }
    .hero-art { min-height: 320px; }
    .feature-grid { grid-template-columns: 1fr 1fr; }
    .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-layout { grid-template-columns: 1fr; }
    .detail-art { min-height: 340px; }
    .user-layout { grid-template-columns: 190px minmax(0, 1fr); }
    .admin-sidebar { width: 200px; flex-basis: 200px; }
    .admin-content { padding: 22px 20px 44px; }
    .admin-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
    .admin-login-page { grid-template-columns: 1fr; }
    .admin-login-visual { display: none; }
    .site-header-inner { height: 60px; gap: 12px; }
    .site-nav { display: none; }
    .mobile-nav-btn { display: inline-grid; margin-left: 0; order: 2; flex: 0 0 auto; }
    .header-actions { margin-left: auto; order: 1; flex: 0 0 auto; }
    .header-actions .header-login { display: none; }
    .mobile-nav {
        display: none;
        border-top: 1px solid var(--line);
        background: #fffaf4;
        padding: 9px 18px 12px;
    }
    .mobile-nav.open { display: block; }
    .mobile-nav a { display: block; padding: 10px 6px; border-bottom: 1px solid var(--line-2); font-size: 13px; }
    .mobile-nav a:last-child { border-bottom: 0; }
    .hero { padding: 38px 0 30px; }
    .hero-inner { grid-template-columns: 1fr; gap: 25px; }
    .hero-copy { max-width: 620px; }
    .hero-art { min-height: 280px; order: 2; }
    .pixel-frame { width: min(315px, 88%); }
    .hero h1 { font-size: clamp(38px, 9vw, 54px); }
    .hero-sub { font-size: 14px; }
    .sample-grid { grid-template-columns: 1fr 1fr; }
    .steps { grid-template-columns: 1fr; gap: 18px; }
    .cta-band { padding: 26px 24px; flex-direction: column; align-items: flex-start; }
    .page-shell { padding: 27px 0 50px; }
    .page-head { flex-direction: column; align-items: flex-start; gap: 10px; }
    .page-title { font-size: 23px; }
    .editor-page { padding-top: 14px; }
    .editor-top { flex-direction: column; align-items: flex-start; }
    .editor-grid { grid-template-columns: 1fr; }
    .editor-grid .params-panel { order: 2; }
    .editor-grid .canvas-panel { order: 1; }
    .editor-grid .stats-panel { order: 3; }
    .canvas-stage { min-height: 380px; max-height: 60vh; padding: 12px; }
    .stats-panel .panel-body { display: block; }
    .stats-panel .stats-actions { flex-direction: column; }
    .user-layout { grid-template-columns: 1fr; }
    .user-side { position: static; }
    .user-nav { flex-direction: row; overflow-x: auto; }
    .user-nav a { white-space: nowrap; }
    .user-content .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-shell { display: block; }
    .admin-sidebar { position: static; width: auto; height: auto; flex-direction: row; align-items: center; padding: 12px 14px; overflow-x: auto; }
    .admin-sidebar .brand { margin-right: 14px; }
    .admin-label, .admin-user, .admin-side-bottom { display: none; }
    .admin-nav { flex-direction: row; gap: 4px; }
    .admin-nav a { white-space: nowrap; padding: 7px 10px; }
    .admin-topbar { top: 0; padding: 0 16px; height: 51px; }
    .admin-stat-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .container { width: calc(100% - 28px); }
    .brand-text { font-size: 18px; }
    .brand img { width: 27px; height: 27px; }
    .brand-badge { display: none; }
    .header-actions .btn.primary.sm { display: none; }
    .site-header-inner { gap: 8px; }
    .hero-art { min-height: 275px; }
    .bead-art-grid { width: 272px; height: 272px; }
    .hero h1 { letter-spacing: -.055em; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn { flex: none; width: 100%; }
    .hero-note { align-items: flex-start; }
    .hero-stats { gap: 20px; }
    .feature-grid { grid-template-columns: 1fr; }
    .sample-grid { grid-template-columns: 1fr; }
    .project-grid, .user-content .project-grid { grid-template-columns: 1fr; }
    .detail-art { padding: 12px; min-height: 250px; }
    .detail-actions .btn { min-width: 100%; }
    .form-grid { grid-template-columns: 1fr; }
    .field.full { grid-column: auto; }
    .modal-card { padding: 18px; }
    .admin-sidebar { align-items: flex-start; flex-direction: column; }
    .admin-nav { flex-wrap: wrap; }
    .admin-stat-grid { grid-template-columns: 1fr 1fr; }
    .admin-content { padding: 18px 13px 40px; }
    .admin-page-title { font-size: 19px; }
    .filter-bar .text-input { width: 100%; }
    .comments-card .card-pad { padding: 16px; }
    .cta-band h2 { font-size: 19px; }
    .editor-top-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .editor-top-actions .btn { width: 100%; min-width: 0; }
    .canvas-toolbar { overflow-x: auto; flex-wrap: nowrap; }
    .canvas-toolbar .toolbar-spacer { flex: 1 0 10px; }
    .canvas-stage { min-height: 330px; max-height: 62vh; padding: 9px; }
    .canvas-toolbar { gap: 2px; padding: 7px; }
    .tool-btn { width: 30px; height: 30px; }
    .zoom-label { min-width: 34px; font-size: 9px; }
    .detail-stat { padding: 8px; }
    .user-profile-mini { padding-top: 14px; }
    .admin-login-box h1 { font-size: 26px; }
    .admin-login-panel { padding: 28px 18px; }
    .admin-topbar .chip { display: none; }
}
@media (max-width: 400px) {
    .site-nav { display: none; }
    .header-actions { gap: 4px; }
    .hero h1 { font-size: 34px; }
    .bead-art-grid { width: 246px; height: 246px; }
    .hero-art { min-height: 250px; }
    .btn.lg { padding: 12px 16px; font-size: 13px; }
    .stats-total b { font-size: 25px; }
    .detail-stats { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   社区功能：公告 / 站内信 / 个人主页 / 榜单 / 私信
   ========================================================================== */
.header-alert {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: var(--muted);
    transition: background .15s ease, color .15s ease;
}
.header-alert:hover { background: var(--pink-soft); color: var(--orange-deep); }
.header-alert .ico { width: 18px; height: 18px; }
.nav-badge {
    position: absolute;
    top: -2px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 99px;
    background: #e96f86;
    color: #fff;
    font-size: 9px;
    font-style: normal;
    line-height: 16px;
    text-align: center;
    border: 2px solid var(--cream);
    box-sizing: content-box;
}
.menu-badge {
    margin-left: auto;
    min-width: 16px;
    padding: 0 5px;
    height: 16px;
    line-height: 16px;
    border-radius: 99px;
    background: #e96f86;
    color: #fff;
    font-size: 9px;
    text-align: center;
}
.site-header { background: rgba(255, 249, 246, .9); }
.site-header-inner { height: 66px; }
.site-nav a { font-size: 13px; }
.eyebrow { color: var(--orange-deep); }

/* 公告 */
.notice-list { display: flex; flex-direction: column; gap: 10px; }
.notice-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.notice-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--orange-line); }
.notice-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--pink-soft);
    color: var(--orange-deep);
}
.notice-icon .ico { width: 18px; height: 18px; }
.notice-main { flex: 1; min-width: 0; }
.notice-title { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 700; color: var(--ink); flex-wrap: wrap; }
.notice-title:hover { color: var(--orange-deep); }
.notice-summary { color: var(--muted); font-size: 11.5px; line-height: 1.75; margin-top: 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notice-meta { display: flex; gap: 12px; color: var(--muted-2); font-size: 10px; margin-top: 8px; flex-wrap: wrap; }
.unread-dot { width: 7px; height: 7px; border-radius: 50%; background: #e96f86; flex: 0 0 auto; }
.pin-tag { background: #fff3e8; color: #c27b45; font-size: 9px; padding: 2px 6px; border-radius: 5px; font-weight: 600; }
.notice-cat { background: var(--lavender-soft); color: #896fa8; font-size: 9px; padding: 2px 7px; border-radius: 5px; }
.notice-content { font-size: 13px; line-height: 2; color: #66535a; white-space: pre-line; }
.notice-detail-head { padding: 24px; border-bottom: 1px solid var(--line-2); }
.notice-detail-head h1 { font-size: 25px; letter-spacing: -.035em; margin: 10px 0 8px; }
.notice-detail-body { padding: 24px; }

/* 站内信 */
.inbox-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; flex-wrap: wrap; }
.inbox-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 17px;
    border-bottom: 1px solid var(--line-2);
    background: #fff;
}
.inbox-item:last-child { border-bottom: 0; }
.inbox-item.unread { background: #fffaf9; }
.inbox-item .inbox-dot { width: 8px; height: 8px; border-radius: 50%; background: #e96f86; margin-top: 7px; flex: 0 0 auto; }
.inbox-item.read .inbox-dot { background: #e6d8d8; }
.inbox-main { flex: 1; min-width: 0; }
.inbox-title { font-size: 13px; font-weight: 650; color: var(--ink); }
.inbox-title:hover { color: var(--orange-deep); }
.inbox-summary { color: var(--muted); font-size: 11.5px; margin-top: 4px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.inbox-time { color: var(--muted-2); font-size: 9.5px; white-space: nowrap; }

/* 个人主页 */
.profile-hero {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.profile-cover {
    height: 132px;
    background:
        radial-gradient(ellipse at 20% 20%, #ffe7dc 0, transparent 55%),
        radial-gradient(ellipse at 80% 70%, #f3ddec 0, transparent 55%),
        linear-gradient(135deg, #fff4ed, #fbe8ef 56%, #f0e8fb);
    position: relative;
}
.profile-cover::after {
    content: "♡ ✿ ✧";
    position: absolute;
    right: 24px;
    top: 20px;
    color: rgba(217, 107, 104, .35);
    font-size: 19px;
    letter-spacing: 8px;
}
.profile-card-body { padding: 0 26px 22px; }
.profile-avatar-row { display: flex; align-items: flex-end; gap: 14px; margin-top: -38px; position: relative; z-index: 1; }
.profile-avatar-row .avatar { width: 84px; height: 84px; border: 4px solid #fff; box-shadow: 0 6px 20px rgba(110, 72, 72, .12); font-size: 30px; }
.profile-name { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 21px; letter-spacing: -.03em; font-weight: 800; }
.title-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 6px;
    padding: 3px 7px;
    font-size: 9.5px;
    font-weight: 700;
    background: linear-gradient(135deg, #fff0f3, #ffe1e8);
    color: #b55b70;
    border: 1px solid #ffd5de;
}
.title-badge.gold { background: linear-gradient(135deg, #fff7dd, #ffe9b5); color: #a47719; border-color: #f4dfae; }
.title-badge.blue { background: linear-gradient(135deg, #edf7ff, #dcedfb); color: #4c7c9e; border-color: #cfe5f6; }
.title-badge.purple { background: linear-gradient(135deg, #f8f1ff, #ebdcfb); color: #8362a5; border-color: #e3d1f5; }
.title-badge.mint { background: linear-gradient(135deg, #effaf4, #dff4e9); color: #4f8a6c; border-color: #d1ecdc; }
.v-badge {
    display: inline-grid;
    place-items: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #f08a95;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #f3c0c8;
}
.profile-bio { color: #6f5b60; font-size: 12px; line-height: 1.8; margin: 10px 0 0; max-width: 620px; }
.profile-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 10.5px; margin-top: 10px; align-items: center; }
.profile-ip { background: #f8f2f3; border-radius: 999px; padding: 3px 9px; color: #9a8589; }
.profile-actions { margin-left: auto; display: flex; gap: 7px; flex-wrap: wrap; }
.profile-stats { display: flex; gap: 24px; margin-top: 15px; flex-wrap: wrap; }
.profile-stat b { font-size: 17px; color: var(--ink); }
.profile-stat span { color: var(--muted); font-size: 10.5px; margin-left: 3px; }
.profile-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-2); margin: 22px 0 16px; }
.profile-tabs a { padding: 9px 13px; color: var(--muted); font-size: 11.5px; border-bottom: 2px solid transparent; }
.profile-tabs a.active { color: var(--orange-deep); border-color: var(--orange); font-weight: 650; }
.mutual-chip { background: var(--green-soft); color: var(--green); font-size: 9px; border-radius: 999px; padding: 2px 7px; }
.follow-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.follow-person { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 11px 13px; }
.follow-person .avatar { width: 39px; height: 39px; font-size: 14px; }
.follow-person-main { flex: 1; min-width: 0; }
.follow-person-main b { display: block; font-size: 12px; }
.follow-person-main .follow-bio { display: block; color: var(--muted); font-size: 9.5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pagination { padding: 0; }

/* 榜单 */
.rank-hero {
    border-radius: 20px;
    padding: 27px 28px;
    background: linear-gradient(125deg, #fff3ea, #ffe9ef 50%, #f4ecfc);
    border: 1px solid #f6dfe6;
    margin-bottom: 18px;
    position: relative;
    overflow: hidden;
}
.rank-hero::after { content: "♛"; position: absolute; right: 35px; top: 5px; font-size: 110px; color: rgba(224, 137, 146, .13); }
.rank-hero h1 { font-size: 29px; letter-spacing: -.05em; margin: 6px 0 7px; }
.rank-hero p { margin: 0; color: #8c7379; font-size: 12px; }
.rank-tabs { display: flex; gap: 6px; margin-top: 16px; position: relative; z-index: 1; }
.rank-tabs a { border: 1px solid #f0d9dd; background: rgba(255,255,255,.62); color: #8f7479; padding: 6px 14px; border-radius: 999px; font-size: 11px; }
.rank-tabs a.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.rank-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; align-items: start; }
.rank-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.rank-card-head { padding: 15px 17px 12px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rank-card-head h2 { margin: 0; font-size: 14px; }
.rank-card-head span { color: var(--muted); font-size: 9.5px; }
.rank-list { padding: 8px 12px 13px; }
.rank-item { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid #fcf2f2; }
.rank-item:last-child { border-bottom: 0; }
.rank-num { width: 20px; color: #b7a4a8; font-size: 12px; font-weight: 800; text-align: center; flex: 0 0 auto; }
.rank-item:nth-child(1) .rank-num { color: #d6a02c; }
.rank-item:nth-child(2) .rank-num { color: #a58d9c; }
.rank-item:nth-child(3) .rank-num { color: #c48265; }
.rank-item .avatar { width: 34px; height: 34px; font-size: 12px; }
.rank-main { flex: 1; min-width: 0; }
.rank-main b { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--ink); }
.rank-main span { display: block; color: var(--muted); font-size: 9px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-count { color: var(--orange-deep); font-size: 12px; font-weight: 750; white-space: nowrap; }
.rank-work-thumb { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; background: #fdf2f2; }
.rank-top-three { background: linear-gradient(180deg, #fffafd, #fff); }
.rank-item.top1 { background: linear-gradient(90deg, #fff9ef, transparent); border-radius: 9px; padding-left: 6px; }
.rank-item.top2 { background: linear-gradient(90deg, #fbf9fb, transparent); border-radius: 9px; }
.rank-item.top3 { background: linear-gradient(90deg, #fff8f4, transparent); border-radius: 9px; }
.rank-medal { font-size: 13px; width: 20px; text-align: center; }

/* 私信 */
.dm-layout { display: grid; grid-template-columns: 285px minmax(0, 1fr); gap: 14px; height: calc(100vh - 230px); min-height: 460px; }
.conv-panel, .thread-panel { background: #fff; border: 1px solid var(--line); border-radius: 15px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.conv-head, .thread-head { padding: 14px 16px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.conv-head h1, .thread-head h1 { font-size: 14px; margin: 0; }
.conv-list { overflow: auto; flex: 1; }
.conv-item { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.conv-item:hover { background: #fffaf9; }
.conv-item.active { background: var(--pink-soft); }
.conv-item .avatar { width: 36px; height: 36px; font-size: 12px; }
.conv-main { flex: 1; min-width: 0; }
.conv-main b { display: flex; justify-content: space-between; gap: 6px; font-size: 11.5px; }
.conv-main b span { color: var(--muted-2); font-size: 8.5px; font-weight: 400; }
.conv-main p { color: var(--muted); font-size: 10px; margin: 3px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-unread { background: #e96f86; color: #fff; font-size: 8px; min-width: 15px; height: 15px; line-height: 15px; text-align: center; border-radius: 99px; padding: 0 4px; }
.thread-head-user { display: flex; align-items: center; gap: 9px; }
.thread-head-user .avatar { width: 31px; height: 31px; font-size: 11px; }
.thread-head-user b { font-size: 12px; display: block; }
.thread-head-user span { font-size: 9px; color: var(--muted); }
.thread-messages { flex: 1; overflow: auto; padding: 18px; background: #fffaf9; display: flex; flex-direction: column; gap: 12px; }
.chat-bubble-row { display: flex; gap: 8px; align-items: flex-end; }
.chat-bubble-row.mine { flex-direction: row-reverse; }
.chat-bubble { max-width: 70%; background: #fff; border: 1px solid var(--line); padding: 9px 12px; border-radius: 12px 12px 12px 4px; font-size: 12px; line-height: 1.7; color: #5f4c51; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-bubble-row.mine .chat-bubble { background: #ffe9e6; border-color: #ffd9d4; border-radius: 12px 12px 4px 12px; }
.chat-time { color: var(--muted-2); font-size: 8px; white-space: nowrap; }
.thread-compose { padding: 10px 13px 13px; border-top: 1px solid var(--line-2); display: flex; gap: 8px; align-items: flex-end; }
.thread-compose textarea { flex: 1; min-height: 42px; max-height: 100px; resize: none; border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; font-size: 12px; outline: 0; background: #fffdfc; }
.thread-compose textarea:focus { border-color: var(--orange-line); box-shadow: 0 0 0 3px rgba(239,136,124,.08); }
.thread-empty { margin: auto; text-align: center; color: var(--muted); font-size: 12px; }
.thread-empty .ico { width: 38px; height: 38px; margin: 0 auto 12px; color: #d8bfc1; }

/* 协议 */
.legal-page { max-width: 760px; margin: 0 auto; }
.legal-title { text-align: center; margin-bottom: 22px; }
.legal-title h1 { font-size: 28px; letter-spacing: -.05em; margin: 8px 0 6px; }
.legal-title p { color: var(--muted); font-size: 11px; margin: 0; }
.legal-content { font-size: 12.5px; line-height: 2.1; color: #645157; white-space: pre-line; }
.legal-content a { color: var(--orange-deep); }

/* 资料编辑 */
.edit-profile-card { max-width: 650px; }
.avatar-preview { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.avatar-preview .avatar { width: 58px; height: 58px; font-size: 20px; }
.avatar-preview p { font-size: 10px; color: var(--muted); margin: 3px 0 0; }

@media (max-width: 1024px) {
    .rank-columns { grid-template-columns: 1fr; }
    .dm-layout { grid-template-columns: 250px minmax(0, 1fr); }
}
@media (max-width: 820px) {
    .follow-list { grid-template-columns: 1fr; }
    .dm-layout { grid-template-columns: 1fr; height: auto; min-height: 0; }
    .conv-panel { max-height: 300px; }
    .thread-panel { min-height: 480px; }
    .profile-actions { width: 100%; margin-left: 0; margin-top: 10px; }
}
@media (max-width: 600px) {
    .header-alert { display: none; }
    .rank-hero { padding: 20px 18px; }
    .rank-hero h1 { font-size: 24px; }
    .profile-card-body { padding: 0 16px 18px; }
    .profile-cover { height: 105px; }
    .profile-avatar-row .avatar { width: 70px; height: 70px; }
    .profile-name { font-size: 18px; }
    .profile-stats { gap: 16px; }
    .dm-layout { gap: 10px; }
    .thread-messages { padding: 13px; }
    .notice-detail-head, .notice-detail-body { padding: 17px; }
}

/* 登录页 */
.login-body { background: var(--cream); }
.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(400px, .95fr); }
.login-art {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 24% 18%, #ffe6da, transparent 52%),
        radial-gradient(ellipse at 76% 76%, #f3ddec, transparent 54%),
        linear-gradient(145deg, #fff6ef, #fbe9ef 58%, #f1e9fb);
    padding: 46px 54px;
    display: flex;
    align-items: stretch;
}
.login-art::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(198, 139, 139, .18) 1.1px, transparent 1.1px);
    background-size: 23px 23px;
    opacity: .55;
    pointer-events: none;
}
.login-art-inner { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: space-between; width: 100%; }
.login-quote { margin: auto 0; padding: 30px 0; }
.login-heart { color: #e58b9b; font-size: 26px; letter-spacing: 4px; }
.login-quote h1 { font-size: clamp(34px, 4vw, 55px); line-height: 1.16; letter-spacing: -.06em; margin: 14px 0 18px; color: #433034; }
.login-quote p { color: #8e7379; font-size: 13px; line-height: 2; margin: 0; }
.login-dots { display: grid; grid-template-columns: repeat(9, 13px); gap: 7px; }
.login-dots i { width: 13px; height: 13px; border-radius: 50%; background: #efb2a4; opacity: .8; }
.login-dots i:nth-child(3n) { background: #e8a6b7; }
.login-dots i:nth-child(4n) { background: #cbb8e3; }
.login-dots i:nth-child(5n) { background: #f6d0a9; }
.login-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 36px 28px; background: #fffdfc; }
.login-card { width: 100%; max-width: 370px; }
.login-card h2 { font-size: 28px; letter-spacing: -.045em; margin: 9px 0 9px; }
.login-sub { color: var(--muted); font-size: 12px; line-height: 1.8; margin: 0 0 24px; }
.login-sso { height: 48px; border-radius: 13px; }
.login-hint { color: var(--muted-2); font-size: 10px; text-align: center; margin: 11px 0 0; }
.login-legal { color: var(--muted); font-size: 10px; line-height: 1.9; text-align: center; margin-top: 26px; }
.login-legal a { color: var(--orange-deep); text-decoration: underline; text-underline-offset: 3px; }
.login-back { text-align: center; margin-top: 18px; font-size: 11px; }
.login-back a { color: var(--muted); }
.login-flash { border-radius: 9px; padding: 10px 12px; font-size: 11px; line-height: 1.7; margin-bottom: 16px; background: var(--orange-soft); color: var(--orange-deep); }
.login-flash.error { background: var(--danger-soft); color: var(--danger); }
.login-foot { position: absolute; bottom: 18px; color: var(--muted-2); font-size: 9px; }
.login-panel { position: relative; }
@media (max-width: 820px) {
    .login-page { grid-template-columns: 1fr; }
    .login-art { display: none; }
    .login-panel { min-height: 100vh; padding: 30px 20px; }
}

@media (max-width: 820px) {
    .admin-sidebar { flex-wrap: nowrap; overflow-x: auto; gap: 5px; padding: 9px 12px; scrollbar-width: none; }
    .admin-sidebar::-webkit-scrollbar { display: none; }
    .admin-sidebar .brand { flex: 0 0 auto; margin-right: 8px; }
    .admin-sidebar .brand img { width: 22px; height: 22px; }
    .admin-sidebar .brand-text { font-size: 15px; }
    .admin-nav { flex-wrap: nowrap; overflow: visible; }
    .admin-nav a { padding: 6px 8px; font-size: 10.5px; }
    .admin-nav a .ico { width: 13px; height: 13px; }
}
@media (max-width: 600px) {
    .admin-sidebar .brand-text, .admin-sidebar .brand-badge { display: none; }
    .admin-sidebar .brand { margin-right: 2px; }
    .admin-nav a { padding: 6px 7px; font-size: 10px; }
    .admin-content { padding-top: 12px; }
    .admin-topbar { padding: 0 13px; }
    .admin-topbar .crumb { font-size: 10px; }
    .comment-login { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1px dashed var(--orange-line); border-radius: 10px; background: #fffaf8; color: var(--muted); font-size: 11px; }
}
.comment-login { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1px dashed var(--orange-line); border-radius: 10px; background: #fffaf8; color: var(--muted); font-size: 11px; }
.tool-btn:disabled { opacity: .32; cursor: not-allowed; background: #faf5f4; }
.tool-btn:disabled:hover { border-color: transparent; background: #faf5f4; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading .ico { opacity: 0; }
.btn.is-loading::after {
    content: "";
    position: absolute;
    width: 17px;
    height: 17px;
    top: 50%;
    left: 50%;
    margin: -8.5px 0 0 -8.5px;
    border: 2px solid rgba(217, 107, 104, .22);
    border-top-color: var(--orange-deep);
    border-radius: 50%;
    animation: yidou-spin .7s linear infinite;
}
@keyframes yidou-spin { to { transform: rotate(360deg); } }
.user-side, .user-content { min-width: 0; }
.user-nav { max-width: 100%; min-width: 0; }
.project-grid { min-width: 0; }
.project-card { min-width: 0; }
.title-badge.pink { background: linear-gradient(135deg, #fff0f4, #ffe0e8); color: #b85b73; border-color: #ffd2dd; }
@media (max-width: 820px) {
    .user-nav { width: 100%; overflow-x: auto; scrollbar-width: none; }
    .user-nav::-webkit-scrollbar { display: none; }
}
@media (max-width: 820px) {
    .user-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; width: 100%; overflow: visible; }
    .user-nav a { justify-content: center; gap: 5px; padding: 8px 4px; font-size: 10.5px; white-space: nowrap; }
    .user-nav .count { margin-left: 0; }
}
@media (max-width: 400px) {
    .user-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.sample-link { display: block; position: relative; color: inherit; }
.sample-link .sample-art img { width: 100%; height: 100%; object-fit: contain; padding: 12px; transition: transform .25s ease; }
.sample-link:hover .sample-art img { transform: scale(1.03); }
.sample-import { position: absolute; right: 12px; top: 12px; background: rgba(255,255,255,.9); color: var(--orange-deep); font-size: 9.5px; padding: 5px 9px; border-radius: 999px; border: 1px solid #ffd9d2; opacity: 0; transform: translateY(-3px); transition: .2s ease; }
.sample-link:hover .sample-import { opacity: 1; transform: none; }
.faq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.faq-item h3 { font-size: 13px; margin: 0 0 7px; color: var(--ink); }
.faq-item p { margin: 0; color: #7d686e; font-size: 11.5px; line-height: 1.85; }
@media (max-width: 600px) { .faq-grid { grid-template-columns: 1fr; } }
.sample-link .sample-art { display: block; position: relative; aspect-ratio: 1.55; overflow: hidden; }
.sample-link .sample-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 12px; }
@media (max-width: 600px) {
    .sample-import { opacity: 1; transform: none; }
}
.sample-link .sample-art { display: block; position: relative; height: 235px; aspect-ratio: auto; overflow: hidden; }
.sample-link .sample-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 10px; }
@media (max-width: 600px) { .sample-link .sample-art { height: 205px; } }
.sample-link .sample-art { display: flex; align-items: center; justify-content: center; padding: 10px; }
.sample-link .sample-art img { position: static; inset: auto; width: auto; height: auto; max-width: 100%; max-height: 100%; padding: 0; object-fit: contain; }
.footer-company { width: 100%; display: flex; flex-wrap: wrap; gap: 5px 16px; align-items: center; color: #a9978f; font-size: 9.5px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.footer-company a { color: #a9978f; text-decoration: underline; text-underline-offset: 3px; }
.footer-company a:hover { color: var(--orange-deep); }
.footer-note { margin-top: 6px; }
.login-foot { width: 100%; text-align: center; line-height: 1.8; padding: 0 12px; }
.login-foot a { color: var(--muted-2); text-decoration: underline; text-underline-offset: 2px; }
.profile-avatar-row .avatar { overflow: visible; }
.profile-avatar-row .avatar img { border-radius: 50%; }
.avatar-v {
    position: absolute;
    right: -2px;
    bottom: -1px;
    z-index: 3;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f39aac, #e46f87);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(190, 95, 115, .28);
}
.profile-name { flex-wrap: wrap; row-gap: 5px; }
.size-presets { display: flex; gap: 5px; flex-wrap: wrap; margin: 10px 0 2px; }
.size-presets button { border: 1px solid var(--line); background: #fffdfa; border-radius: 7px; padding: 5px 8px; font-size: 9.5px; color: #8a747a; }
.size-presets button:hover, .size-presets button.active { border-color: var(--orange-line); color: var(--orange-deep); background: var(--orange-soft); }
.draft-card { max-width: 400px; }
.draft-preview { display: flex; gap: 11px; align-items: center; padding: 12px 13px; background: #fff8f4; border: 1px solid var(--line-2); border-radius: 11px; margin-bottom: 16px; }
.draft-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--pink-soft); color: var(--orange-deep); flex: 0 0 auto; }
.draft-preview b { font-size: 12px; }
.draft-preview p { margin: 3px 0 0; font-size: 10px; color: var(--muted); }
@media (max-width: 600px) {
    .editor-page { padding-bottom: 80px; }
    .editor-page .canvas-toolbar {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 12px;
        z-index: 60;
        background: rgba(255, 253, 250, .96);
        border: 1px solid var(--line);
        border-radius: 15px;
        box-shadow: 0 10px 30px rgba(90, 55, 55, .16);
        backdrop-filter: blur(12px);
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 7px 8px;
    }
    .editor-page .canvas-toolbar::-webkit-scrollbar { display: none; }
    .editor-page .canvas-toolbar .tool-btn { width: 32px; height: 32px; flex: 0 0 auto; }
    .editor-page .canvas-toolbar .toolbar-spacer { flex: 1 0 8px; }
}
.share-card { max-width: 520px; }
.poster-preview { background: #fff8f4; border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 13px; max-height: 58vh; overflow: auto; text-align: center; }
.poster-preview img { max-width: 100%; height: auto; border-radius: 8px; box-shadow: 0 8px 24px rgba(94, 60, 60, .1); }
.poster-tip { text-align: center; color: var(--muted); font-size: 10px; margin: 10px 0 0; }
@media (max-width: 600px) { .poster-preview { max-height: 52vh; padding: 7px; } }
.detail-author-link { display: flex; align-items: center; gap: 7px; color: inherit; min-width: 0; }
.detail-author-link:hover { color: var(--orange-deep); }
.rank-item { color: inherit; text-decoration: none; }
.rank-item:hover .rank-main b { color: var(--orange-deep); }
@media (max-width: 600px) {
    .profile-avatar-row { flex-wrap: wrap; align-items: flex-start; gap: 10px; margin-top: -32px; }
    .profile-avatar-row .avatar { width: 68px; height: 68px; font-size: 24px; margin-top: 0; }
    .profile-avatar-row > div { flex: 1 1 calc(100% - 88px); min-width: 0; }
    .profile-name { font-size: 18px; line-height: 1.4; }
    .profile-meta { gap: 5px 9px; margin-top: 7px; font-size: 9.5px; line-height: 1.5; }
    .profile-ip { white-space: nowrap; font-size: 9px; padding: 2px 7px; }
    .profile-actions { flex: 0 0 100%; width: 100%; margin: 6px 0 0; display: flex; flex-wrap: wrap; }
    .profile-actions .btn { flex: 1 1 auto; justify-content: center; }
    .profile-bio { margin-top: 8px; }
    .profile-stats { gap: 14px; row-gap: 8px; }
}
.v-badge { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; min-width: 16px; padding: 0; line-height: 1; font-style: normal; vertical-align: middle; flex: 0 0 auto; box-sizing: border-box; }

.rank-main .v-badge, .follow-person-main .v-badge, .profile-name .v-badge {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    min-width: 16px;
    margin: 0;
    padding: 0;
    line-height: 1;
    font-size: 9px;
    font-style: normal;
    vertical-align: middle;
    flex: 0 0 auto;
}

@media (max-width: 600px) {
    .profile-avatar-row { flex-wrap: wrap !important; }
    .profile-avatar-row > div { flex: 1 1 calc(100% - 88px) !important; width: auto !important; }
    .profile-actions { flex: 0 0 100% !important; width: 100% !important; margin-left: 0 !important; margin-top: 6px !important; }
}
.mobile-profile-link { display: none; }
@media (max-width: 820px) {
    .user-menu-wrap { display: none; }
    .mobile-profile-link { display: inline-flex; align-items: center; flex: 0 0 auto; }
    .mobile-profile-link .avatar { width: 32px; height: 32px; }
}
.draft-list { display: flex; flex-direction: column; gap: 8px; max-height: 56vh; overflow: auto; }
.draft-item { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fffaf8; }
.draft-item-main { flex: 1; min-width: 0; }
.draft-item-main b { display: block; font-size: 12px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.draft-item-main span { display: block; color: var(--muted); font-size: 9.5px; margin-top: 3px; }
.draft-item-actions { display: flex; gap: 5px; flex: 0 0 auto; }
.draft-empty { padding: 28px 10px; text-align: center; color: var(--muted); font-size: 11px; }
