/* ============================================================
   shared.css — D7 VersaHub demo · cross-page styles
   All component styles shared across index, confirm, teacher,
   settings, and tuition pages.
   ============================================================ */

/* ── CSS variables ──────────────────────────────────────── */
/* RT-10453: 引入完整 design token 体系
   - 主色 shade ramp (RI-08): primary-dark / primary-muted
   - shadow scale (RI-10): sm/md/lg/xl
   - transition scale (RI-14): 收窄到 fast/base/slow 三档
   - focus ring token (RI-12)
   - 语义化 tag 色板 (RI-09): info / success / warning / danger / neutral
*/
:root {
  --primary: #2D4A32;
  --primary-light: #C8D8CA;
  --primary-dark: #1F3522;     /* hover/pressed 加深 */
  --primary-muted: #6B7F6F;    /* 次级文本/弱化主色 */
  --accent: #E8913A;
  --accent-light: #FFF3E6;
  --bg: #F7F5F2;
  --card: #FFFFFF;
  --text: #2D2D2D;
  --text-secondary: #6B7280;
  --border: #E5E7EB;
  --danger: #DC4F4F;
  --success: #3AA06E;
  --radius: 12px;
  /* shadow scale */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 14px rgba(0,0,0,0.10);
  --shadow-xl: 0 8px 28px rgba(0,0,0,0.18);
  --shadow: var(--shadow-md);  /* 兼容旧引用 */
  /* transition scale (3 tier) */
  --t-fast: 0.15s;
  --t-base: 0.2s;
  --t-slow: 0.3s;
  /* focus ring */
  --focus-ring: 0 0 0 3px rgba(45, 74, 50, 0.35);
  /* 语义 tag 色 (4 semantic + neutral fallback) */
  --tag-info-bg: #DBEAFE;     --tag-info-fg: #1E40AF;
  --tag-success-bg: #D1FAE5;  --tag-success-fg: #065F46;
  --tag-warning-bg: #FEF3C7;  --tag-warning-fg: #92400E;
  --tag-danger-bg: #FEE2E2;   --tag-danger-fg: #991B1B;
  --tag-neutral-bg: #F3F4F6;  --tag-neutral-fg: #4B5563;
  --nav-height: 64px;
}

/* ── Global focus ring (RT-10453 RI-12) ──────────────────── */
:focus { outline: none; }
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 8px;
}

/* ── Reset ──────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* ── Base body ──────────────────────────────────────────── */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  max-width: 480px;
  margin: 0 auto;
  -webkit-font-smoothing: antialiased;
}
/* CJK fonts injected by shared.js when lang=zh */
body.lang-zh {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB',
               'Microsoft YaHei', 'Segoe UI', Roboto, sans-serif;
}

