/* ============ 班级网站 前端样式（v1.3 UI 美化版） ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #34A853;
  --primary-dark: #1E8E3E;
  --primary-light: #E6F4EA;
  --primary-soft: #D7EFDC;
  --danger: #E5484D;
  --warning: #F59E0B;
  --text: #1F2937;
  --text-light: #9AA3AF;
  --bg: #F2F4F7;
  --card: #FFFFFF;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 2px 8px rgba(16, 42, 67, .05);
  --shadow-md: 0 6px 18px rgba(16, 42, 67, .08);
  --shadow-lg: 0 12px 32px rgba(16, 42, 67, .12);
}
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg) center/cover no-repeat fixed;
  background-image: var(--bg-image, none);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* 禁止双击/触摸缩放（页面只允许上下滚动） */
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  overflow-x: hidden;
}
/* 个性化背景图：cover 全屏不拉伸 + 半透明白色遮罩保证文字可读（仅登录用户自定义背景时启用） */
body.theme-bg::before {
  content: "";
  position: fixed; inset: 0;
  background: rgba(255, 255, 255, var(--bg-mask, .82));
  pointer-events: none;
  z-index: 0;
}
/* 启用背景图时让主容器透明，背景图+遮罩在全屏透出，滚动时背景固定（body 已设 fixed） */
body.theme-bg .app {
  background: transparent;
}
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; background: none; -webkit-tap-highlight-color: transparent; }
input, textarea, select { font-family: inherit; font-size: 14px; outline: none; -webkit-appearance: none; border-radius: 0; }

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  z-index: 1;
  padding-bottom: 68px;
}

/* ============ 内置 SVG 线性图标 ============ */
svg.i { width: 1em; height: 1em; vertical-align: -0.125em; display: inline-block; flex-shrink: 0; min-width: 1em; min-height: 1em; }

/* 自定义字符/emoji 导航图标 */
.nav-char-icon { font-size: 22px; line-height: 1; display: inline-block; }

