/* ===== 原型基线 CSS（friend_space_prototype.html 行 22-354，1:1 复刻） ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* 浮动装饰背景 */
.bg-deco {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 0; overflow: hidden;
}
.float-item {
    position: absolute; font-size: 22px; opacity: 0;
    animation: floatUp linear infinite;
}
@keyframes floatUp {
    0%   { opacity: 0; transform: translateY(100vh) rotate(0deg); }
    10%  { opacity: 0.25; }
    90%  { opacity: 0.25; }
    100% { opacity: 0; transform: translateY(-10vh) rotate(360deg); }
}

/* 导航栏 */
.navbar {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 159, 67, 0.12);
    padding: 0 5%;
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
}
.navbar .logo {
    font-size: 22px; font-weight: 800; color: var(--primary);
    text-decoration: none; letter-spacing: -0.5px;
}
.nav-links { display: flex; gap: 6px; }
.nav-links a {
    text-decoration: none; color: var(--text-light);
    padding: 8px 16px; border-radius: 12px;
    font-size: 15px; font-weight: 500;
    transition: all 0.25s;
}
.nav-links a:hover, .nav-links a.active {
    background: var(--primary); color: #fff;
}

/* 页面 */
.page { display: none; padding: 30px 5%; position: relative; z-index: 1; }
.page.active { display: block; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ===== 首页 ===== */
.hero { text-align: center; padding: 30px 0 20px; }
.hero .couple-names {
    font-size: 38px; font-weight: 800; margin-bottom: 10px;
}
.hero .couple-names .badge {
    display: inline-block; font-size: 28px;
    animation: bounce 1.5s ease infinite;
}
@keyframes bounce {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.hero .subtitle { color: var(--text-light); font-size: 16px; margin-bottom: 8px; }
.hero .friend-level {
    display: inline-block; background: linear-gradient(135deg, #feca57, #ff9f43);
    color: #fff; padding: 6px 20px; border-radius: 20px;
    font-size: 14px; font-weight: 700; margin-top: 8px;
    box-shadow: 0 4px 15px rgba(255,159,67,0.3);
}

/* 认识天数 */
.days-card {
    background: linear-gradient(135deg, #ff9f43, #ffbe76);
    border-radius: var(--radius); padding: 40px;
    color: #fff; text-align: center;
    box-shadow: var(--shadow); margin-bottom: 30px;
    position: relative; overflow: hidden;
}
.days-card::before {
    content: '🤝'; position: absolute; font-size: 180px;
    right: -30px; top: -40px; opacity: 0.15;
}
.days-card .days-num { font-size: 64px; font-weight: 900; line-height: 1; }
.days-card .days-label { font-size: 16px; opacity: 0.95; margin-top: 8px; }
.days-card .days-sub { font-size: 14px; opacity: 0.8; margin-top: 4px; }

/* 功能卡片 */
.feature-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px; margin-bottom: 30px;
}
.feature-card {
    padding: 26px 16px; text-align: center; cursor: pointer;
    border: 2px solid transparent;
    text-decoration: none; color: inherit; display: block;
}
.feature-card:hover {
    transform: translateY(-5px); box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}
.feature-card .icon { font-size: 38px; margin-bottom: 10px; }
.feature-card .title { font-weight: 700; font-size: 16px; }
.feature-card .desc { font-size: 12px; color: var(--text-light); margin-top: 4px; }

/* 时间线 */
.section-title {
    font-size: 20px; font-weight: 800; margin: 30px 0 16px;
    display: flex; align-items: center; gap: 8px;
}
.timeline { position: relative; padding-left: 30px; }
.timeline::before {
    content: ''; position: absolute; left: 10px; top: 0; bottom: 0;
    width: 2px; background: linear-gradient(var(--primary-light), transparent);
}
.timeline-item { position: relative; margin-bottom: 20px; }
.timeline-item::before {
    content: ''; position: absolute; left: -24px; top: 6px;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--primary); box-shadow: 0 0 0 4px rgba(255,159,67,0.2);
}
.timeline-item .time { font-size: 13px; color: var(--text-light); margin-bottom: 4px; }
.timeline-item .content {
    border-radius: 14px; padding: 14px 18px;
    font-size: 14px;
}
.timeline-item .content .tag {
    display: inline-block; font-size: 12px; padding: 2px 10px;
    border-radius: 20px; margin-right: 6px; font-weight: 600;
}
.tag-photo { background: #e8f5e9; color: #43a047; }
.tag-post  { background: #e3f2fd; color: #1e88e5; }
.tag-msg   { background: #fff3e0; color: #f57c00; }
.tag-food  { background: #fce4ec; color: #e91e63; }

/* ===== 相册 ===== */
.album-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}
.album-card {
    overflow: hidden; cursor: pointer;
    text-decoration: none; color: inherit; display: block;
}
.album-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.album-cover {
    width: 100%; height: 180px; object-fit: cover; display: block;
}
.album-info { padding: 14px 16px; }
.album-info h3 { font-size: 16px; margin-bottom: 4px; }
.album-info p { font-size: 13px; color: var(--text-light); }

/* 瀑布流 */
.photo-masonry { column-count: 3; column-gap: 16px; }
.photo-item {
    break-inside: avoid; margin-bottom: 16px;
    border-radius: 14px; overflow: hidden;
    position: relative; cursor: pointer;
}
.photo-item .ph {
    width: 100%; display: block; position: relative;
    display: flex; align-items: center; justify-content: center;
    font-size: 44px;
}
.photo-item .caption {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    color: #fff; padding: 24px 12px 10px; font-size: 13px;
    opacity: 0; transition: opacity 0.3s;
}
.photo-item:hover .caption { opacity: 1; }

/* ===== 帖子 ===== */
.post-list { display: flex; flex-direction: column; gap: 16px; }
.post-card {
    padding: 20px 24px;
}
.post-card:hover { box-shadow: var(--shadow-hover); }
.post-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.post-avatar {
    width: 40px; height: 40px;
    font-size: 20px;
}
.post-meta { flex: 1; }
.post-meta .author { font-weight: 700; font-size: 15px; }
.post-meta .date { font-size: 12px; color: var(--text-light); }
.post-mood { font-size: 13px; padding: 4px 12px; border-radius: 20px; font-weight: 600; }
.mood-happy    { background: #fff3e0; color: #f57c00; }
.mood-funny    { background: #fce4ec; color: #e91e63; }
.mood-moved    { background: #ede7f6; color: #7e57c2; }
.mood-complain { background: #fbe9e7; color: #ff5722; }
.mood-chill    { background: #e0f2f1; color: #00897b; }
.mood-hype     { background: #fff9c4; color: #f9a825; }
.post-body { font-size: 15px; line-height: 1.8; }
.post-actions {
    display: flex; gap: 20px; margin-top: 14px;
    padding-top: 14px; border-top: 1px solid rgba(0,0,0,0.05);
    align-items: center; flex-wrap: wrap;
}
.post-actions button {
    font-size: 14px; color: var(--text-light); display: flex; align-items: center; gap: 4px;
    transition: color 0.2s;
}
.post-actions button:hover { color: var(--primary); }

/* ===== 留言板 ===== */
.message-board { max-width: 700px; margin: 0 auto; }
.message-input-area {
    padding: 20px; margin-bottom: 24px;
}
.message-input-area textarea {
    padding: 12px 16px; resize: vertical; min-height: 80px;
    transition: border-color 0.3s;
}
.message-input-area textarea:focus { border-color: var(--primary); }
.emoji-picker { display: flex; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.emoji-picker span {
    cursor: pointer; font-size: 24px; padding: 4px;
    border-radius: 8px; transition: transform 0.2s;
}
.emoji-picker span:hover { transform: scale(1.3); background: #fff3e0; }
.btn-send {
    background: var(--primary); color: #fff; border: none;
    padding: 10px 28px; border-radius: 12px; font-size: 15px;
    font-weight: 600; cursor: pointer; margin-top: 10px;
    transition: background 0.3s; font-family: inherit;
}
.btn-send:hover { background: var(--primary-dark); }

.message-item { display: flex; gap: 12px; margin-bottom: 20px; align-items: flex-start; }
.message-item .msg-avatar {
    width: 44px; height: 44px; font-size: 22px;
}
.message-bubble {
    border-radius: 0 16px 16px 16px;
    padding: 14px 18px; max-width: 75%;
}
.message-bubble .msg-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.message-bubble .msg-author { font-weight: 700; font-size: 14px; }
.message-bubble .msg-time { font-size: 12px; color: var(--text-light); }
.message-bubble .msg-content { font-size: 15px; line-height: 1.6; }
.message-bubble .msg-emoji { font-size: 26px; margin-top: 4px; }

/* ===== 友谊档案 ===== */
.profile-section { margin-bottom: 30px; }
.profile-card {
    padding: 30px;
}
.profile-header { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.profile-avatars { display: flex; align-items: center; }
.profile-avatars .ava {
    width: 70px; height: 70px;
    font-size: 32px; border: 3px solid #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.profile-avatars .ava2 { margin-left: -15px; }
.profile-avatars .link {
    margin: 0 12px; font-size: 24px; color: var(--primary); font-weight: 800;
}
.profile-info h2 { font-size: 22px; font-weight: 800; }
.profile-info p { color: var(--text-light); font-size: 14px; margin-top: 4px; }

.stat-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 14px; margin-bottom: 24px;
}
.stat-card {
    background: var(--bg); border-radius: 14px; padding: 18px;
    text-align: center;
}
.stat-card:hover { background: #fff3e0; transform: scale(1.03); }
.stat-card .num { font-size: 28px; font-weight: 900; color: var(--primary); }
.stat-card .label { font-size: 13px; color: var(--text-light); margin-top: 2px; }

.story-text {
    font-size: 15px; line-height: 1.9; color: var(--text);
    background: var(--bg); border-radius: 14px; padding: 20px 24px;
    border-left: 4px solid var(--primary);
}

/* 按钮 */
.btn {
    padding: 10px 24px; border-radius: 12px; border: none;
    font-size: 15px; font-weight: 600; cursor: pointer;
    transition: all 0.3s; font-family: inherit;
    display: inline-block; text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-outline {
    background: none; border: 2px solid var(--primary);
    color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }

/* 足迹地图 */
.map-placeholder {
    border-radius: var(--radius); padding: 40px; text-align: center;
    min-height: 200px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 12px;
}
.map-placeholder .map-icon { font-size: 48px; }
.map-placeholder p { color: var(--text-light); }

/* 响应式 */
@media (max-width: 768px) {
    .photo-masonry { column-count: 2; }
    .hero .couple-names { font-size: 26px; }
    .days-card .days-num { font-size: 48px; }
    .navbar { padding: 0 16px; }
    .nav-links a { padding: 6px 10px; font-size: 14px; }
    .page { padding: 20px 16px; }
}
@media (max-width: 480px) {
    .photo-masonry { column-count: 1; }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== 生产实现补充（保持原型视觉，不引入模拟逻辑） ===== */
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-logout { display: flex; align-items: center; gap: 6px; margin: 0; }
.nav-logout .nav-hello { font-size: 13px; color: var(--text-light); }
.nav-logout button {
    font-size: 13px; color: var(--text-light);
    padding: 6px 10px; border-radius: 10px; transition: all 0.25s;
}
.nav-logout button:hover { background: var(--primary); color: #fff; }

.page-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; flex-wrap: wrap; gap: 10px;
}
.page-head .section-title { margin: 0; }
.page-desc { color: var(--text-light); margin-bottom: 20px; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.detail-title { font-size: 24px; }
.detail-meta { color: var(--text-light); font-size: 14px; margin-top: 4px; }
.inline-form { display: inline; }
.btn-danger { background: #ff7675; color: #fff; }
.btn-danger:hover { background: #d63031; }
/* 状态样式：权限与可用态（不可用控件） */
.btn-disabled { opacity: var(--state-disabled-opacity, 0.7); cursor: default; }
.btn-disabled:hover { background: var(--primary); transform: none; }

.section-title + .page-desc { margin-top: -8px; }
.section-title:first-child { margin-top: 6px; }

/* 帖子互动区：点赞 / 评论 / 收藏全部服务端持久化，无 DOM 假逻辑 */
.post-actions form.post-action-form { margin: 0; display: inline-flex; }
.post-action-btn.is-active { color: var(--primary-dark); font-weight: 700; }
.post-action-count { font-weight: 600; }
.post-action-hint {
    font-size: 12px; color: var(--text-light); margin-left: auto;
    background: var(--bg); padding: 3px 10px; border-radius: 12px;
}
.post-comments { flex: 0 0 auto; }
.post-comments-summary {
    list-style: none;
    font-size: 14px; color: var(--text-light);
    display: flex; align-items: center; gap: 4px; transition: color 0.2s;
}
.post-comments-summary::-webkit-details-marker { display: none; }
.post-comments-summary:hover { color: var(--primary); }
.post-comments[open] { flex-basis: 100%; order: 10; }
.post-comments[open] .post-comments-summary { color: var(--primary-dark); }
.post-comments-panel {
    margin-top: 12px; padding: 14px;
    background: var(--bg); border-radius: 14px;
}
.post-comment-list { max-height: 260px; overflow-y: auto; }
.post-comment {
    display: flex; align-items: flex-start; gap: 10px; font-size: 13px;
    padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,0.05);
}
.post-comment:last-child { border-bottom: none; }
.post-comment-avatar {
    width: 30px; height: 30px; font-size: 16px;
}
.post-comment-main { flex: 1; min-width: 0; }
.post-comment-meta { display: flex; gap: 10px; align-items: center; }
.post-comment-meta .author { font-weight: 700; }
.post-comment-meta .date { font-size: 11px; color: var(--text-light); }
.post-comment-body { line-height: 1.6; word-break: break-word; }
.post-comment-empty { font-size: 13px; color: var(--text-light); padding: 6px 0; }
.post-comment-delete { margin: 0; align-self: center; }
.post-comment-delete button {
    font-size: 12px; color: var(--text-light); padding: 0;
}
.post-comment-delete button:hover { color: #d63031; }
.post-comment-label {
    display: block; font-size: 12px; color: var(--text-light); margin-top: 12px;
}
.post-comment-label textarea {
    display: block; margin-top: 6px; padding: 10px;
    border: 1px solid rgba(0,0,0,0.08);
    background: var(--card-bg); color: var(--text);
    font-size: 14px; resize: vertical;
}
.post-comment-form .btn { margin-top: 10px; font-size: 13px; }
.post-comment-form .btn-primary { background: var(--primary); color: #fff; }
.post-comment-form .btn-primary:hover { background: var(--primary-dark); }
@media (max-width: 480px) {
    .post-actions { gap: 12px; }
    .post-action-hint { margin-left: 0; }
}
.post-owner-actions {
    display: flex; gap: 14px; align-items: center; margin-top: 10px;
    font-size: 13px;
}
.post-owner-actions a { color: var(--text-light); text-decoration: none; }
.post-owner-actions a:hover { color: var(--primary); }
.post-owner-actions form { margin: 0; }
.post-owner-actions button,
.msg-delete button,
.photo-delete button {
    font-size: 13px; color: var(--text-light); padding: 0;
}
.post-owner-actions button:hover,
.msg-delete button:hover { color: #d63031; }

.photo-delete {
    position: absolute; top: 8px; right: 8px; z-index: 2;
    background: rgba(255, 255, 255, 0.9); border-radius: 10px;
    padding: 4px 8px; opacity: 0; transition: opacity 0.3s;
}
.photo-item:hover .photo-delete { opacity: 1; }
.photo-delete button { color: #d63031; }
.msg-delete { margin-left: auto; align-self: center; }

.empty-state {
    padding: 30px; text-align: center; color: var(--text-light);
}

/* 表单页与登录页 */
.form-card {
    padding: 26px 30px; max-width: 720px;
}
.form-card p { margin-bottom: 14px; }
.form-card label {
    display: inline-block; font-size: 14px; font-weight: 600;
    margin-bottom: 6px;
}
.form-card input[type="text"],
.form-card input[type="date"],
.form-card input[type="password"],
.form-card input[type="file"],
.form-card select,
.form-card textarea {
    transition: border-color 0.3s; background: #fff;
}
.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus { border-color: var(--primary); }
.form-card textarea { resize: vertical; min-height: 90px; }
.form-card .helptext { display: block; font-size: 12px; color: var(--text-light); margin-top: 4px; }
/* 状态样式：表单与反馈态（校验错误） */
.form-error, .errorlist { color: var(--state-error, #d63031); font-size: 13px; list-style: none; }
.form-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.form-hint { color: var(--text-light); font-size: 13px; margin-bottom: 16px; }

.message-input-footer {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 10px;
}
.message-input-footer .hint { font-size: 13px; color: var(--text-light); }
.emoji-extra { margin: 10px 0; }
.emoji-extra label { font-size: 13px; color: var(--text-light); }
.emoji-extra input {
    padding: 8px 12px; font-size: 14px;
}
.emoji-option:focus-visible { outline: 2px solid var(--primary); }

.flash-messages { max-width: 900px; margin: 0 auto 18px; }
.flash {
    border-radius: 12px; padding: 10px 16px; margin-bottom: 8px;
    font-size: 14px; background: #e8f5e9; color: #2e7d32;
}
/* 状态样式：表单与反馈态（flash 错误级别） */
.flash-error { background: var(--state-error-bg, #fbe9e7); color: var(--state-error-text, #c0392b); }

.login-wrap {
    max-width: 420px; margin: 60px auto; padding: 0 16px;
    position: relative; z-index: 1;
}
.login-card {
    padding: 32px; text-align: center;
}
.login-card .login-logo { font-size: 28px; font-weight: 800; color: var(--primary); }
.login-card p { color: var(--text-light); font-size: 14px; margin: 8px 0 20px; }
.login-card label { display: block; text-align: left; font-size: 14px; font-weight: 600; margin: 12px 0 6px; }
.login-card input:focus { border-color: var(--primary); }
.login-card .btn { width: 100%; margin-top: 20px; }

@media (max-width: 768px) {
    .nav-logout .nav-hello { display: none; }
    .nav-links { gap: 2px; }
    .form-card { padding: 20px; }
}
@media (max-width: 480px) {
    .navbar { padding: 0 12px; }
    .navbar .logo { font-size: 16px; white-space: nowrap; flex-shrink: 0; }
    .nav-right { flex: 1; min-width: 0; gap: 4px; }
    .nav-links { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
    .nav-links::-webkit-scrollbar { display: none; }
    .nav-links a { padding: 6px 6px; font-size: 12px; white-space: nowrap; flex: 0 0 auto; }
    .nav-logout { flex-shrink: 0; gap: 2px; }
    .nav-logout button { padding: 4px 6px; font-size: 12px; white-space: nowrap; }
    .message-bubble { max-width: 100%; }
    .post-card { padding: 16px; }
}

/* ===== 用户系统：账号设置 / 注册 / 改密 / 导航 ===== */
.account-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.card-title { font-size: 17px; margin-bottom: 14px; }
.account-identity { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.account-avatar {
    width: 64px; height: 64px;
    font-size: 30px;
}
.account-name { font-weight: 700; font-size: 17px; }
.account-username { color: var(--text-light); font-size: 13px; }
.account-meta {
    list-style: none; color: var(--text-light);
    font-size: 14px; line-height: 2; margin-bottom: 16px;
}
.nav-settings { text-decoration: none; font-size: 14px; padding: 6px 4px; }
.login-card p.login-signup {
    font-size: 13px; margin: 16px 0 0; color: var(--text-light);
}
.login-card p.login-signup a { color: var(--primary); font-weight: 600; }

@media (max-width: 768px) {
    .account-grid { grid-template-columns: 1fr; }
}

/* 可访问性：尊重系统「减少动态效果」设置 */
@media (prefers-reduced-motion: reduce) {
    .float-item { animation: none; display: none; }
    .page.active { animation: none; }
    .hero .couple-names .badge { animation: none; }
    .feature-card, .album-card, .post-card, .stat-card,
    .btn, .btn-send, .nav-links a, .photo-item .caption { transition: none; }
    .feature-card:hover, .album-card:hover, .stat-card:hover,
    .btn-primary:hover { transform: none; }
}

/* ===== S7-2：原生 <dialog> 表单弹窗（无 JS 时按钮仍跳独立表单页） ===== */
.form-dialog {
    width: min(620px, calc(100% - 32px)); max-height: calc(100vh - 48px);
    margin: auto; border: none; padding: 0;
    color: var(--text);
    box-shadow: var(--shadow-hover); overflow: auto;
}
.form-dialog::backdrop { background: rgba(45, 52, 54, 0.45); }
.form-dialog-inner { padding: 24px 28px 28px; }
.form-dialog-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.form-dialog-head .section-title { margin: 0; font-size: 22px; }
.form-dialog-close {
    flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
    background: var(--bg); color: var(--text-light);
    font-size: 16px; transition: all 0.2s;
}
.form-dialog-close:hover { background: var(--primary); color: #fff; }
.form-dialog .form-card {
    padding: 0; max-width: none; background: none; box-shadow: none;
}
.form-dialog .form-hint { margin-top: 8px; }
.form-dialog .form-actions { align-items: center; }
.form-dialog-fallback {
    align-self: center; font-size: 13px; color: var(--text-light);
}
.form-dialog-fallback:hover { color: var(--primary); }
@media (max-width: 480px) {
    .form-dialog-inner { padding: 18px 16px 22px; }
    .form-dialog-head .section-title { font-size: 18px; }
}

/* ===== S7-3：城市足迹地图（零外部依赖，按经纬度投影打点） ===== */
.map-placeholder-actions {
    display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
}
.footprint-section { margin-top: 24px; scroll-margin-top: 80px; }
.footprint-map-canvas {
    position: relative; height: 320px; border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden;
}
.map-pin {
    position: absolute; transform: translate(-50%, -50%);
    font-size: 20px; line-height: 1; padding: 4px;
    background: var(--card-bg); border-radius: 50%;
    box-shadow: var(--shadow); transition: transform 0.2s;
}
.map-pin:hover { transform: translate(-50%, -50%) scale(1.25); }
.footprint-list-title { font-size: 19px; margin-top: 22px; }
.city-list {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px;
}
.city-card {
    display: flex; align-items: flex-start; gap: 10px;
    border-radius: 16px;
    padding: 14px;
}
.city-emoji { font-size: 22px; flex-shrink: 0; }
.city-main { flex: 1; min-width: 0; }
.city-name { font-weight: 700; font-size: 15px; }
.city-date { font-size: 12px; color: var(--text-light); }
.city-note { font-size: 13px; line-height: 1.6; word-break: break-word; }
.city-delete { margin: 0; align-self: center; }
.city-delete button {
    font-size: 12px; color: var(--text-light); padding: 0;
}
.city-delete button:hover { color: #d63031; }
@media (max-width: 480px) {
    .footprint-map-canvas { height: 240px; }
    .city-list { grid-template-columns: 1fr; }
}

/* ===== S12：登录记住密码 + 注册页宽屏双栏（原型无认证页，不改 768/480 断点） ===== */
.login-remember { margin-top: 14px; text-align: left; }
.login-card .login-remember-label {
    display: flex; align-items: center; gap: 8px;
    margin: 0; font-weight: 600;
}
.login-remember input { width: auto; accent-color: var(--primary); }
.login-remember input:focus-visible {
    outline: 2px solid var(--primary); outline-offset: 2px;
}
.login-card p.login-remember-help {
    font-size: 12px; color: var(--text-light); margin: 4px 0 0;
}

/* 注册字段：把 as_field_group() 的「说明 / 错误在控件前」还原为
   标签 → 控件 → 说明 / 错误；data-field 供宽屏网格按行精确定位。 */
.signup-field {
    display: flex; flex-direction: column; text-align: left; margin: 0 0 4px;
}
.signup-field > label { order: 0; }
.signup-field > input,
.signup-field > select,
.signup-field > textarea { order: 1; }
.signup-field > .helptext,
.signup-field > .errorlist { order: 2; }
/* 必填项用统一红色星号标识，不依赖浏览器原生 required 气泡 */
.signup-field--required > label::after {
    content: " *"; color: var(--state-error, #d63031); font-weight: 700;
}
/* 密码规则留在字段内：去项目符号与缩进，文案左边缘与输入框一致 */
[data-field="password1"] > .helptext ul {
    list-style: none; padding-left: 0; margin: 0;
}
