/* ============================================================
   樱梨官网 web1.0.1 - 小镇领地 / 个人主页 / QQ登录 / 管理 样式
   主题：樱花粉 #FBCDD0 + 淡黄 #FFFFE1 渐变
   ============================================================ */

:root {
    --pink: #FBCDD0;
    --pink-deep: #f7a8ae;
    --yellow: #FFFFE1;
    --yellow-deep: #fff3b8;
    --brown: #8B5E3C;
    --text: #4a4a4a;
    --card-bg: #fffdf8;
    --grad-main: linear-gradient(135deg, #FBCDD0 0%, #FFFFE1 100%);
    --grad-soft: linear-gradient(135deg, rgba(251,205,208,.18) 0%, rgba(255,255,225,.28) 100%);
    --shadow: 0 8px 24px rgba(251, 205, 208, .35);
    --radius: 18px;
}

/* ---------- 通用 ---------- */
.town-page { background: var(--grad-soft); min-height: 100vh; }

.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
    vertical-align: middle;
}
.badge-active { background: #e8f8ec; color: #2f9e44; }
.badge-bankrupt { background: #fff1e6; color: #e8590c; }
.badge-disbanded { background: #f3f4f6; color: #868e96; }
.badge-pinned { background: linear-gradient(135deg,#FBCDD0,#fff3b8); color: #8B5E3C; }
.badge-members { background: #eef0ff; color: #5c7cfa; }

.grad-text {
    background: linear-gradient(120deg, #e57a86, #b98a2f);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

.town-btn {
    border: none; cursor: pointer; border-radius: 12px; padding: 10px 22px;
    font-size: 15px; font-weight: 600; color: #fff;
    background: linear-gradient(135deg, #f7a8ae, #e57a86);
    box-shadow: 0 6px 16px rgba(229,122,134,.35);
    transition: transform .2s ease, box-shadow .2s ease;
}
.town-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(229,122,134,.45); }
.town-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.town-btn.secondary { background: linear-gradient(135deg, #fff3b8, #f5d76e); color: #8B5E3C; box-shadow: 0 6px 16px rgba(245,215,110,.35); }
.town-btn.ghost { background: #fff; color: #8B5E3C; border: 1px solid var(--pink-deep); box-shadow: none; }
.town-btn.danger { background: linear-gradient(135deg,#ffa8a8,#ff6b6b); }

.town-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(251,205,208,.5);
}

.empty-tip {
    text-align: center; color: #aaa; padding: 48px 20px; font-size: 15px;
}
.empty-tip .empty-icon { font-size: 42px; display: block; margin-bottom: 10px; }

/* 渐入动画 */
@keyframes popIn { from { opacity: 0; transform: scale(.92) translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes glowPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(251,205,208,.55); } 50% { box-shadow: 0 0 0 10px rgba(251,205,208,0); } }
@keyframes tickerUp { 0% { transform: translateY(0); } 100% { transform: translateY(-100%); } }
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }

.pop-in { animation: popIn .5s ease-out both; }

/* ---------- QQ 登录页 ---------- */
.qq-auth-wrap { max-width: 460px; margin: 40px auto; padding: 0 16px; }
.qq-auth-card {
    background: var(--card-bg); border-radius: 24px; box-shadow: var(--shadow);
    border: 1px solid rgba(251,205,208,.55); padding: 34px 30px; position: relative; overflow: hidden;
}
.qq-auth-card::before {
    content: ''; position: absolute; top: -70px; right: -70px; width: 190px; height: 190px;
    background: radial-gradient(circle, rgba(251,205,208,.55), transparent 70%); border-radius: 50%;
}
.qq-auth-card::after {
    content: ''; position: absolute; bottom: -60px; left: -60px; width: 160px; height: 160px;
    background: radial-gradient(circle, rgba(255,243,184,.6), transparent 70%); border-radius: 50%;
}
.qq-auth-card > * { position: relative; z-index: 1; }
.qq-logo {
    width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 18px;
    background: linear-gradient(135deg, #f7a8ae, #fff3b8);
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; box-shadow: 0 8px 20px rgba(251,205,208,.5); animation: floatY 3s ease-in-out infinite;
}
.qq-auth-card h2 { text-align: center; color: var(--brown); margin-bottom: 6px; }
.qq-auth-card .subtitle { text-align: center; color: #999; font-size: 14px; margin-bottom: 24px; }

.qq-login-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 14px; border: none; border-radius: 14px; cursor: pointer;
    font-size: 17px; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, #4fa9ff, #2f7bff);
    box-shadow: 0 8px 20px rgba(47,123,255,.35);
    transition: transform .2s ease, box-shadow .2s ease;
}
.qq-login-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(47,123,255,.45); }
.qq-login-btn .qq-icon {
    width: 28px; height: 28px; border-radius: 8px; background: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 17px; color: #2f7bff;
}

.qq-mode-tip {
    margin-top: 12px; padding: 9px 12px; border-radius: 10px; font-size: 12px;
    background: var(--grad-soft); color: #a0857a; text-align: center;
}

.mock-picker { margin-top: 18px; }
.mock-picker h4 { font-size: 14px; color: var(--brown); margin-bottom: 10px; }
.mock-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mock-item {
    padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(251,205,208,.6);
    background: #fff; cursor: pointer; font-size: 13px; text-align: left;
    transition: all .18s ease;
}
.mock-item:hover { border-color: var(--pink-deep); background: var(--grad-soft); transform: translateY(-1px); }
.mock-item small { display: block; color: #aaa; }

.qq-divider { display: flex; align-items: center; gap: 12px; color: #bbb; font-size: 12px; margin: 18px 0; }
.qq-divider::before, .qq-divider::after { content: ''; flex: 1; height: 1px; background: #eee; }

.qq-step { margin-bottom: 16px; }
.qq-step-label { display: block; font-size: 13px; color: var(--brown); font-weight: 600; margin-bottom: 6px; }
.qq-step .qq-nick-preview { font-size: 13px; color: #888; margin-bottom: 8px; }
.qq-prefill {
    padding: 10px 14px; border-radius: 12px; background: var(--grad-soft);
    border: 1px dashed rgba(251,205,208,.8); color: var(--brown); font-size: 14px;
}
.qq-prefill .auto-tag { font-size: 11px; background: #fff; border-radius: 8px; padding: 1px 8px; margin-right: 6px; color: #e57a86; font-weight: 700; }

.merge-box { margin-top: 14px; padding: 12px; border-radius: 12px; background: #fff7f3; border: 1px solid #ffd8c8; }
.merge-box .merge-title { font-size: 14px; font-weight: 700; color: #d9480f; margin-bottom: 8px; }
.merge-cand {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 9px 12px; border-radius: 10px; background: #fff; border: 1px solid #ffe3d3; margin-bottom: 8px;
}
.merge-cand input { flex: 1; border: 1px solid #eee; border-radius: 8px; padding: 7px 10px; font-size: 13px; }
.merge-actions { display: flex; gap: 8px; justify-content: flex-end; }

.admin-entry { text-align: center; margin-top: 14px; font-size: 12px; }
.admin-entry a { color: #b8a08a; text-decoration: none; }
.admin-entry a:hover { color: var(--brown); }

/* 导航栏用户头像 */
.nav-avatar {
    width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--grad-soft); border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    font-size: 20px; vertical-align: middle;
}
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 个人主页 ---------- */
.profile-wrap { max-width: 1080px; margin: 30px auto; padding: 0 18px; }
.profile-banner {
    position: relative; border-radius: 26px; overflow: hidden;
    background: var(--grad-main); padding: 36px 34px; box-shadow: var(--shadow);
    display: flex; gap: 28px; align-items: center; flex-wrap: wrap;
}
.profile-banner::after {
    content: ''; position: absolute; right: -50px; top: -50px; width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(255,255,255,.7), transparent 70%); border-radius: 50%;
}
.profile-avatar {
    width: 110px; height: 110px; border-radius: 26px; overflow: hidden;
    border: 4px solid #fff; box-shadow: 0 10px 24px rgba(229,122,134,.4);
    background: #fff; flex: 0 0 auto; position: relative; z-index: 1;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-avatar canvas { width: 100%; height: 100%; image-rendering: pixelated; }
.profile-avatar .avatar-fallback {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    font-size: 44px; background: var(--grad-soft); color: #e57a86;
}
.profile-skin {
    width: 196px; height: 292px; flex: 0 0 auto; position: relative; z-index: 1;
    display: flex; align-items: center; justify-content: center;
}
.profile-skin canvas { image-rendering: pixelated; max-width: 100%; max-height: 100%; }
.profile-main { flex: 1; min-width: 240px; position: relative; z-index: 1; }
.profile-main h1 { font-size: 30px; color: var(--brown); margin: 0 0 4px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-main .qq-nick { color: #b08f7a; font-size: 15px; }
.profile-online { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #2f9e44; }
.profile-online.off { color: #aaa; }
.profile-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip {
    padding: 5px 13px; border-radius: 999px; background: rgba(255,255,255,.75);
    color: #8b6f5a; font-size: 12.5px; font-weight: 600; box-shadow: 0 2px 6px rgba(0,0,0,.04);
}

.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }
.profile-col { display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 860px) { .profile-grid { grid-template-columns: 1fr; } }

.profile-card { padding: 20px 22px; }
.profile-card h3 {
    font-size: 16px; color: var(--brown); margin: 0 0 14px;
    display: flex; align-items: center; gap: 8px;
}
.profile-card h3 .card-icon { font-size: 20px; }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat-cell {
    padding: 11px 12px; border-radius: 12px; background: var(--grad-soft);
    border: 1px solid rgba(251,205,208,.35); text-align: center;
    transition: transform .2s ease;
}
.stat-cell:hover { transform: translateY(-2px) scale(1.02); }
.stat-cell .num { font-size: 19px; font-weight: 800; color: #e57a86; }
.stat-cell .lbl { font-size: 12px; color: #9c8b7d; margin-top: 2px; }
.stat-cell .sub { font-size: 11px; color: #bbb; }

.profile-info-list { display: flex; flex-direction: column; gap: 9px; }
.profile-info-row { display: flex; justify-content: space-between; font-size: 14px; padding-bottom: 8px; border-bottom: 1px dashed #f0e0da; }
.profile-info-row .k { color: #a99; }
.profile-info-row .v { color: #6b5544; font-weight: 600; text-align: right; }

.profile-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.avatar-upload input { display: none; }

.guest-panel {
    margin-top: 14px; padding: 14px; border-radius: 14px; background: #fff8ec;
    border: 1px solid #ffe8b8; font-size: 14px; color: #8a6d3b;
}

/* ---------- 小镇领地列表页 ---------- */
.towns-wrap { max-width: 1200px; margin: 30px auto; padding: 0 18px; }
.towns-header { text-align: center; margin-bottom: 26px; }
.towns-header h1 { font-size: 32px; color: var(--brown); margin-bottom: 6px; }
.towns-header p { color: #a99; }

.town-tabs {
    display: flex; justify-content: center; gap: 10px; margin-bottom: 24px;
}
.town-tab {
    padding: 10px 28px; border-radius: 999px; border: 1px solid rgba(251,205,208,.7);
    background: #fff; color: #8b6f5a; font-size: 15px; font-weight: 600; cursor: pointer;
    transition: all .2s ease;
}
.town-tab.active { background: var(--grad-main); color: var(--brown); border-color: transparent; box-shadow: 0 6px 16px rgba(251,205,208,.45); }
.town-tab:hover { transform: translateY(-1px); }

.towns-panel { display: none; }
.towns-panel.active { display: block; animation: popIn .45s ease-out; }

.town-toolbar {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
    padding: 14px 16px; margin-bottom: 20px;
}
.town-toolbar input, .town-toolbar select {
    border: 1px solid #f0d8d4; border-radius: 10px; padding: 8px 12px; font-size: 14px; background: #fff;
}
.town-toolbar input:focus, .town-toolbar select:focus { outline: none; border-color: var(--pink-deep); }
.town-toolbar .toolbar-spacer { flex: 1; }

.town-rank-tabs { display: flex; gap: 8px; }
.rank-tab {
    padding: 6px 14px; border-radius: 999px; font-size: 13px; border: 1px solid #eee;
    background: #fff; color: #999; cursor: pointer; transition: all .18s ease;
}
.rank-tab.active { background: var(--grad-soft); color: var(--brown); border-color: rgba(251,205,208,.8); font-weight: 700; }

.town-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px;
}
.town-grid .town-card {
    padding: 20px; cursor: pointer; position: relative; overflow: hidden;
    transition: transform .22s ease, box-shadow .22s ease;
}
.town-grid .town-card:hover { transform: translateY(-5px); box-shadow: 0 16px 34px rgba(229,122,134,.4); }
.town-grid .town-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px;
    background: var(--grad-main);
}
.town-grid .town-card.bankrupt::before { background: linear-gradient(90deg,#ffc078,#ff922b); }
.town-grid .town-card.disbanded::before { background: linear-gradient(90deg,#ced4da,#adb5bd); }
.town-card-top { display: flex; align-items: flex-start; gap: 14px; }
.town-card-head { flex: 1; min-width: 0; }
.town-logo {
    width: 88px; height: 88px; border-radius: 20px; overflow: hidden; flex: 0 0 auto;
    background: var(--grad-soft); border: 2px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,.08);
    display: flex; align-items: center; justify-content: center; font-size: 40px; color: #e57a86;
}
.town-logo img { width: 100%; height: 100%; object-fit: cover; }
.town-card-tagline {
    font-size: 12.5px; color: #a0857a; line-height: 1.5; margin-top: 6px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.town-hero-logo {
    width: 84px; height: 84px; border-radius: 22px; overflow: hidden; flex: 0 0 auto;
    background: rgba(255,255,255,.75); border: 3px solid #fff; box-shadow: 0 8px 20px rgba(229,122,134,.35);
    display: flex; align-items: center; justify-content: center; font-size: 38px; color: #e57a86;
}
.town-hero-logo img { width: 100%; height: 100%; object-fit: cover; }
.town-card-name { font-size: 17px; font-weight: 800; color: var(--brown); display: flex; align-items: center; gap: 6px; min-width: 0; }
.town-card-name .tn-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; min-width: 0; }
.town-card-name .badge { flex: 0 0 auto; }
.town-card-tag { color: #bbb; font-size: 12px; }
.town-card-mayor { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.mini-avatar {
    width: 34px; height: 34px; border-radius: 10px; overflow: hidden; flex: 0 0 auto;
    background: var(--grad-soft); display: flex; align-items: center; justify-content: center;
    font-size: 17px; color: #e57a86; border: 2px solid #fff; box-shadow: 0 3px 8px rgba(0,0,0,.08);
}
.mini-avatar img { width: 100%; height: 100%; object-fit: cover; }
.town-card-mayor .name { font-size: 14px; color: #6b5544; font-weight: 600; }
.town-card-mayor .role { font-size: 11px; color: #bbb; }
.town-card-stats { display: flex; gap: 12px; margin-top: 11px; padding-top: 10px; border-top: 1px dashed #f2e2dc; }
.town-card-stat { font-size: 13px; color: #9c8b7d; }
.town-card-stat b { color: #e57a86; font-size: 15px; }
.town-card-recruit {
    margin-top: 12px; font-size: 12.5px; color: #b08f7a; line-height: 1.5;
    background: var(--grad-soft); border-radius: 10px; padding: 8px 10px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.town-card-footer {
    margin-top: 10px; display: flex; align-items: center; gap: 8px;
    font-size: 11.5px; color: #b8a695; white-space: nowrap; overflow: hidden;
}
.town-card-footer span { display: inline-flex; align-items: center; gap: 6px; overflow: hidden; text-overflow: ellipsis; }
.town-card.disbanded, .town-card.bankrupt { opacity: .88; }

.town-count { color: #b08f7a; font-size: 13px; margin-bottom: 14px; }

/* 教程 */
.tutorial-wrap { max-width: 900px; margin: 0 auto; }
.tutorial-block {
    padding: 22px 26px; margin-bottom: 20px; scroll-margin-top: 90px;
}
.tutorial-block h2 { color: var(--brown); font-size: 20px; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.tutorial-block h2 .num {
    width: 30px; height: 30px; border-radius: 10px; background: var(--grad-main);
    display: inline-flex; align-items: center; justify-content: center; font-size: 15px; flex: 0 0 auto;
}
.tutorial-block p, .tutorial-block li { color: #6b5544; font-size: 14.5px; line-height: 1.8; }
.tutorial-block ul { padding-left: 22px; }
.cmd-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13.5px; }
.cmd-table th { background: var(--grad-soft); color: var(--brown); text-align: left; padding: 10px 12px; }
.cmd-table td { padding: 9px 12px; border-bottom: 1px solid #f5e7e2; color: #6b5544; }
.cmd-table tr:hover td { background: #fffaf4; }
.cmd-code {
    background: #fff4f2; border: 1px solid #fbd9d6; border-radius: 7px;
    padding: 2px 8px; font-size: 13px; color: #d95763; font-family: Consolas, monospace;
}
.tutorial-faq { margin-top: 10px; }
.faq-item { border-bottom: 1px dashed #f0e0da; padding: 10px 0; }
.faq-item b { color: var(--brown); }
.faq-item p { margin: 4px 0 0; font-size: 13.5px; }

/* ---------- 小镇详情页 ---------- */
.town-detail-wrap { max-width: 1160px; margin: 26px auto; padding: 0 18px; }
.town-hero {
    border-radius: 26px; padding: 30px 34px; position: relative; overflow: hidden;
    background: var(--grad-main); box-shadow: var(--shadow);
}
.town-hero::after {
    content: ''; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px;
    background: radial-gradient(circle, rgba(255,255,255,.65), transparent 70%); border-radius: 50%;
}
.town-hero-inner { position: relative; z-index: 1; }
.town-hero h1 { font-size: 32px; color: var(--brown); margin: 0 0 6px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.town-hero .board { color: #a0857a; font-size: 14px; max-width: 640px; line-height: 1.6; }
.town-hero-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }
.town-hero-stat {
    background: rgba(255,255,255,.72); border-radius: 14px; padding: 9px 16px;
    font-size: 13px; color: #8b6f5a; box-shadow: 0 3px 10px rgba(0,0,0,.04);
    display: inline-flex; align-items: center; justify-content: center;
    text-align: center; line-height: 1.35; min-height: 38px;
}
.town-hero-stat b { color: #e57a86; font-size: 16px; }
.town-recruit {
    margin-top: 16px; background: rgba(255,255,255,.7); border-radius: 14px;
    padding: 12px 16px; font-size: 14px; color: #8a6d3b; border: 1px dashed #f5d76e;
}
.town-hero-actions { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }

.town-nav {
    position: sticky; top: 0; z-index: 50; margin: 18px 0;
    display: flex; gap: 6px; overflow-x: auto; padding: 8px;
    background: rgba(255,253,248,.92); backdrop-filter: blur(10px);
    border-radius: 16px; box-shadow: 0 6px 18px rgba(251,205,208,.3);
}
.town-nav a {
    padding: 8px 18px; border-radius: 999px; white-space: nowrap; font-size: 14px;
    color: #8b6f5a; text-decoration: none; transition: all .18s ease;
}
.town-nav a:hover, .town-nav a.active { background: var(--grad-main); color: var(--brown); font-weight: 700; }

.town-section { margin-bottom: 26px; scroll-margin-top: 90px; }
.town-section-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    margin-bottom: 14px;
}
.town-section-head h2 { font-size: 21px; color: var(--brown); margin: 0; display: flex; align-items: center; gap: 10px; }

.member-groups { display: flex; flex-direction: column; gap: 14px; }
.member-group-title {
    font-size: 14px; font-weight: 700; color: #b08f7a; margin-bottom: 8px;
    display: flex; align-items: center; gap: 8px;
}
.member-group-title .count { font-size: 12px; color: #ccc; font-weight: 400; }
.member-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.member-chip {
    display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px;
    border-radius: 999px; background: #fff; border: 1px solid #f3deda; cursor: pointer;
    transition: all .18s ease; font-size: 13px; color: #6b5544;
}
.member-chip:hover { border-color: var(--pink-deep); transform: translateY(-2px); box-shadow: 0 5px 12px rgba(251,205,208,.4); }
.member-chip .mini-avatar { width: 28px; height: 28px; border-radius: 9px; font-size: 14px; }
.member-chip .rank-tag {
    font-size: 10.5px; background: var(--grad-soft); color: #b98a2f; border-radius: 6px; padding: 1px 6px; font-weight: 700;
}

.changelog-box {
    position: relative; height: 340px; overflow-y: auto; border-radius: 16px;
    border: 1px solid #f3deda; background: #fffdfa;
}
.changelog-box::-webkit-scrollbar { width: 8px; }
.changelog-box::-webkit-scrollbar-thumb { background: #f3c6c4; border-radius: 8px; }
.changelog-box::-webkit-scrollbar-track { background: #fff7f4; }
.changelog-list { padding: 8px 14px; }
.changelog-item {
    display: flex; align-items: center; gap: 10px; padding: 9px 6px;
    border-bottom: 1px dashed #f5e7e2; font-size: 13.5px; color: #6b5544;
}
.changelog-item .ev-icon { font-size: 16px; flex: 0 0 auto; }
.changelog-item .ev-time { color: #bbb; font-size: 12px; margin-left: auto; white-space: nowrap; }
.changelog-scroll-hint {
    position: absolute; right: 10px; bottom: 8px; background: #fff; border-radius: 999px;
    padding: 4px 10px; font-size: 11px; color: #b08f7a; box-shadow: 0 2px 8px rgba(0,0,0,.08);
    cursor: pointer; z-index: 2;
}

/* 镇长管理面板 */
.mayor-panel { margin: 16px 0; padding: 18px 22px; }
.mayor-panel-title { font-size: 15px; font-weight: 800; color: var(--brown); margin-bottom: 12px; }
.mayor-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.mayor-vis { border-top: 1px dashed #f2e2dc; padding-top: 12px; }
.mayor-vis-title { font-size: 13px; color: #8b6f5a; font-weight: 700; margin-bottom: 8px; }
.mayor-vis .vis-row { justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed #f7ece8; margin: 0; }

/* 前哨列表 */
.outpost-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.outpost-card { display: flex; align-items: center; gap: 12px; padding: 13px 15px; transition: transform .18s ease; }
.outpost-card:hover { transform: translateY(-2px); }
.op-icon {
    width: 42px; height: 42px; border-radius: 12px; flex: 0 0 auto;
    background: var(--grad-soft); display: flex; align-items: center; justify-content: center;
    font-size: 21px;
}
.op-info { min-width: 0; }
.op-name { font-size: 14px; font-weight: 800; color: var(--brown); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op-meta { font-size: 12px; color: #b0a08f; margin-top: 3px; }

.content-list { display: flex; flex-direction: column; gap: 14px; }
.content-item { padding: 18px 22px; }
.content-item .content-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.content-item .content-title { font-size: 16.5px; font-weight: 800; color: var(--brown); }
.content-item .content-meta { font-size: 12.5px; color: #bbb; }
.content-item .content-body { margin-top: 10px; font-size: 14px; color: #6b5544; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.content-item .content-img {
    margin-top: 12px; border-radius: 14px; overflow: hidden;
    max-width: 320px; cursor: zoom-in; box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.content-item .content-img img { width: 100%; max-height: 240px; object-fit: cover; display: block; }
.content-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.content-action {
    border: none; background: #fff4f2; color: #d95763; border-radius: 8px;
    padding: 5px 12px; font-size: 12px; cursor: pointer; transition: all .15s ease;
}
.content-action:hover { background: #fbd9d6; }

.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.album-item { overflow: hidden; }
.album-item .album-img-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
    padding: 10px; border-radius: 12px 12px 0 0;
}
.album-item .album-img-grid img {
    width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px;
    cursor: pointer; transition: transform .25s ease; display: block;
}
.album-item .album-img-grid img:hover { transform: scale(1.05); }
.album-item .album-img-cell {
	border-radius: 10px;
	cursor: pointer;
	overflow: hidden;
	position: relative;
}
.album-item .album-more {
	align-items: center;
	background: rgba(0, 0, 0, .45);
	border-radius: 10px;
	color: #fff;
	display: flex;
	font-size: 22px;
	font-weight: 800;
	inset: 0;
	justify-content: center;
	position: absolute;
}
.album-item .album-info { padding: 10px 12px; }
.album-item .album-title { font-size: 14px; font-weight: 700; color: var(--brown); }
.album-item .album-meta { font-size: 12px; color: #bbb; margin-top: 3px; }
.album-like { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #e57a86; cursor: pointer; margin-top: 6px; }

.composer {
    margin-bottom: 18px; padding: 18px 20px; border: 1px dashed rgba(251,205,208,.8);
    background: #fffaf6;
}
.composer h4 { color: var(--brown); margin: 0 0 12px; font-size: 15px; }
.composer .form-group input, .composer .form-group textarea { font-size: 14px; }
.vis-row { display: flex; align-items: center; gap: 14px; margin: 10px 0; font-size: 13px; color: #8b6f5a; }
.vis-row label { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.img-preview { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.img-preview .pimg { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; position: relative; flex: 0 0 auto; }
.img-preview .pimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-preview .pimg button {
    position: absolute; top: 2px; right: 2px; border: none; background: rgba(0,0,0,.55);
    color: #fff; border-radius: 50%; width: 18px; height: 18px; font-size: 11px; cursor: pointer; line-height: 1;
}

.visibility-switch { display: flex; gap: 8px; align-items: center; }
.visibility-switch .vs-btn {
    padding: 4px 12px; border-radius: 999px; font-size: 12px; border: 1px solid #eee;
    background: #fff; color: #999; cursor: pointer; transition: all .15s ease;
}
.visibility-switch .vs-btn.active { background: var(--grad-soft); color: var(--brown); border-color: rgba(251,205,208,.9); font-weight: 700; }

.modal-mask {
    position: fixed; inset: 0; background: rgba(80,60,50,.45); z-index: 200;
    display: flex; align-items: center; justify-content: center; padding: 16px;
    backdrop-filter: blur(3px);
}
.modal-box {
    background: #fffdf8; border-radius: 20px; padding: 24px; width: 100%; max-width: 520px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25); animation: popIn .3s ease-out;
}
.modal-box h3 { color: var(--brown); margin: 0 0 14px; }
.modal-close { float: right; border: none; background: none; font-size: 20px; color: #bbb; cursor: pointer; }

/* ---------- 小镇管理后台 ---------- */
.admin-town-wrap { max-width: 1180px; margin: 28px auto; padding: 0 18px; }
.admin-town-card { padding: 22px 24px; margin-bottom: 20px; }
.admin-town-card h2 { color: var(--brown); font-size: 19px; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.admin-town-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 12px; }
.featured-pick {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px;
    border: 1px solid #f0e0da; background: #fff; cursor: pointer; transition: all .15s ease;
}
.featured-pick:hover { border-color: var(--pink-deep); }
.featured-pick input { accent-color: #e57a86; width: 17px; height: 17px; }
.featured-pick .fp-name { font-weight: 700; color: var(--brown); font-size: 14px; }
.featured-pick .fp-sub { font-size: 12px; color: #bbb; }
.featured-pick.selected { background: var(--grad-soft); border-color: var(--pink-deep); }

.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.admin-table th { background: var(--grad-soft); color: var(--brown); text-align: left; padding: 10px 12px; }
.admin-table td { padding: 9px 12px; border-bottom: 1px solid #f5e7e2; color: #6b5544; vertical-align: middle; }
.admin-table tr:hover td { background: #fffaf4; }
.admin-table .del-badge { color: #e8590c; }

.admin-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.admin-tab {
    padding: 8px 18px; border-radius: 999px; border: 1px solid #f0d8d4; background: #fff;
    color: #8b6f5a; font-size: 14px; cursor: pointer; transition: all .18s ease;
}
.admin-tab.active { background: var(--grad-main); color: var(--brown); font-weight: 700; border-color: transparent; }

.sync-note {
    display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #b08f7a;
    background: var(--grad-soft); border-radius: 999px; padding: 4px 12px;
}
.sync-note .stale-dot { width: 8px; height: 8px; border-radius: 50%; background: #2f9e44; animation: glowPulse 2s infinite; }
.sync-note.stale .stale-dot { background: #e8590c; }

.skeleton {
    height: 14px; border-radius: 7px; background: linear-gradient(90deg, #f7e9e5 25%, #fdf3f0 50%, #f7e9e5 75%);
    background-size: 800px 100%; animation: shimmer 1.2s infinite linear;
}

/* 响应式 */
@media (max-width: 720px) {
    .profile-banner { padding: 24px 20px; }
    .town-hero { padding: 22px 20px; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .mock-list { grid-template-columns: 1fr; }
    .qq-auth-card { padding: 26px 20px; }
    .album-grid { grid-template-columns: 1fr; }
    .album-item .album-img-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   小镇投影
   ============================================================ */
.proj-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 14px;
}

.proj-item {
	padding: 16px 18px;
}

.proj-item .proj-head {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.proj-item .proj-title {
	color: var(--brown);
	font-size: 16px;
	font-weight: 800;
	margin-top: 8px;
	word-break: break-word;
}

.proj-item .proj-meta {
	color: #bbb;
	font-size: 12px;
	margin-top: 4px;
}

.proj-item .proj-desc {
	color: #6b5544;
	font-size: 13px;
	line-height: 1.7;
	margin-top: 8px;
	word-break: break-word;
}

.proj-item .proj-pos {
	background: #fff8f2;
	border: 1px dashed #f2d9c4;
	border-radius: 8px;
	color: #9c8b7d;
	display: flex;
	flex-wrap: wrap;
	font-size: 12.5px;
	gap: 4px 12px;
	margin-top: 10px;
	padding: 6px 10px;
}

.proj-modal-box {
	max-height: 92vh;
	overflow-y: auto;
	width: min(520px, 92vw);
}

.proj-coord-row {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(4, 1fr);
}

.proj-coord-row .form-group input {
	width: 100%;
}

.proj-preview-box {
	width: min(760px, 94vw);
}

.proj-preview-info {
	color: #8b6f5a;
	font-size: 13px;
	margin-bottom: 8px;
}

.proj-canvas-box {
	background: linear-gradient(180deg, #fff9f3, #fffdf7);
	border: 1.5px dashed #f2d9c4;
	border-radius: 12px;
	height: 420px;
	overflow: hidden;
	position: relative;
}

.proj-canvas-box canvas {
	cursor: grab;
	display: block;
	height: 100%;
	width: 100%;
}

.proj-loading {
	align-items: center;
	background: rgba(255, 255, 255, .78);
	color: #e57a86;
	display: none;
	font-size: 14px;
	font-weight: 700;
	gap: 8px;
	inset: 0;
	justify-content: center;
	position: absolute;
}