/* ============ 顶部班级信息 ============ */
.header {
  background: linear-gradient(135deg, #2E9E5B 0%, #3FBF72 55%, #5BD18A 100%);
  color: #fff;
  padding: 18px 16px 22px;
  position: relative;
  overflow: hidden;
}
.header::after {
  content: "";
  position: absolute; right: -40px; top: -40px;
  width: 140px; height: 140px; border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.header-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.class-id { display: flex; align-items: center; gap: 12px; }
.class-avatar {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: #fff;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,.7);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.class-avatar img { width: 100%; height: 100%; object-fit: cover; }
.class-avatar .ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 26px; color: var(--primary); }
.class-name { font-size: 21px; font-weight: 700; letter-spacing: .5px; }
.class-sub { font-size: 12px; opacity: .85; margin-top: 2px; }
.login-btn {
  background: #fff; color: var(--primary-dark);
  padding: 8px 20px; border-radius: 24px;
  font-size: 14px; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  transition: transform .15s, box-shadow .15s;
}
.login-btn:active { transform: scale(.96); }
.login-btn img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }

/* ============ 轮播图 ============ */
.swiper { position: relative; margin: 14px 12px 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.swiper-track { display: flex; transition: transform .45s ease; }
.swiper-slide { min-width: 100%; position: relative; }
.swiper-slide img { width: 100%; height: 168px; object-fit: cover; }
.swiper-slide .sw-title { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 14px 10px; background: linear-gradient(transparent, rgba(0,0,0,.6)); color: #fff; font-size: 13px; font-weight: 500; }
.swiper-dots { position: absolute; bottom: 10px; right: 14px; display: flex; gap: 5px; }
.swiper-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.5); transition: all .3s; }
.swiper-dots span.active { background: #fff; transform: scale(1.3); }

/* ============ 通用卡片区块 ============ */
.section { margin: 14px 12px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-title h3 { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.section-title h3::before { content: ""; width: 4px; height: 17px; background: linear-gradient(180deg, var(--primary), var(--primary-light)); border-radius: 2px; }
.section-title .more { font-size: 13px; color: var(--text-light); transition: color .15s; }
.section-title .more:hover { color: var(--primary); }

/* ============ 公告 ============ */
.notice-bar { display: flex; align-items: center; gap: 8px; background: #FFF8E6; border: 1px solid #FCE7B8; border-radius: var(--radius-sm); padding: 11px 13px; }
.notice-bar .tag { background: linear-gradient(135deg, #FF9F43, #F77F00); color: #fff; font-size: 11px; padding: 2px 9px; border-radius: 10px; flex-shrink: 0; font-weight: 600; }
.notice-bar .text { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #7C5A00; }
.notice-carousel .notice-item { background: #FFF8E6; border: 1px solid #FCE7B8; border-radius: var(--radius-sm); padding: 13px; margin-bottom: 10px; transition: box-shadow .2s; }
.notice-item h4 { color: #7C5A00; font-size: 14px; margin-bottom: 4px; }
.notice-item p { color: #8d6e2e; font-size: 13px; white-space: pre-wrap; }

/* ============ 功能宫格 ============ */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 10px; }
.grid-item { display: flex; flex-direction: column; align-items: center; gap: 7px; cursor: pointer; }
.grid-item .icon {
  width: 54px; height: 54px; border-radius: 18px;
  background: linear-gradient(145deg, var(--primary-light), #F0FAF2);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; overflow: hidden;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 3px 8px rgba(52,168,83,.10);
}
.grid-item .icon img { width: 100%; height: 100%; object-fit: cover; }
.grid-item:active .icon { transform: scale(.9); }
.grid-item .label { font-size: 12px; color: var(--text); }

/* ============ 新闻列表 ============ */
.news-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #F0F2F5; }
.news-item:last-child { border-bottom: none; }
.news-item .thumb { width: 100px; height: 70px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; background: #F0F2F5; }
.news-item .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.news-item .thumb:hover img { transform: scale(1.05); }
.news-item .thumb .ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #C3C9D2; font-size: 22px; }
.news-item .info { flex: 1; min-width: 0; }
.news-item .title { font-size: 14px; font-weight: 600; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-item .title .top-tag { background: linear-gradient(135deg, #FF6B6B, #E5484D); color: #fff; font-size: 10px; padding: 1px 6px; border-radius: 5px; margin-right: 4px; font-weight: 500; }
.news-item .meta { font-size: 12px; color: var(--text-light); margin-top: 5px; }

/* ============ 底部导航 ============ */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid #EDEFF2;
  display: flex; z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -4px 16px rgba(16,42,67,.05);
}
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 8px 0 6px; font-size: 11px; color: var(--text-light); transition: color .2s; position: relative; }
.tabbar a .tab-icon { font-size: 23px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; transition: transform .18s; }
.tabbar a:active .tab-icon { transform: scale(.88); }
.tabbar a.active { color: var(--primary); font-weight: 600; }
.tabbar a.active::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 24px; height: 3px; border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-soft));
}

/* ============ 社区 ============ */
.post-composer { display: flex; gap: 10px; align-items: flex-start; margin: 14px 12px; }
.post-composer textarea { flex: 1; border: none; background: var(--card); border-radius: var(--radius-sm); padding: 12px 14px; resize: none; height: 62px; box-shadow: var(--shadow); font-size: 14px; }
.post-composer .actions { display: flex; flex-direction: column; gap: 8px; }
.btn-img, .btn-post { border-radius: var(--radius-sm); padding: 9px 13px; font-size: 13px; transition: all .15s; }
.btn-img { background: #EAF3FE; color: #2B6CB0; }
.btn-img:active { background: #D6E7FB; }
.btn-post { background: linear-gradient(135deg, #34A853, #2E9E5B); color: #fff; font-weight: 600; box-shadow: 0 3px 8px rgba(52,168,83,.25); }
.btn-post:active { transform: scale(.95); }
.post-photo-preview { margin: 0 12px 10px; }
.post-photo-preview img { max-height: 120px; border-radius: var(--radius-sm); }

/* ===== 第二批：多图/视频/标签闪光 ===== */
.post-photo-preview { display: flex; flex-wrap: wrap; gap: 8px; }
.post-photo-preview .pp-item { position: relative; width: 76px; height: 76px; border-radius: var(--radius-sm); overflow: hidden; }
.post-photo-preview .pp-item img { width: 100%; height: 100%; object-fit: cover; }
.pp-del { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; line-height: 18px; text-align: center; background: rgba(0,0,0,.55); color: #fff; border-radius: 50%; font-size: 13px; cursor: pointer; }
.post-video-preview { margin: 0 12px 10px; }
.post-video-preview .pv-item { position: relative; display: inline-block; }
.post-video-preview video { max-height: 200px; border-radius: var(--radius-sm); }
.post-images { display: grid; gap: 6px; margin: 10px 0; }
.post-images.g1 { grid-template-columns: 1fr; }
.post-images.g2 { grid-template-columns: 1fr 1fr; }
.post-images.g3 { grid-template-columns: repeat(3, 1fr); }
.post-images .pi { border-radius: var(--radius-sm); overflow: hidden; background: #f2f4f3; aspect-ratio: 1; }
.post-images .pi img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.post-video { margin: 10px 0; }
.post-video video { width: 100%; max-height: 340px; border-radius: var(--radius-sm); background: #000; }
.user-label {
  display: inline-block; vertical-align: middle; margin-right: 5px; padding: 1px 7px;
  font-size: 11px; line-height: 16px; font-weight: 700; color: #fff;
  border-radius: 9px; background: linear-gradient(135deg, #FF6B6B, #FF8E53, #FFC53D, #4ECDC4, #7C4DFF, #FF6B6B);
  background-size: 300% 100%; animation: label-shine 2.2s linear infinite;
  box-shadow: 0 1px 4px rgba(255,107,107,.45); letter-spacing: .5px;
  text-shadow: 0 1px 1px rgba(0,0,0,.25);
}
@keyframes label-shine {
  0% { background-position: 0% 0; }
  100% { background-position: 300% 0; }
}
.label-shine { position: relative; overflow: hidden; }
.label-shine::after {
  content: ''; position: absolute; top: -50%; left: -60%; width: 40%; height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  transform: rotate(20deg); animation: label-glint 2s ease-in-out infinite;
}
@keyframes label-glint {
  0% { left: -60%; }
  60%, 100% { left: 130%; }
}
.uname { display: flex; align-items: center; flex-wrap: wrap; }
.uname-txt { font-weight: 600; color: var(--text); }
.comment-item .user-label { font-size: 10px; padding: 0 6px; line-height: 14px; margin-right: 4px; }
.register-closed-tip { color: #c62828; font-size: 13px; text-align: center; padding: 8px 0; }
.post-card { margin-bottom: 12px; }
.post-head { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.post-head .uavatar { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; background: var(--primary-light); flex-shrink: 0; }
.post-head .uavatar img { width: 100%; height: 100%; object-fit: cover; }
.post-head .uavatar .ph { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--primary); font-weight: 600; }
.post-head .uname { font-weight: 600; font-size: 14px; }
.post-head .utime { font-size: 12px; color: var(--text-light); }
.post-content { white-space: pre-wrap; margin-bottom: 10px; }
.post-image { border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 10px; }
.post-image img { width: 100%; max-height: 320px; object-fit: cover; }
.post-actions { display: flex; gap: 24px; border-top: 1px solid #F0F2F5; padding-top: 10px; }
.post-actions button { color: var(--text-light); font-size: 13px; display: flex; align-items: center; gap: 4px; transition: color .15s; }
.post-actions button:active { transform: scale(.94); }
.post-actions button.liked { color: #E5484D; }
.comment-list { margin-top: 12px; background: #F8F9FB; border-radius: var(--radius-sm); padding: 10px 12px; }
.comment-item { padding: 7px 0; border-bottom: 1px dashed #E8EBF0; font-size: 13px; }
.comment-item:last-child { border-bottom: none; }
.comment-item .c-name { color: var(--primary-dark); font-weight: 600; margin-right: 6px; }
.comment-item .c-replyto { color: var(--text-light); }
.comment-item .c-content { color: var(--text); }
.comment-item .c-meta { font-size: 11px; color: var(--text-light); margin-top: 2px; }
.comment-item .c-ops { float: right; }
.comment-item .c-ops button { color: var(--text-light); font-size: 11px; }
.comment-item .c-ops button.reply { color: var(--primary-dark); margin-right: 6px; }
.comment-box { display: flex; gap: 6px; margin-top: 10px; }
.comment-box input { flex: 1; border: 1px solid #E4E8EE; border-radius: 18px; padding: 7px 14px; background: #fff; }
.comment-box input:focus { border-color: var(--primary); }
.comment-box button { background: var(--primary); color: #fff; border-radius: 18px; padding: 7px 16px; font-size: 13px; }

/* ============ 我的 ============ */
.profile-head { text-align: center; padding: 30px 16px 26px; background: linear-gradient(160deg, #2E9E5B 0%, #3FBF72 60%, #5BD18A 100%); color: #fff; position: relative; overflow: hidden; }
.profile-head::before { content: ""; position: absolute; left: -30px; bottom: -60px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,.06); }
.profile-avatar { width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 12px; overflow: hidden; background: #fff; border: 3px solid rgba(255,255,255,.75); box-shadow: 0 6px 16px rgba(0,0,0,.15); position: relative; z-index: 1; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar .ph { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 38px; color: var(--primary); font-weight: 600; }
.profile-name { font-size: 20px; font-weight: 700; position: relative; z-index: 1; }
.profile-role { font-size: 12px; opacity: .9; margin-top: 3px; position: relative; z-index: 1; }
.menu-list { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.menu-item { display: flex; align-items: center; gap: 11px; padding: 14px 15px; border-bottom: 1px solid #F5F6F8; transition: background .15s; }
.menu-item:active { background: #F8F9FB; }
.menu-item:last-child { border-bottom: none; }
.menu-item .m-icon { font-size: 20px; color: var(--primary); }
.menu-item .m-text { flex: 1; }
.menu-item .m-arrow { color: #D3D8E0; font-size: 16px; }

/* ============ 表单 ============ */
.form-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 16px; margin: 14px 12px; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 13px; color: var(--text-light); margin-bottom: 7px; font-weight: 500; }
.form-group input[type=text], .form-group input[type=password], .form-group input[type=number], .form-group input[type=date], .form-group select, .form-group textarea {
  width: 100%; border: 1px solid #E4E8EE; border-radius: var(--radius-sm); padding: 10px 13px; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(52,168,83,.12); }
.form-group textarea { resize: vertical; min-height: 84px; }
.form-submit { width: 100%; background: linear-gradient(135deg, #34A853, #2E9E5B); color: #fff; border-radius: var(--radius-sm); padding: 12px; font-size: 15px; font-weight: 600; box-shadow: 0 4px 12px rgba(52,168,83,.22); transition: transform .15s; }
.form-submit:active { transform: scale(.98); }

/* ============ 按钮/标签 ============ */
.btn { display: inline-block; border-radius: var(--radius-sm); padding: 9px 20px; font-size: 14px; transition: all .15s; }
.btn-primary { background: linear-gradient(135deg, #34A853, #2E9E5B); color: #fff; box-shadow: 0 3px 8px rgba(52,168,83,.2); }
.btn-primary:active { transform: scale(.96); }
.btn-danger { background: linear-gradient(135deg, #FF6B6B, #E5484D); color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 8px; }
.tag { display: inline-block; background: #EAF3FE; color: #2B6CB0; border-radius: 5px; padding: 2px 7px; font-size: 11px; }
.tag-gray { background: #F0F2F5; color: #6B7280; }
.tag-orange { background: #FFF3E0; color: #E65100; }

/* ============ 通用工具 ============ */
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mb8 { margin-bottom: 8px; }
.text-center { text-align: center; }
.empty { text-align: center; color: #B4BAC4; padding: 34px 0; font-size: 13px; }
.empty::before {
  content: ""; display: block; width: 46px; height: 46px; margin: 0 auto 10px;
  border-radius: 50%; background: #F0F2F5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B4BAC4' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 1 1-9-9'/%3E%3Cpolyline points='21 4 12 13'/%3E%3C/svg%3E") center/22px no-repeat;
}
/* 加载状态 */
.loading { text-align: center; color: var(--text-light); padding: 26px 0; font-size: 13px; }
.spinner {
  display: inline-block; width: 18px; height: 18px; border: 2px solid #E4E8EE; border-top-color: var(--primary);
  border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -3px; margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed; top: 64px; left: 50%; transform: translateX(-50%);
  background: rgba(17,24,39,.82); color: #fff; padding: 10px 22px; border-radius: 22px;
  font-size: 13px; z-index: 999; opacity: 0; transition: opacity .3s; pointer-events: none;
  max-width: 82%; white-space: nowrap; backdrop-filter: blur(6px);
}
.toast.show { opacity: 1; }

/* ============ 登录/注册弹窗 ============ */
.modal-mask { position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 200; display: none; align-items: center; justify-content: center; backdrop-filter: blur(3px); }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 18px; width: 90%; max-width: 380px; padding: 24px 22px 20px; position: relative; box-shadow: var(--shadow-lg); animation: modalIn .22s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.modal h3 { text-align: center; margin-bottom: 18px; font-size: 18px; }
.modal-close { position: absolute; top: 12px; right: 16px; font-size: 20px; color: #9AA3AF; }
.modal-tabs { display: flex; margin-bottom: 16px; border-bottom: 2px solid #EEF0F3; }
.modal-tabs span { flex: 1; text-align: center; padding: 9px 0; cursor: pointer; color: var(--text-light); font-size: 14px; transition: color .15s; }
.modal-tabs span.active { color: var(--primary); border-bottom: 2px solid var(--primary); margin-bottom: -2px; font-weight: 600; }

/* ============ 功能模块页 ============ */
.module-banner { background: linear-gradient(150deg, #2E9E5B 0%, #3FBF72 60%, #5BD18A 100%); color: #fff; padding: 24px 18px 22px; position: relative; overflow: hidden; }
.module-banner::after { content: ""; position: absolute; right: -30px; top: -40px; width: 130px; height: 130px; border-radius: 50%; background: rgba(255,255,255,.08); }
.module-banner h2 { font-size: 21px; position: relative; z-index: 1; }
.module-banner p { font-size: 13px; opacity: .9; margin-top: 4px; position: relative; z-index: 1; }
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data-table th, table.data-table td { border: 1px solid #EDEFF2; padding: 9px 11px; text-align: left; }
table.data-table th { background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.chip { display: inline-block; background: var(--primary-light); color: #1E8E3E; border-radius: 16px; padding: 4px 13px; font-size: 12px; margin: 3px; }
.chip-gray { background: #F0F2F5; color: #6B7280; }
.detail-text { white-space: pre-wrap; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; background: #EAF3FE; color: #2B6CB0; border-radius: 9px; padding: 7px 13px; margin: 4px; font-size: 13px; }
.album-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.album-grid .photo { border-radius: var(--radius-sm); overflow: hidden; position: relative; aspect-ratio: 1; box-shadow: var(--shadow); }
.album-grid .photo img { width: 100%; height: 100%; object-fit: cover; }
.album-grid .photo .ptitle { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.45); color: #fff; font-size: 11px; padding: 3px 7px; }
.option-bar { height: 9px; border-radius: 5px; background: #EAF0EC; overflow: hidden; }
.option-bar .fill { height: 100%; background: linear-gradient(90deg, var(--primary), #5BD18A); border-radius: 5px; }

/* ============ v2.1 第三批：UI 打磨 / 禁止缩放 / 我的页导航化 / 删帖 ============ */
.tabbar a .tab-icon { font-size: 23px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; transition: transform .18s; }
.tabbar a.active .tab-icon { transform: translateY(-1px) scale(1.08); }
.tabbar a.active { color: var(--primary); font-weight: 600; }

/* 社区发帖框 */
.post-composer textarea { box-shadow: var(--shadow); transition: box-shadow .2s, border-color .2s; }
.post-composer textarea:focus { box-shadow: 0 0 0 3px rgba(52,168,83,.10), var(--shadow); }
.btn-img { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }

/* 帖子卡片 */
.post-card { transition: box-shadow .2s; }
.post-card:active { box-shadow: var(--shadow-md); }
.post-actions button { padding: 6px 10px; border-radius: 16px; transition: background .15s, color .15s, transform .15s; }
.post-actions button:active { background: #F0F2F5; transform: scale(.94); }
.post-actions button.del-post { color: var(--danger); }
.post-actions button.del-post:active { background: #FDEBEC; }

/* 署名：标签-昵称（标签徽章 + 连字符 + 昵称） */
.uname-txt .label-sep { color: var(--text-light); margin: 0 2px; }
.comment-item .c-name { display: inline; }

/* 「我的」页导航化：子面板 + 返回栏 */
.profile-panel { display: none; animation: panelIn .2s ease; }
.profile-panel.show { display: block; }
@keyframes panelIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.panel-bar {
  display: flex; align-items: center; gap: 10px; padding: 14px 12px 6px;
  color: var(--text);
}
.panel-bar .panel-back {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; background: var(--card);
  box-shadow: var(--shadow); color: var(--text); font-size: 18px; transition: transform .15s;
}
.panel-bar .panel-back:active { transform: scale(.9); }
.panel-bar .panel-title { font-size: 16px; font-weight: 700; }
.panel-card { margin: 8px 12px; }
.menu-item .m-icon {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: #B7E3C1; color: #fff;
  font-size: 18px; transition: background .15s;
}
.menu-item:active .m-icon { background: #9AD6A8; }
.menu-item .m-arrow { font-size: 16px; color: #D3D8E0; }
.menu-item.logout .m-icon { background: #FDEBEC; color: var(--danger); }

/* ===== 社区 UI 重排（背景色不变） ===== */
.post-composer {
  display: block;
  margin: 12px;
  padding: 12px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.post-composer textarea {
  display: block;
  width: 100%;
  min-height: 72px;
  border: 1px solid #E8EBF0;
  border-radius: 10px;
  background: #FAFBFD;
  padding: 10px 12px;
  font-size: 14px;
  box-sizing: border-box;
  transition: box-shadow .2s, border-color .2s, background .2s;
}
.post-composer textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(52,168,83,.10);
}
.post-toolbar { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.tool-left { display: flex; gap: 8px; }
.btn-img {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #F0F7F2; color: var(--primary); border-radius: 10px;
  transition: background .15s, transform .15s;
}
.btn-img:active { background: #E0EEE5; transform: scale(.94); }
.btn-post {
  min-width: 92px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #34A853, #2E9E5B);
  color: #fff; border-radius: 22px; font-weight: 600; font-size: 14px;
  box-shadow: 0 3px 8px rgba(52,168,83,.25);
  transition: transform .15s, opacity .2s;
}
.btn-post:active { transform: scale(.96); }
.btn-post:disabled { opacity: .6; }
.post-photo-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.post-photo-preview .pp-item {
  position: relative; width: 76px; height: 76px;
  border-radius: 10px; overflow: hidden;
}
.post-photo-preview .pp-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-del {
  position: absolute; top: 4px; right: 4px;
  width: 20px; height: 20px; line-height: 18px; text-align: center;
  background: rgba(0,0,0,.55); color: #fff; border-radius: 50%;
  font-size: 13px; cursor: pointer; z-index: 2;
}
.post-video-preview { margin-top: 10px; }
.post-video-preview .pv-item { position: relative; display: inline-block; }
.post-video-preview video { max-height: 200px; border-radius: 10px; }
.post-sortbar {
  display: flex; align-items: center; justify-content: space-between;
  margin: 6px 12px 8px; padding: 6px 4px;
}
.sort-title { font-size: 15px; font-weight: 700; color: var(--text); }
.sort-tabs { display: inline-flex; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 3px; }
.sort-tab {
  border: none; background: transparent; padding: 5px 16px;
  font-size: 13px; color: var(--text-light); border-radius: 14px;
  transition: all .18s;
}
.sort-tab.active { background: var(--primary); color: #fff; font-weight: 600; }

/* ===== 「我的」独立子界面 ===== */
.sub-page { animation: panelIn .2s ease; }
.panel-bar { position: sticky; top: 0; z-index: 20; background: var(--page); }
.panel-add {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--primary); color: #fff;
  border-radius: 16px; padding: 7px 14px; font-size: 13px; font-weight: 600;
  box-shadow: 0 2px 6px rgba(52,168,83,.25);
}
.panel-add:active { transform: scale(.95); }
.btn-plain {
  width: 100%; margin-top: 10px;
  background: #F2F4F7; color: var(--text); box-shadow: none;
}
.btn-plain:active { background: #E5E8EE; }
.theme-color-row { display: flex; align-items: center; gap: 10px; }
.color-swatch {
  width: 52px; height: 36px; border-radius: 8px; padding: 0;
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2);
  cursor: pointer; position: relative; flex-shrink: 0;
}
.color-swatch::after {
  content: ""; position: absolute; inset: 0; border-radius: 6px;
  border: 1px solid rgba(0,0,0,.1); pointer-events: none;
}
.color-swatch:active { transform: scale(.94); }

/* ===== 自定义取色盘（PC / 手机通用） ===== */
.color-pop { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.cp-mask { position: absolute; inset: 0; background: rgba(0,0,0,.42); }
.cp-panel {
  position: relative; width: 300px; max-width: 88vw; max-height: 86vh; overflow-y: auto;
  background: #fff; border-radius: 14px; padding: 16px; box-sizing: border-box;
  box-shadow: 0 12px 40px rgba(0,0,0,.28);
}
.cp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cp-title { font-size: 15px; font-weight: 600; color: #1F2937; }
.cp-close { font-size: 18px; color: #9CA3AF; padding: 4px; line-height: 1; }
.cp-preview-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cp-preview { width: 42px; height: 32px; border-radius: 8px; border: 1px solid #E5E7EB; flex-shrink: 0; }
.cp-hex {
  flex: 1; border: 1px solid #E4E8EE; border-radius: 8px; padding: 7px 10px;
  font-size: 13px; text-transform: uppercase; background: #fff;
}
.cp-sv-wrap {
  position: relative; width: 100%; height: 150px; border-radius: 10px; overflow: hidden;
  touch-action: none; cursor: crosshair; margin-bottom: 12px;
  background: #f0f0f0;
}
.cp-sv { width: 100%; height: 100%; display: block; touch-action: none; }
.cp-sv-dot {
  position: absolute; width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.35);
  transform: translate(-50%, -50%); pointer-events: none;
}
.cp-hue-wrap {
  position: relative; height: 18px; border-radius: 9px; margin-bottom: 14px;
  touch-action: none; cursor: pointer;
  background: linear-gradient(90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
}
.cp-hue-dot {
  position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.35);
  transform: translate(-50%, -50%); pointer-events: none;
}
.cp-swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; margin-bottom: 14px; }
.cp-swatch {
  width: 100%; aspect-ratio: 1 / 1; border-radius: 8px; padding: 0;
  border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15); cursor: pointer;
}
.cp-swatch:active { transform: scale(.92); }
.cp-foot { display: flex; gap: 10px; }
.cp-btn { flex: 1; padding: 9px 0; border-radius: 8px; font-size: 14px; font-weight: 600; }
.cp-cancel { background: #F3F4F6; color: #4B5563; }
.cp-ok { background: var(--primary, #34A853); color: #fff; }
.theme-color-tip { font-size: 12px; color: var(--text-light); }
.theme-note {
  margin-top: 12px; padding: 10px 12px;
  background: #FFF8E6; border-radius: 8px;
  color: #8A6D1A; font-size: 12px; line-height: 1.6;
}
.mt8 { margin-top: 8px; }

/* ===== 我的记事本 ===== */
.notebook-wrap { margin: 8px 12px; }
.notebook-editor { margin: 0 0 14px; }
.notebook-list { display: flex; flex-direction: column; gap: 10px; }
.nb-item {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 13px 14px;
  border-left: 3px solid var(--primary);
}
.nb-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.nb-title { font-size: 15px; font-weight: 700; color: var(--text); }
.nb-time { font-size: 12px; color: var(--text-light); }
.nb-content { font-size: 14px; color: var(--text); line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.nb-ops { display: flex; gap: 8px; margin-top: 10px; }
.nb-ops button {
  border: none; background: var(--primary-light); color: var(--primary-dark);
  padding: 6px 14px; border-radius: 14px; font-size: 13px;
}
.nb-ops button.nb-del { background: #FDEBEC; color: var(--danger); }
.nb-empty { text-align: center; color: var(--text-light); font-size: 13px; padding: 30px 10px; }
.nb-actions { display: flex; gap: 10px; }