/* ── Responsive breakpoints ─────────────────────────────── */
/* ≤360dp: full-width + narrower padding */
@media (max-width: 360px) {
  body { max-width: 100%; }
  .tab-page { padding-left: 12px; padding-right: 12px; }
  .content { padding-left: 12px; padding-right: 12px; }
}
/* 768dp+: 600px container */
@media (min-width: 768px) {
  body { max-width: 600px; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
  .photo-grid { grid-template-columns: repeat(4, 1fr); }
}
/* 1024dp+: 720px container */
@media (min-width: 1024px) { body { max-width: 720px; } }

/* Foldable hinge safe area */
@supports (padding: env(safe-area-inset-left)) {
  body {
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
  }
}

/* ── App header ─────────────────────────────────────────── */
.app-header {
  background: var(--primary);
  color: white;
  padding: 20px 20px 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
}
.app-header .header-brand { flex: 1; min-width: 0; }
.app-header .logo { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; }
.app-header .logo span { color: #8BAF91; }
/* RT-10453 RI-07: subtitle 降权 — 13→12px, opacity 0.8→0.62, margin 2→1px */
.app-header .subtitle { font-size: 12px; font-weight: 400; opacity: 0.62; margin-top: 1px; letter-spacing: 0.1px; }
/* RT-10451 AC7: 设置按钮降权 — 缩小 + 降低不透明度 */
.app-header .header-settings-btn {
  background: rgba(255,255,255,0.08);
  border: none;
  color: rgba(255,255,255,0.75);
  width: 32px; height: 32px;
  border-radius: 999px;
  font-size: 15px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  text-decoration: none;
  line-height: 1;
}
.app-header .header-settings-btn:hover,
.app-header .header-settings-btn:active {
  background: rgba(255,255,255,0.20);
  color: white;
}

.app-header .header-auth { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.header-avatar {
  width: 36px; height: 36px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  text-decoration: none;
  flex-shrink: 0;
}
.header-avatar.guest { background: rgba(255,255,255,0.25); font-size: 18px; }
.header-avatar:hover { opacity: 0.88; }

.header-login-btn {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: rgba(255,255,255,0.18);
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.header-login-btn:hover { background: rgba(255,255,255,0.28); }

/* ── Language-scoped visibility ──────────────────────────── */
body.lang-zh [data-lang-only="en"] { display: none !important; }
body.lang-en [data-lang-only="zh"] { display: none !important; }

/* ── Section title ───────────────────────────────────────── */
/* RT-10451 AC1/AC8: 字体权重 700→600 与 :first-child 收紧上间距 */
.section-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin: 20px 0 12px;
}
.section-title:first-child { margin-top: 4px; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

/* ── Tab pages ──────────────────────────────────────────── */
.tab-page { display: none; padding: 16px 16px 0; }
.tab-page.active { display: block; }

/* ── Greeting ───────────────────────────────────────────── */
/* RT-10453 RI-05: greeting 视觉降级 — 去掉 gradient, 改为纯色背景 + 更轻的左边条
   保留 26px bold 维持仪式感, 但去掉 4px 主色实心边条与渐变 */
.greeting-card {
  background: var(--card);
  border-left: 3px solid var(--primary-light);
  padding: 16px;
}
.greeting { font-size: 26px; font-weight: 700; color: var(--primary); letter-spacing: -0.3px; }
.greeting-date { font-size: 13px; color: var(--text-secondary); margin-top: 4px; font-weight: 500; }

/* ── Action cards ───────────────────────────────────────── */
.action-card { display: flex; align-items: center; gap: 12px; }
.action-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.action-icon.urgent { background: #FDEAEA; }
.action-icon.pending { background: var(--accent-light); }
.action-icon.info { background: #E6F0FF; }
.action-body { flex: 1; min-width: 0; }
.action-body h4 { font-size: 15px; font-weight: 500; }
.action-body p { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
/* RT-10453 RI-11/RI-13: action-btn 加 hover + min-height 44px 触控达标 */
/* RT-10452 LS-01: 10→8 收敛到 8/16 标准 scale (min-height 44 兜底触控) */
.action-btn {
  background: var(--primary); color: white; border: none;
  border-radius: 8px; padding: 8px 16px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  white-space: nowrap; min-height: 44px;
  transition: background var(--t-base), opacity var(--t-base);
}
.action-btn:hover { background: var(--primary-dark); }
.action-btn:active { opacity: 0.85; }
.action-btn.secondary { background: var(--primary-light); color: var(--primary); }
.action-btn.secondary:hover { background: #B7CCBA; }

/* RT-10390 AC1 / RT-10453 RI-06: urgent-alert P1 专属强化
   - 边框由 1px #FED7AA 升至 1.5px var(--accent)
   - 顶部条 4→6px + 左侧 3px 主色 accent 实心边条 (双轴强调)
   - 增加 shadow-lg + accent 微染色光环, 与普通 action-card 拉开层级 */
.card.action-card.urgent-alert {
  position: relative; background: #FFF7ED;
  border: 1.5px solid var(--accent);
  border-left-width: 4px;
  /* RT-10452 LS-03: 18→16 卡片 padding 对齐 */
  padding-top: 16px; overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(232, 145, 58, 0.10);
}
.card.action-card.urgent-alert::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 6px; background: var(--accent);
}
.card.action-card.urgent-alert .action-icon.urgent { background: #FED7AA; color: #9A3412; }
.card.action-card.urgent-alert .action-body h4 {
  font-weight: 600;
}
.card.action-card.urgent-alert .action-body h4::before {
  content: '⚠️ '; font-size: 14px; margin-right: 2px;
}
/* P1 专属小标识: 在描述行前加微型语义徽章 */
.card.action-card.urgent-alert .action-body p::before {
  content: 'P1';
  display: inline-block;
  font-size: 10px; font-weight: 700; letter-spacing: 0.4px;
  color: white; background: var(--accent);
  padding: 1px 6px; border-radius: 999px;
  margin-right: 6px; vertical-align: 1px;
}
.card.action-card.urgent-alert .action-btn {
  background: var(--accent);
}
.card.action-card.urgent-alert .action-btn:hover {
  background: #C9762A;
}

/* RT-10390 AC2: time tier headers */
/* RT-10451 AC1: 字体权重 700→600 — 与 section-title 形成梯度 */
.time-tier-header {
  display: flex; align-items: center; gap: 8px;
  margin: 16px 0 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.4px;
  color: var(--text-secondary); text-transform: uppercase;
}
.time-tier-header::before, .time-tier-header::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.time-tier-header.tier-today { color: #B45309; }
.time-tier-header.tier-today::before, .time-tier-header.tier-today::after { background: #FDE68A; }

/* ── RT-10406: Empty states ──────────────────────────────── */
.empty-state {
  text-align: center; padding: 48px 24px 32px;
  margin: 8px 4px 16px;
  background: var(--bg-card, #fff);
  border: 1px dashed var(--border, #E2E8F0);
  border-radius: 12px; color: var(--text-secondary, #64748B);
}
/* RT-10452 LS-05: 12→8 sub-item 间距 (icon→title) */
.empty-state .empty-icon { font-size: 40px; line-height: 1; display: block; margin-bottom: 8px; filter: grayscale(0.15); }
/* RT-10451 AC1: empty-title 字体权重 600→500 — 让 hint 不与标题抢视觉权重 */
.empty-state .empty-title { font-size: 15px; font-weight: 500; color: var(--text-primary, #0F172A); margin: 0 0 8px; }
.empty-state .empty-hint { font-size: 13px; line-height: 1.5; margin: 0 auto 16px; max-width: 280px; }
/* RT-10453 RI-11/RI-13: empty-cta hover + min-height 44px */
/* RT-10452 LS-02: 11→12 收敛到标准 scale (4/8/12/16/20...) */
.empty-state .empty-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 20px; border-radius: 999px; border: none;
  background: var(--primary, #2F6F8C); color: #fff;
  font-size: 13px; font-weight: 600; font-family: inherit;
  cursor: pointer; min-height: 44px;
  transition: background var(--t-base), opacity var(--t-base);
}
.empty-state .empty-cta:hover { background: var(--primary-dark); }
.empty-state .empty-cta.secondary {
  background: transparent; color: var(--primary, #2F6F8C); border: 1px solid var(--primary, #2F6F8C);
}
.empty-state .empty-cta.secondary:hover { background: var(--primary-light); }
.empty-state .empty-cta:active { opacity: 0.85; }

/* ── Event mini (home tab "coming up") ───────────────────── */
.event-mini { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--border); }
.event-mini:last-child { border-bottom: none; }
.event-date-block { text-align: center; min-width: 44px; }
.event-date-block .day { font-size: 20px; font-weight: 700; color: var(--primary); }
.event-date-block .month { font-size: 11px; color: var(--text-secondary); text-transform: uppercase; }
.event-info h4 { font-size: 14px; font-weight: 500; }
.event-info p { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

/* ── Homework ────────────────────────────────────────────── */
.hw-card { display: flex; align-items: center; gap: 12px; }
.hw-subject {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: white; flex-shrink: 0;
}
.hw-subject.math { background: #6366F1; }
.hw-subject.eng  { background: #EC4899; }
.hw-subject.sci  { background: #14B8A6; }
.hw-subject.hist { background: #F59E0B; }
.hw-subject.art  { background: #8B5CF6; }
.hw-body { flex: 1; min-width: 0; }
.hw-body h4 { font-size: 15px; font-weight: 600; }
.hw-body .hw-desc { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.hw-body .hw-due { font-size: 12px; color: var(--danger); font-weight: 600; margin-top: 4px; }
.hw-body .hw-due.ok { color: var(--text-secondary); }
.hw-actions { display: flex; gap: 8px; flex-shrink: 0; }
/* RT-10453 RI-11/RI-13: hw-btn hover + min-height 44px */
.hw-btn {
  width: 44px; height: 44px; min-height: 44px; border-radius: 8px;
  border: 1.5px solid var(--border); background: white;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 16px;
  transition: background var(--t-base), border-color var(--t-base), color var(--t-base);
}
.hw-btn:hover { background: #F9FAFB; border-color: #D1D5DB; }
.hw-btn:active { background: var(--primary-light); }
.hw-btn.done { background: var(--success); border-color: var(--success); color: white; }
.hw-btn.reminder-set { background: #FFEAA7; border-color: #F5C518; color: #7A6200; }
.card.acknowledged { opacity: 0.55; }
.card.acknowledged .hw-body h4 { text-decoration: line-through; }

/* RT-10403: Overdue homework collapsible group */
.hw-section-collapsible { margin-top: 12px; margin-bottom: 4px; }
.hw-section-header {
  display: flex; align-items: center; gap: 8px;
  width: 100%; background: #FFF7ED; border: 1px solid #FED7AA;
  border-radius: 12px; padding: 12px;
  font-family: inherit; cursor: pointer; text-align: left; min-height: 40px;
}
.hw-section-header .hw-section-icon { font-size: 14px; }
.hw-section-header .hw-section-label { color: #9A3412; font-size: 14px; font-weight: 600; }
.hw-section-header .hw-section-meta { flex: 1; font-size: 12px; font-weight: 500; color: #C2410C; }
.hw-section-header .fold-indicator { font-size: 10px; color: #9A3412; transition: transform var(--t-fast); }
.hw-section-collapsible.folded .fold-indicator { transform: rotate(-90deg); }
.hw-section-collapsible.folded .hw-section-body { display: none; }
.hw-section-body { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.hw-card.expired { border-left: 3px solid var(--danger); background: #FEF6F6; opacity: 1; }
.hw-card.expired .hw-body h4 { color: var(--text); text-decoration: none; }
.hw-card.expired .hw-due { color: var(--danger); }
.hw-overdue-tag {
  display: inline-block; margin-left: 6px;
  padding: 1px 6px; background: var(--danger); color: white;
  font-size: 10px; font-weight: 700; border-radius: 4px; vertical-align: middle;
}

/* ── Calendar ────────────────────────────────────────────── */
.view-toggle {
  display: flex; background: var(--border); border-radius: 12px; padding: 4px; margin-bottom: 16px;
}
/* RT-10453 RI-10/RI-11/RI-13: view-toggle 走 shadow token + hover + min-height */
/* RT-10452 LS-01: 10→8 收敛 (min-height 44 兜底) */
.view-toggle button {
  flex: 1; border: none; background: transparent; padding: 8px 8px; border-radius: 8px;
  font-size: 14px; font-weight: 600; color: var(--text-secondary); cursor: pointer;
  min-height: 44px;
  transition: background var(--t-fast), color var(--t-fast);
}
.view-toggle button:hover { color: var(--text); }
.view-toggle button.active { background: white; color: var(--text); box-shadow: var(--shadow-sm); }
/* RT-10453 RI-09: tag 收窄为 4 语义色 + neutral, 全部走 token */
.event-tag { display: inline-block; padding: 3px 8px; border-radius: 8px; font-size: 11px; font-weight: 500; margin-right: 6px; }
.tag-holiday    { background: var(--tag-info-bg);    color: var(--tag-info-fg); }
.tag-activity   { background: var(--tag-success-bg); color: var(--tag-success-fg); }
.tag-meeting    { background: var(--tag-warning-bg); color: var(--tag-warning-fg); }
.tag-deadline   { background: var(--tag-danger-bg);  color: var(--tag-danger-fg); }
.tag-field-trip { background: var(--tag-neutral-bg); color: var(--tag-neutral-fg); }
.event-card { padding: 16px; }
.event-card h4 { font-size: 15px; font-weight: 600; margin-top: 6px; }
.event-card .event-time { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
/* RT-10453 RI-11/RI-13/RI-14: event-cal-btn hover + 44px + 标准 timing */
/* RT-10452 LS-01: 10→8 padding 收敛 */
.event-card .event-cal-btn {
  margin-top: 8px; display: inline-flex; align-items: center; padding: 8px 16px;
  border-radius: 8px; background: var(--primary-light); color: var(--primary);
  font-size: 13px; font-weight: 600; border: none; cursor: pointer;
  min-height: 44px;
  transition: background var(--t-base), color var(--t-base);
}
.event-card .event-cal-btn:hover { background: #B7CCBA; }
.event-card .event-cal-btn:active { background: #a8bfab; }
.event-card .event-cal-btn.added {
  background: var(--success); color: #fff;
  pointer-events: none; opacity: 0.85;
}
.cal-grid { display: none; }
.cal-grid.active { display: block; }
.cal-list.active { display: block; }
.cal-list { display: none; }
.cal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-weight: 600; font-size: 16px; }
.cal-header button { background: none; border: none; font-size: 18px; cursor: pointer; padding: 4px 8px; color: var(--primary); }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 12px; color: var(--text-secondary); font-weight: 600; margin-bottom: 8px; }
.cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 14px; border-radius: 8px; cursor: default; position: relative; }
.cal-day.today { font-weight: 700; background: var(--primary); color: white; }
.cal-day.has-event { cursor: pointer; }
.cal-day.has-event:active { background: rgba(168,191,171,0.3); }
.cal-day.has-event::after { content: ''; position: absolute; bottom: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.cal-day.today.has-event::after { background: white; }
.cal-day.other-month { color: #ccc; cursor: default; }
.cal-event-detail { display: none; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.cal-event-detail.active { display: block; }
.cal-detail-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-detail-date { font-size: 14px; font-weight: 600; color: var(--text); }
.cal-detail-close { background: transparent; border: none; font-size: 16px; color: var(--text-secondary); cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.cal-detail-close:active { background: var(--bg); }
.cal-detail-events { display: flex; flex-direction: column; gap: 8px; }
.cal-detail-event { background: var(--bg); border-radius: 12px; padding: 12px; }
.cal-detail-event h4 { font-size: 14px; font-weight: 600; margin-top: 4px; }
.cal-detail-event .event-time { font-size: 12.5px; color: var(--text-secondary); margin-top: 2px; }

/* ── Notice history ──────────────────────────────────────── */
.notice-search { position: sticky; top: 0; z-index: 8; background: var(--bg); padding: 4px 0 8px; }
.notice-search input {
  width: 100%; padding: 12px 16px; border: 1.5px solid var(--border);
  border-radius: 999px; font-size: 14px; background: white; outline: none;
  -webkit-appearance: none; font-family: inherit; transition: border-color var(--t-fast);
}
.notice-search input:focus { border-color: var(--primary); }
.notice-filter { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.notice-filter::-webkit-scrollbar { display: none; }
.notice-month-section { margin-bottom: 16px; }
.notice-month-header {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: transparent; border: none; padding: 8px 4px;
  font-family: inherit; cursor: pointer; text-align: left; min-height: 36px;
}
.notice-month-header .month-label { color: var(--text); font-size: 14px; font-weight: 600; }
.notice-month-header .month-meta { flex: 1; font-weight: 500; font-size: 12px; color: var(--text-secondary); }
.notice-month-header .fold-indicator { font-size: 10px; color: var(--text-secondary); transition: transform var(--t-fast); }
.notice-month-section.folded .fold-indicator { transform: rotate(-90deg); }
.notice-month-section.folded .notice-month-body { display: none; }
.notice-month-body { display: flex; flex-direction: column; gap: 8px; }
.notice-item {
  display: grid; grid-template-columns: 1fr auto; column-gap: 12px; row-gap: 4px;
  align-items: start; background: white; border: none; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; text-align: left;
  font-family: inherit; cursor: pointer; width: 100%;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.notice-item:hover { box-shadow: var(--shadow-lg); }
.notice-item:active { transform: scale(0.997); }
.notice-item.is-urgent { border-left: 3px solid var(--danger); padding-left: 13px; }
.notice-item .notice-title { grid-column: 1; grid-row: 1; font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notice-item .notice-status { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; }
.notice-item .status-icon { font-size: 16px; line-height: 1.1; }
.notice-item .notice-date { font-size: 11px; color: var(--text-secondary); font-weight: 500; white-space: nowrap; }
.notice-item .notice-tag-row { grid-column: 1 / -1; grid-row: 2; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
/* RT-10453 RI-09: notice-type-tag 走 semantic token */
.notice-type-tag { font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 999px; background: var(--tag-neutral-bg); color: var(--tag-neutral-fg); }
.notice-type-tag.t-homework { background: var(--tag-neutral-bg); color: var(--tag-neutral-fg); }
.notice-type-tag.t-event    { background: var(--tag-success-bg); color: var(--tag-success-fg); }
.notice-type-tag.t-meeting  { background: var(--tag-warning-bg); color: var(--tag-warning-fg); }
.notice-type-tag.t-system   { background: var(--tag-info-bg);    color: var(--tag-info-fg); }
.notice-item .notice-snippet { font-size: 12px; color: var(--text-secondary); font-weight: 400; }
.notice-empty { text-align: center; padding: 36px 16px; color: var(--text-secondary); font-size: 13px; }
.notice-empty .icon { font-size: 32px; display: block; margin-bottom: 8px; }

/* ── Resources (学习资料) ──────────────────────────────── */
.resources-hint { font-size: 13px; color: var(--text-secondary); padding: 0 4px 8px; line-height: 1.5; }
.resources-search { padding: 0 0 8px; }
.resources-search input {
  width: 100%; padding: 8px 12px; border-radius: 8px;
  border: 1.5px solid var(--border); background: white;
  font-size: 14px; font-family: inherit; outline: none;
}
.resources-search input:focus { border-color: var(--primary); }
.resources-filter { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 12px; }
.resource-list { display: flex; flex-direction: column; gap: 8px; }
.resource-item {
  display: flex; gap: 12px; align-items: flex-start;
  background: white; border-radius: var(--radius); box-shadow: var(--shadow-md);
  padding: 16px; text-decoration: none; color: inherit;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.resource-item:hover { box-shadow: var(--shadow-lg); }
.resource-item:active { transform: scale(0.997); }
.resource-item .resource-icon { font-size: 22px; line-height: 1.1; flex-shrink: 0; }
.resource-item .resource-meta { flex: 1; min-width: 0; }
.resource-item .resource-title {
  font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.35;
  margin-bottom: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.resource-item .resource-sub { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; color: var(--text-secondary); }
/* RT-10453 RI-09: resource-kind-tag 走 semantic token */
.resource-kind-tag { font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 999px; background: var(--tag-neutral-bg); color: var(--tag-neutral-fg); }
.resource-kind-tag.t-article { background: var(--tag-info-bg);    color: var(--tag-info-fg); }
.resource-kind-tag.t-video   { background: var(--tag-danger-bg);  color: var(--tag-danger-fg); }
.resource-kind-tag.t-podcast { background: var(--tag-neutral-bg); color: var(--tag-neutral-fg); }
.resource-kind-tag.t-other   { background: var(--tag-warning-bg); color: var(--tag-warning-fg); }
.resource-item .resource-date { font-size: 11px; font-weight: 500; }
.resource-empty { text-align: center; padding: 36px 16px; color: var(--text-secondary); font-size: 13px; }
.resource-empty .icon { font-size: 32px; display: block; margin-bottom: 8px; }

/* ── Photos ──────────────────────────────────────────────── */
.photo-privacy-banner {
  display: flex; align-items: flex-start; gap: 8px; padding: 12px 16px;
  background: #FFF7E6; border: 1px solid #F4D9A8; border-radius: 12px; margin: 4px 0 16px;
}
.photo-privacy-banner .icon { font-size: 16px; line-height: 1.4; flex-shrink: 0; }
.photo-privacy-banner .text { font-size: 13px; line-height: 1.5; color: #7A4F00; }
.photo-privacy-banner .text strong { color: #5C3B00; }
.photo-permission-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; color: var(--text-secondary);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 999px; padding: 2px 8px; margin-left: 8px; vertical-align: middle;
}
.photo-group-label { font-size: 14px; font-weight: 600; margin: 16px 0 8px; }
.photo-group-label:first-child { margin-top: 0; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo-card { aspect-ratio: 1; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 32px; cursor: pointer; transition: transform var(--t-fast), filter var(--t-fast); }
.photo-card:hover { filter: brightness(0.96); }
.photo-card:active { transform: scale(0.95); }

/* RT-10390 AC3: new album red dot */
.photo-card { position: relative; }
.photo-card.is-new::after {
  content: ''; position: absolute; top: 6px; right: 6px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--danger);
  box-shadow: 0 0 0 2px white, 0 0 6px rgba(220, 79, 79, 0.6);
  animation: newDotPulse 1.6s ease-in-out infinite;
}
@keyframes newDotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.18); opacity: 0.85; }
}
.photo-group-label .new-flag {
  display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 700;
  color: white; background: var(--danger); padding: 2px 6px; border-radius: 999px;
  vertical-align: middle; letter-spacing: 0.3px;
}

/* Photo modal */
.photo-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 200; align-items: center; justify-content: center; padding: 20px; }
.photo-modal.show { display: flex; }
.photo-modal-content {
  width: 100%; max-width: 360px; aspect-ratio: 1; border-radius: 16px;
  display: flex; align-items: center; justify-content: center; font-size: 80px;
  position: relative; touch-action: pan-y;
  transition: transform var(--t-slow) cubic-bezier(.2,.8,.2,1); will-change: transform;
}
.photo-modal-content.dragging { transition: none; }
.photo-modal-counter {
  position: absolute; top: calc(env(safe-area-inset-top, 0px) + 12px); right: 16px;
  background: rgba(0,0,0,0.55); color: white; border-radius: 22px; padding: 6px 12px;
  font-size: 13px; font-weight: 500; z-index: 1; pointer-events: none;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: none;
}
.photo-modal-counter.show { display: inline-block; }
.photo-modal-edge-hint {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.7); color: white; border-radius: 18px; padding: 8px 16px;
  font-size: 14px; z-index: 2; pointer-events: none; opacity: 0; transition: opacity var(--t-fast);
  white-space: nowrap; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.photo-modal-edge-hint.show { opacity: 1; }
.photo-modal-topbar {
  position: absolute; top: 0; left: 0; right: 0;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 12px 12px;
  display: flex; align-items: center; z-index: 1; pointer-events: none;
}
.photo-modal-back {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(0,0,0,0.55); color: white; border: none; border-radius: 22px;
  padding: 9px 16px 9px 12px; font-size: 15px; font-weight: 500; cursor: pointer;
  pointer-events: auto; -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.photo-modal-back:active { background: rgba(0,0,0,0.75); }
.photo-modal-back-arrow { font-size: 22px; line-height: 1; margin-right: 2px; display: inline-block; transform: translateY(-1px); }
.photo-modal-hint {
  position: absolute; bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
  left: 0; right: 0; text-align: center; color: rgba(255,255,255,0.7); font-size: 13px; pointer-events: none;
}

/* ── Community ───────────────────────────────────────────── */
.community-filter { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; margin-bottom: 4px; scrollbar-width: none; }
.community-filter::-webkit-scrollbar { display: none; }
/* RT-10453 RI-11/RI-13: filter-chip hover + min-height 44px */
/* RT-10452 LS-01: 10→8 padding 收敛 */
.filter-chip {
  flex-shrink: 0; background: white; border: 1.5px solid var(--border); border-radius: 999px;
  padding: 8px 16px; font-size: 13px; font-weight: 600; color: var(--text-secondary); cursor: pointer; white-space: nowrap;
  min-height: 44px;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.filter-chip:hover { background: var(--bg); border-color: var(--text-secondary); color: var(--text); }
.filter-chip.active { background: var(--primary); border-color: var(--primary); color: white; }
.filter-chip.active:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.community-card { padding: 16px; }
.community-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 15px; flex-shrink: 0; }
.community-meta { flex: 1; }
.community-meta .name { font-weight: 600; font-size: 14px; }
.community-meta .time { font-size: 12px; color: var(--text-secondary); }
/* RT-10453 RI-09: post-type 走 semantic token (4 semantic + neutral) */
.post-type { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 8px; }
.post-type.pickup   { background: var(--tag-warning-bg); color: var(--tag-warning-fg); }
.post-type.playdate { background: var(--tag-success-bg); color: var(--tag-success-fg); }
.post-type.gift     { background: var(--tag-neutral-bg); color: var(--tag-neutral-fg); }
.post-type.carpool  { background: var(--tag-info-bg);    color: var(--tag-info-fg); }
.post-type.question { background: var(--tag-info-bg);    color: var(--tag-info-fg); }
.post-type.other    { background: var(--tag-neutral-bg); color: var(--tag-neutral-fg); }
/* RT-10452 LS-05: 12→8 sub-item 间距 (body→actions) */
.community-body { font-size: 14px; line-height: 1.5; margin-bottom: 8px; }
.community-actions { display: flex; gap: 8px; }
/* RT-10453 RI-11/RI-13: community action buttons hover + min-height */
/* RT-10452 LS-01/LS-02: 11→12, 9→8 收敛到标准 scale */
.community-actions button {
  flex: 1; padding: 12px 8px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  border: 1.5px solid var(--border); background: white; cursor: pointer;
  min-height: 44px;
  transition: background var(--t-base), border-color var(--t-base), color var(--t-base);
}
.community-actions button:hover { background: var(--bg); border-color: var(--text-secondary); }
.community-actions button:active { background: var(--primary-light); }
.community-actions button.primary-action { background: var(--primary); color: white; border-color: var(--primary); }
.community-actions button.primary-action:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.community-actions button.primary-action:active { opacity: 0.85; }

/* RT-10390 AC4: post title clamp + image preview */
.community-card .post-title { font-size: 15px; font-weight: 700; line-height: 1.4; color: var(--text); margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.community-card .post-image { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; margin: 8px 0 12px; background-position: center; background-size: cover; display: flex; align-items: center; justify-content: center; font-size: 42px; position: relative; overflow: hidden; }
.community-card .post-image .img-count { position: absolute; bottom: 6px; right: 8px; background: rgba(0,0,0,0.6); color: white; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 8px; }

/* RT-10390 AC6: unread posts */
.community-card.unread { position: relative; border-left: 4px solid #60A5FA; padding-left: 12px; background: linear-gradient(to right, #EFF6FF 0%, var(--card) 60px); transition: border-color var(--t-slow) ease, background var(--t-slow) ease; }
/* The unread badge text is injected via JS from i18n — but keep the pseudo CSS here */
.community-card.unread::after {
  position: absolute; top: 12px; right: 12px; font-size: 10px; font-weight: 700;
  color: #1E40AF; background: #DBEAFE; padding: 2px 7px; border-radius: 999px;
  letter-spacing: 0.3px; pointer-events: none;
  content: attr(data-unread-label);
}
.community-card.read-fading { border-left-color: transparent; background: var(--card); }

/* Pending / rejected post cards */
.community-card.pending { opacity: 0.62; border: 1.5px dashed #C9A86A; background: #FFFBF2; cursor: pointer; position: relative; }
.community-card.pending:active { opacity: 0.78; }
.community-card.rejected { opacity: 0.85; border: 1.5px solid var(--danger); background: #FFF5F5; }
.pending-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 8px; background: #F4E4B8; color: #7A5A18; margin-left: 6px; }
.pending-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #C9A86A; animation: pendingBlink 1.4s ease-in-out infinite; }
@keyframes pendingBlink { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
.rejection-banner { margin-top: 8px; padding: 12px; border-radius: 8px; background: #FDEAEA; color: #B91C1C; font-size: 13px; line-height: 1.5; }
.rejection-banner strong { font-weight: 700; display: block; margin-bottom: 4px; }
.rejection-banner .reason-row { margin-top: 4px; color: #7F1D1D; }
.rejection-banner .reason-row .label { font-weight: 600; margin-right: 4px; }
.review-only-self { font-size: 11px; color: var(--text-secondary); margin-top: 8px; font-style: italic; }
.review-status-bar { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 12px; border-radius: 8px; background: #FFF6DC; border: 1px solid #E8D08A; color: #6E5018; font-size: 12px; line-height: 1.4; }
.review-status-bar .rs-icon { font-size: 14px; }
.review-status-bar .rs-label { font-weight: 600; }
.review-status-bar .rs-eta { color: #8A6920; }
.review-status-bar .rs-elapsed { margin-left: auto; color: #A0824A; font-variant-numeric: tabular-nums; }
.btn-edit-republish { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; padding: 8px 16px; font-size: 13px; font-weight: 600; background: var(--danger); color: white; border: 1px solid var(--danger); border-radius: 8px; cursor: pointer; }
.btn-edit-republish:active { opacity: 0.8; }

/* Privacy banner */
.privacy-banner { position: relative; background: #EAF4EE; border: 1px solid #BFDDC6; border-radius: 12px; padding: 12px 36px 12px 16px; margin-bottom: 16px; font-size: 13px; line-height: 1.5; color: #2D4A32; }
.privacy-banner.hidden { display: none; }
.privacy-banner h4 { font-size: 13px; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.privacy-banner ul { list-style: none; padding: 0; margin: 0; }
.privacy-banner li { font-size: 12.5px; line-height: 1.6; padding-left: 16px; position: relative; color: #3F5A45; }
.privacy-banner li::before { content: '·'; position: absolute; left: 4px; font-weight: 700; }
.privacy-banner .close-banner { position: absolute; top: 6px; right: 6px; background: none; border: none; font-size: 20px; line-height: 1; color: #6B7280; cursor: pointer; width: 26px; height: 26px; border-radius: 50%; }
.privacy-banner .close-banner:active { background: rgba(0,0,0,0.06); }

/* ── New-post modal ──────────────────────────────────────── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; align-items: flex-end; justify-content: center; }
.modal-overlay.show { display: flex; }
.modal-sheet { background: white; border-radius: 20px 20px 0 0; padding: 24px 20px; width: 100%; max-width: 480px; max-height: 80dvh; overflow-y: auto; }
@media (min-width: 768px) { .modal-sheet { max-width: 600px; } }
@media (min-width: 1024px) { .modal-sheet { max-width: 720px; } }
.modal-sheet h3 { font-size: 18px; margin-bottom: 4px; }
.modal-sheet .modal-hint { font-size: 12px; color: var(--text-secondary); margin-bottom: 16px; }
.modal-sheet label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; margin-top: 16px; }
.modal-sheet label:first-of-type { margin-top: 0; }
.modal-sheet input[type="text"], .modal-sheet select, .modal-sheet textarea { width: 100%; padding: 8px 12px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit; resize: vertical; box-sizing: border-box; }
.modal-sheet textarea { min-height: 80px; }
.modal-sheet .segment-tabs { display: flex; background: var(--bg); border: 1.5px solid var(--border); border-radius: 12px; padding: 4px; margin: 4px 0 16px; gap: 2px; }
/* RT-10452 LS-01: 横向 10→8 收敛 */
.modal-sheet .segment-tab { flex: 1; background: transparent; border: none; border-radius: 8px; padding: 12px 8px; font-size: 13.5px; font-weight: 600; color: var(--text-secondary); cursor: pointer; min-height: 44px; transition: background var(--t-fast), color var(--t-fast); }
.modal-sheet .segment-tab:hover { color: var(--text); }
.modal-sheet .segment-tab.active { background: var(--card); color: var(--primary); box-shadow: var(--shadow-sm); }
.modal-sheet .post-more { display: none; }
.modal-sheet .post-more.show { display: block; }
.modal-sheet .template-field { margin-top: 8px; }
.modal-sheet .template-field input[type="text"] { padding: 8px 12px; font-size: 13.5px; }
.modal-sheet .preselect-tag { display: inline-flex; align-items: center; gap: 6px; background: var(--primary-light); color: var(--primary); padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.modal-sheet .preselect-tag .clear-preselect { background: none; border: none; color: var(--primary); font-size: 14px; cursor: pointer; padding: 0; line-height: 1; }
.modal-sheet .type-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.modal-sheet .type-chip { background: var(--bg); border: 1.5px solid var(--border); border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 600; color: var(--text-secondary); cursor: pointer; }
.modal-sheet .type-chip.active { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.modal-sheet .template-collapsed-row { display: none; align-items: center; gap: 8px; padding: 6px 12px; background: var(--primary-light); border: 1px solid var(--primary); border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--primary); cursor: pointer; margin-bottom: 4px; width: fit-content; }
.modal-sheet .template-collapsed-row.show { display: inline-flex; }
.modal-sheet .template-collapsed-row .label { color: var(--text-secondary); font-weight: 500; }
.modal-sheet .template-collapsed-row .current-type { font-weight: 700; }
.modal-sheet .template-collapsed-row .expand-hint { color: var(--primary); font-size: 11px; opacity: 0.85; }
.modal-sheet .image-upload-btn { background: var(--bg); border: 1.5px dashed var(--border); border-radius: 8px; padding: 12px 16px; font-size: 13px; color: var(--text-secondary); cursor: pointer; margin: 8px 0 8px; width: 100%; text-align: center; }
.modal-sheet .image-thumb-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.modal-sheet .image-thumb-grid:empty { display: none; }
.modal-sheet .image-thumb { position: relative; width: 64px; height: 64px; border-radius: 8px; background: #E5E7EB; }
.modal-sheet .image-thumb .remove-thumb { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: #1F2937; color: white; border: 2px solid white; font-size: 12px; line-height: 1; cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; }
.visibility-note { margin-top: 16px; padding: 12px; background: #F5F2EC; border-left: 3px solid var(--accent); border-radius: 8px; font-size: 12.5px; line-height: 1.55; color: var(--text-secondary); }
.visibility-note strong { display: block; color: var(--text); font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.modal-sheet .publish-rules-link { background: none; border: none; color: var(--primary); font-size: 12px; text-decoration: underline; padding: 4px 0; margin: 4px 0 0; cursor: pointer; align-self: flex-start; }
.modal-sheet .post-required-counter { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding: 8px 12px; border-radius: 8px; background: #FEF2F2; border: 1px solid #FECACA; color: var(--danger); font-size: 12.5px; font-weight: 600; line-height: 1.4; }
.modal-sheet .post-required-counter.complete { background: #ECFDF5; border-color: #A7F3D0; color: #047857; }
.modal-sheet .post-required-counter .prc-icon { font-size: 14px; line-height: 1; }
.modal-sheet .post-required-counter .prc-list { font-size: 11.5px; font-weight: 500; opacity: 0.85; margin-left: 4px; }
.modal-sheet label .required-asterisk { color: var(--danger); font-weight: 700; margin-left: 2px; }
.modal-sheet .modal-btns { display: flex; gap: 8px; margin-top: 20px; }
/* RT-10453 RI-11/RI-13: modal buttons hover + min-height 44px */
/* RT-10452 LS-02: 13→12 收敛到标准 scale (min-height 44 兜底) */
.modal-sheet .modal-btns button {
  flex: 1; padding: 12px; border-radius: 8px;
  font-size: 15px; font-weight: 600; cursor: pointer; border: none;
  min-height: 44px;
  transition: background var(--t-base), opacity var(--t-base);
}
.modal-sheet .btn-cancel { background: var(--border); color: var(--text); }
.modal-sheet .btn-cancel:hover { background: #D1D5DB; }
.modal-sheet .btn-post { background: var(--primary); color: white; }
.modal-sheet .btn-post:hover:not(:disabled) { background: var(--primary-dark); }
.modal-sheet .btn-post:disabled { background: #E5E7EB; color: #9CA3AF; cursor: not-allowed; opacity: 1; }

/* Publishing rules popover */
.publish-rules-popover { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1100; display: none; align-items: center; justify-content: center; padding: 24px; }
.publish-rules-popover.show { display: flex; }
.publish-rules-popover .popover-card { background: var(--card); border-radius: 12px; padding: 20px 20px 16px; max-width: 420px; width: 100%; max-height: 80dvh; overflow-y: auto; }
.publish-rules-popover .popover-card h4 { margin: 0 0 8px; font-size: 15px; color: var(--text); }
.publish-rules-popover .popover-card ul { margin: 0; padding-left: 18px; font-size: 12.5px; line-height: 1.7; }
.publish-rules-popover .popover-card li.ok { color: #166534; }
.publish-rules-popover .popover-card li.no { color: #991B1B; }
.publish-rules-popover .popover-card .timing-note { margin-top: 8px; font-size: 11.5px; color: var(--text-secondary); line-height: 1.5; }
.publish-rules-popover .popover-close { margin-top: 12px; width: 100%; background: var(--primary); color: white; border: none; padding: 12px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }

/* Post detail overlay */
.post-detail-overlay { position: fixed; inset: 0; background: var(--bg); z-index: 1200; display: none; flex-direction: column; overflow: hidden; }
.post-detail-overlay.show { display: flex; }
.post-detail-topbar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--card); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.post-detail-topbar .back-btn { background: none; border: none; font-size: 26px; line-height: 1; color: var(--text); cursor: pointer; padding: 4px 8px; margin: -4px 0; }
.post-detail-topbar .title { font-size: 15px; font-weight: 700; color: var(--text); }
.post-detail-status-row { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--border); font-size: 12px; color: var(--text-secondary); flex-shrink: 0; }
/* RT-10452 LS-01: 横向 10→12 收敛 (pill 需横向呼吸) */
.post-status-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid transparent; line-height: 1.2; }
.post-status-pill.pending  { background: #FEF3C7; color: #92400E; border-color: #FCD34D; }
.post-status-pill.pending::before  { content: '🟡 '; }
.post-status-pill.rejected { background: #FEE2E2; color: #991B1B; border-color: #FCA5A5; }
.post-status-pill.rejected::before { content: '🔴 '; }
.post-status-pill.published { background: #DCFCE7; color: #166534; border-color: #86EFAC; }
.post-status-pill.published::before { content: '✅ '; }
.post-detail-body { flex: 1; overflow-y: auto; padding: 16px; }
.post-detail-card { background: var(--card); border-radius: 12px; padding: 16px; box-shadow: var(--shadow-sm); }
.post-detail-card .community-body { font-size: 14px; line-height: 1.55; color: var(--text); margin-bottom: 8px; white-space: pre-wrap; word-break: break-word; }
.post-detail-image-row { position: relative; margin-top: 8px; }
.post-detail-image-row .scroll-track { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 12px; }
.post-detail-image-row .scroll-track::-webkit-scrollbar { display: none; }
.post-detail-image-row .img-cell { flex: 0 0 100%; height: 200px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 36px; scroll-snap-align: start; }
.post-detail-image-row .page-counter { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,0.55); color: white; padding: 4px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.3px; pointer-events: none; }
.first-reply-preview { background: var(--card); border-radius: 12px; padding: 12px 16px; margin-top: 12px; }
.first-reply-preview .reply-label { font-size: 11.5px; color: var(--text-secondary); font-weight: 600; margin-bottom: 8px; letter-spacing: 0.3px; }
.first-reply-preview .reply-row { display: flex; gap: 8px; align-items: flex-start; }
.first-reply-preview .reply-row .avatar { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; color: white; font-weight: 600; }
.first-reply-preview .reply-content { flex: 1; font-size: 13px; line-height: 1.5; color: var(--text); }
.first-reply-preview .reply-name { font-weight: 600; color: var(--text); margin-bottom: 2px; }
.first-reply-preview .reply-time { font-weight: 400; color: var(--text-secondary); font-size: 11.5px; margin-left: 6px; }
.first-reply-preview .view-all-btn { display: block; width: 100%; margin-top: 8px; background: none; border: 1px solid var(--border); color: var(--primary); padding: 8px; border-radius: 8px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.first-reply-preview .empty-reply { font-size: 12.5px; color: var(--text-secondary); text-align: center; padding: 6px 0; }

/* ── FAB ─────────────────────────────────────────────────── */
.fab {
  position: fixed; bottom: calc(var(--nav-height) + 20px + env(safe-area-inset-bottom, 0px));
  right: max(16px, calc(50% - 284px));
  width: 54px; height: 54px; border-radius: 50%; background: var(--accent);
  color: white; border: none; font-size: 28px;
  box-shadow: 0 4px 14px rgba(232, 145, 58, 0.4); cursor: pointer; z-index: 90;
  display: none; align-items: center; justify-content: center;
  transition: transform var(--t-base), background var(--t-base);
}
.fab:hover { background: #D17F28; }
.fab:active { transform: scale(0.9); }
.fab.show { display: flex; }

/* ── Bottom nav ──────────────────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; height: var(--nav-height);
  background: white; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-around; z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
@media (min-width: 768px) { .bottom-nav { max-width: 600px; } }
@media (min-width: 1024px) { .bottom-nav { max-width: 720px; } }
/* RT-10453 RI-11/RI-13: nav-item min-height 44px + hover */
/* RT-10452 LS-01: 横向 10→12 收敛 */
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; cursor: pointer;
  color: var(--text-secondary); font-size: 11px; font-weight: 600;
  padding: 8px 12px; min-height: 44px;
  transition: color var(--t-base), background var(--t-base); position: relative;
}
.nav-item:hover { color: var(--text); background: rgba(0,0,0,0.02); }
.nav-item .nav-icon { font-size: 22px; transition: transform var(--t-base); }
/* RT-10451 AC6: 活跃态增强 — 顶部主色指示条 + 图标轻微放大 */
.nav-item.active { color: var(--primary); }
.nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 3px 3px;
}
.nav-item.active .nav-icon { transform: scale(1.08); }
.nav-icon-wrap { position: relative; }
.nav-item .badge { position: absolute; top: -2px; right: -4px; background: var(--danger); color: white; font-size: 10px; width: 16px; height: 16px; border-radius: 50%; display: none; align-items: center; justify-content: center; }
.nav-item .badge:not([hidden]) { display: flex; }

/* ── Toast ───────────────────────────────────────────────── */
/* RT-10451 AC3: 对比度合规 — 背景 #333→#1F2937 (gray-800) 提升至 ~14:1 */
.toast {
  position: fixed; bottom: calc(var(--nav-height) + 20px + env(safe-area-inset-bottom, 0px));
  left: 50%; transform: translateX(-50%) translateY(80px);
  background: #1F2937; color: #FFFFFF; padding: 12px 24px; border-radius: 12px;
  font-size: 14px; font-weight: 600; z-index: 300; opacity: 0;
  box-shadow: var(--shadow-xl);
  transition: opacity var(--t-slow) ease, transform var(--t-slow) ease; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Tab onboarding overlay ──────────────────────────────── */
.tab-onboard-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 250; display: none; }
.tab-onboard-overlay.show { display: block; }
.tab-onboard-tooltip { position: fixed; background: white; color: var(--text); border-radius: 12px; padding: 12px 16px; max-width: 220px; font-size: 13px; line-height: 1.5; box-shadow: var(--shadow-xl); z-index: 251; text-align: left; }
.tab-onboard-tooltip::after { content: ''; position: absolute; bottom: -7px; left: var(--arrow-x, 50%); transform: translateX(-50%) rotate(45deg); width: 12px; height: 12px; background: white; box-shadow: 2px 2px 4px rgba(0,0,0,0.06); }
.tab-onboard-tooltip .tt-title { font-weight: 700; margin-bottom: 4px; color: var(--primary); }
.tab-onboard-tooltip .tt-step { font-size: 11px; color: var(--text-secondary); font-weight: 600; }
.tab-onboard-tooltip .tt-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 8px; }
.tab-onboard-tooltip .tt-skip { background: none; border: none; color: var(--text-secondary); font-size: 12px; cursor: pointer; padding: 4px 6px; }
.tab-onboard-tooltip .tt-next { background: var(--primary); color: white; border: none; border-radius: 8px; padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; }
.bottom-nav .nav-item.onboard-spotlight { position: relative; z-index: 251; background: white; border-radius: 12px; box-shadow: 0 0 0 4px rgba(45,74,50,0.15); }

/* ── Lang toggle button ──────────────────────────────────── */
#lang-toggle {
  background: rgba(255,255,255,0.15); color: white; border: none;
  border-radius: 8px; padding: 6px 12px; font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit; letter-spacing: 0.2px;
  transition: background var(--t-fast);
}
#lang-toggle:hover { background: rgba(255,255,255,0.25); }
