/* =====================================================================
 * style.css · 小区住户系统 ARG —— 副本林艳版
 * ===================================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --ok: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;
  --text: #1f2937;
  --muted: #6b7280;
  --bg: #f4f5f7;
  --card: #ffffff;
  --border: #e5e7eb;
  --font: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
}

html, body { width: 100%; height: 100%; }
body {
  font-family: var(--font);
  background: #0b1020;
  color: var(--text);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 12px; }
.center { text-align: center; padding: 20px; }
.err { color: #dc2626; font-size: 12px; min-height: 16px; margin-top: 8px; }

svg { display: inline-block; vertical-align: middle; }

/* ==================== 首页 ==================== */
#landing {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: radial-gradient(1200px 700px at 50% -10%, #1e2a5a, #0b1020 70%);
  overflow: auto;
}
.landing-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(360px 360px at 78% 18%, rgba(99,102,241,.22), transparent 60%),
    radial-gradient(300px 300px at 18% 82%, rgba(139,92,246,.18), transparent 60%);
}
.landing-card {
  position: relative; max-width: 420px; width: 100%;
  text-align: center; color: #e8ecf8;
  animation: landIn .8s cubic-bezier(.2,.7,.2,1);
}
@keyframes landIn { from { opacity: 0; transform: translateY(24px); } }
.landing-badge {
  color: #a5b4fc; margin-bottom: 12px;
  animation: floaty 3.5s ease-in-out infinite;
}
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.landing-title { font-size: 30px; font-weight: 800; letter-spacing: 1px; margin-top: 12px; }
.landing-sub {
  font-size: 16px; color: #a5b4fc; letter-spacing: 6px; margin-top: 4px; margin-bottom: 22px;
}
.landing-desc { font-size: 14px; line-height: 1.9; color: #cbd5e6; opacity: .92; }
.landing-desc .hl { color: #f0abfc; font-weight: 700; }
.landing-btn {
  margin-top: 30px; width: 100%; padding: 15px 20px;
  font-size: 16px; font-weight: 700; letter-spacing: 2px;
  color: #fff; border: none; border-radius: 14px; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 30px rgba(99,102,241,.45);
  transition: transform .12s, box-shadow .2s;
}
.landing-btn:active { transform: scale(.97); }
.landing-btn-secondary {
  background: transparent;
  border: 1px solid rgba(165, 180, 252, .5);
  box-shadow: none;
  color: #a5b4fc;
  margin-top: 12px;
}
.landing-btn-secondary:active { background: rgba(165, 180, 252, .1); transform: scale(.97); }
.landing-foot { margin-top: 18px; font-size: 12px; color: #64748b; }

/* ==================== 手机框架 ==================== */
#phone {
  position: fixed; inset: 0; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(900px 600px at 50% 0%, #1b2340, #070a14 70%);
}
.phone-frame {
  position: relative;
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  background: #05070f;
  overflow: hidden;
}
.phone-statusbar {
  height: 44px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  color: #fff; font-size: 14px; font-weight: 600;
  background: rgba(255,255,255,.04);
}
.sb-icons { display: flex; align-items: center; gap: 8px; color: #fff; opacity: .8; }

#screen { flex: 1; position: relative; overflow: hidden; background: var(--bg); }
.screen-view { position: absolute; inset: 0; display: flex; flex-direction: column; }

.phone-homebar {
  height: 26px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.03);
}
.home-indicator { width: 120px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.35); }

/* ==================== 主页 ==================== */
#home-view {
  background:
    radial-gradient(560px 420px at 20% 8%, rgba(99,102,241,.35), transparent 60%),
    radial-gradient(480px 420px at 90% 20%, rgba(139,92,246,.3), transparent 60%),
    linear-gradient(180deg, #1b2345, #12162e 70%);
  color: #fff;
  padding: 20px 18px;
}
.home-top { margin-bottom: 20px; }
.home-clock { font-size: 46px; font-weight: 200; line-height: 1; }
.home-date { font-size: 14px; color: #c7d2fe; margin-top: 6px; }
.home-greet {
  margin-top: 10px; font-size: 13px; color: #a5b4fc;
  background: rgba(255,255,255,.08); display: inline-block;
  padding: 5px 12px; border-radius: 20px;
}
.home-apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 8px; }
.home-app {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px;
  background: none; border: none; cursor: pointer; padding: 4px 0;
}
.home-app-icon {
  width: 58px; height: 58px; border-radius: 15px;
  display: flex; align-items: center; justify-content: center; color: #fff;
  box-shadow: 0 6px 16px rgba(0,0,0,.35);
  transition: transform .12s;
}
.home-app-icon svg { width: 30px; height: 30px; }
.home-app:active .home-app-icon { transform: scale(.9); }
.home-app-name { font-size: 11px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.7); max-width: 80px; }
.home-app-badge {
  position: absolute; top: -4px; right: 2px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: #ff3b30; color: #fff; font-size: 11px; font-weight: 700;
  border-radius: 9px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(255,59,48,.5);
}

/* ==================== 应用视图 ==================== */
.app { height: 100%; min-height: 0; display: flex; flex-direction: column; }
.app-topbar {
  flex-shrink: 0; height: 50px;
  display: flex; align-items: center; gap: 4px;
  padding: 0 8px;
  background: #fff; border-bottom: 1px solid var(--border);
}
.app-back {
  width: 40px; height: 40px; border: none; background: none;
  color: var(--accent); cursor: pointer; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.app-back:active { background: #eef0ff; }
.app-title { flex: 1; font-size: 16px; font-weight: 700; text-align: center; }
.app-topaction { min-width: 40px; }
.app-body { flex: 1; overflow: hidden; padding: 14px; display: flex; flex-direction: column; }
.app-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-right: 2px; }

.app-hero { text-align: center; padding: 20px 10px 18px; }
.app-hero-ico { display: flex; justify-content: center; margin-bottom: 10px; }
.app-hero-ico svg { width: 54px; height: 54px; }
.app-hero h2 { font-size: 20px; margin-bottom: 4px; }

.sv-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.sv-title { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 6px; }

/* ==================== 通用组件 ==================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 10px 16px; border: none; border-radius: 10px;
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: filter .12s, transform .06s;
}
.btn:active { transform: scale(.97); }
.btn.small { padding: 7px 12px; font-size: 13px; }
.btn.block { width: 100%; }
.btn.secondary { background: #e8eaf2; color: #333; }
.btn.danger { background: var(--danger); color: #fff; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; }

.input, select.input, textarea.input {
  width: 100%; padding: 11px 12px; border: 1px solid #d5dae2; border-radius: 10px;
  font-size: 14px; background: #fff; color: var(--text); font-family: inherit;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
textarea.input.area { flex: 1; resize: none; min-height: 200px; line-height: 1.7; font-family: inherit; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px; margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(15,23,42,.02);
}
.card-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.card-body { font-size: 14px; line-height: 1.7; white-space: pre-wrap; color: #333; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.list-row > div:first-child { flex: 1; min-width: 0; }
.danger-box { border-color: #fecaca; background: #fff9f9; }
.danger { color: #dc2626; }

.hint-banner {
  display: flex; align-items: flex-start; gap: 6px;
  background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412;
  padding: 11px 14px; border-radius: 12px; font-size: 13px; line-height: 1.6; margin-bottom: 12px;
}
.hint-banner svg { flex-shrink: 0; margin-top: 1px; }
.hint-banner.ok { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.hint-banner.warn { background: #fff1f2; border-color: #fecdd3; color: #9f1239; }
.hint-banner.info { background: #eef2ff; border-color: #c7d2fe; color: #3730a3; }

.code-block {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #86efac; padding: 12px 14px; border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px;
  word-break: break-all; margin-top: 10px; line-height: 1.7; user-select: text;
  box-shadow: inset 0 0 0 1px rgba(134,239,172,.15);
}

/* ==================== 表格 ==================== */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
table.grid { border-collapse: collapse; width: 100%; font-size: 13px; }
table.grid th {
  background: #f3f4f6; padding: 10px 9px; text-align: left; white-space: nowrap;
  border-bottom: 1px solid var(--border); font-weight: 600; color: #374151; position: sticky; top: 0;
}
table.grid td { padding: 9px; border-bottom: 1px solid #f1f1f3; white-space: nowrap; }
table.grid tr:last-child td { border-bottom: none; }
tr.missing-row td { background: #fff7ed; }
.empty-cell { color: #dc2626; font-style: italic; }
.pill { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.pill-ok { background: #ecfdf5; color: #047857; }
.pill-in { background: #eef2ff; color: #3730a3; }
.pill-left { background: #fef2f2; color: #b91c1c; }

/* ==================== 邮箱 ==================== */
.mail-scroll { flex: 1; }
.mail-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.mail-item {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; cursor: pointer;
  transition: background .15s, transform .12s;
}
.mail-item:active { background: #f6f7fb; transform: scale(.99); }
.mail-item.unread {
  border-left: 3px solid var(--accent);
  background: linear-gradient(135deg, #f6f7ff, #eef2ff);
  font-weight: 600;
}
.mail-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.mail-main { flex: 1; min-width: 0; }
.mail-sub { font-size: 14px; color: #111; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-meta { font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.mail-reader { border-top: 1px dashed var(--border); padding-top: 14px; }
.mr-head { margin-bottom: 10px; }
.mr-sub { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.mr-body { white-space: pre-wrap; line-height: 1.85; font-size: 14px; color: #222; }

/* ==================== 浏览器 ==================== */
.browser-bar { display: flex; gap: 8px; margin-bottom: 10px; }
.browser-bar .input { flex: 1; }
.bz-subbar { margin-bottom: 10px; }
.bz-back {
  display: inline-flex; align-items: center; gap: 4px;
  border: none; background: #eef0ff; color: var(--accent);
  padding: 6px 12px; border-radius: 8px; font-size: 13px; cursor: pointer;
  font-weight: 600;
  transition: background .15s;
}
.bz-back:active { background: #dbe2ff; }
.bz-view { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }

.search-result { padding: 14px 0; border-bottom: 1px solid #eee; }
.sr-title { color: #1a0dab; font-size: 15px; font-weight: 500; line-height: 1.5; }
.sr-important { color: #b45309; font-size: 12px; font-weight: 600; margin: 4px 0 2px; display: flex; align-items: center; gap: 4px; }
.sr-date { color: #0f766e; font-size: 12px; margin: 3px 0; }
.sr-sum { color: #444; font-size: 13px; margin-top: 5px; line-height: 1.65; }

.search-empty {
  text-align: center; padding: 50px 20px; color: var(--muted);
  animation: fadeIn .4s;
}
.search-empty svg { color: #cbd5e1; margin-bottom: 12px; }
.search-empty .se-title { font-size: 15px; font-weight: 600; color: #64748b; margin-bottom: 6px; }
.search-empty .se-sub { font-size: 12.5px; color: #94a3b8; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } }

.history-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 12px; font-size: 13px; color: #333;
  border-bottom: 1px solid #f1f5f9;
  border-radius: 8px;
  transition: background .15s, transform .1s;
}
.history-item.clickable { cursor: pointer; }
.history-item.clickable:active { background: #eef2ff; transform: scale(.99); }
.history-item.clickable:hover { background: #f8faff; }
.history-item span:first-child { display: flex; align-items: center; gap: 8px; color: #2563eb; font-weight: 500; }

/* ==================== 论坛 ==================== */
.forum-result {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #fff, #f8faff);
  border: 1px solid var(--border); border-radius: 12px; padding: 14px;
}
.forum-logo {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.fm-body { flex: 1; min-width: 0; }
.fm-name { font-size: 15px; font-weight: 700; color: #1f2937; }
.forum-head { font-size: 17px; font-weight: 800; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }

/* 论坛登录/注册切换 */
.forum-switch {
  text-align: center; margin-top: 14px; font-size: 13px; color: var(--muted);
}
.forum-switch a {
  color: var(--accent); cursor: pointer; font-weight: 600; margin-left: 4px;
}

/* 论坛欢迎卡片 */
.forum-welcome {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #f6f7ff, #eef2ff);
  border: 1px solid #dfe2ff; border-radius: 14px;
  padding: 14px 16px; margin-bottom: 14px;
}
.forum-welcome .avatar { width: 48px; height: 48px; font-size: 20px; }
.fw-body { flex: 1; min-width: 0; }
.fw-name { font-size: 15px; font-weight: 700; color: #1f2937; }
.fw-bio { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* 论坛标签页 */
.forum-tabs {
  display: flex; gap: 4px; margin-bottom: 14px;
  background: #f1f5f9; padding: 4px; border-radius: 12px;
}
.forum-tab {
  flex: 1; padding: 9px 12px; border: none; background: none;
  font-size: 13px; font-weight: 600; color: #64748b;
  border-radius: 9px; cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.forum-tab.active {
  background: #fff; color: var(--accent);
  box-shadow: 0 2px 8px rgba(99,102,241,.15);
}

/* 动态列表 */
.posts-list { display: flex; flex-direction: column; gap: 10px; }
.post-card {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 16px;
  transition: all .15s;
}
.post-card.clickable { cursor: pointer; }
.post-card.clickable:hover { border-color: #c7d2fe; box-shadow: 0 4px 12px rgba(99,102,241,.08); }
.post-card.clickable:active { transform: scale(.99); }
.post-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--muted); margin-bottom: 6px;
}
.post-date { font-weight: 600; color: #64748b; }
.post-time { color: #94a3b8; }
.post-title { font-size: 15px; font-weight: 700; color: #1f2937; margin-bottom: 6px; }
.post-preview {
  color: #555; font-size: 13px; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-footer {
  display: flex; align-items: center; gap: 14px;
  margin-top: 10px; padding-top: 8px;
  border-top: 1px dashed #f1f5f9;
  font-size: 12px; color: #94a3b8;
}
.post-footer span { display: flex; align-items: center; gap: 4px; }
.unread-dot {
  margin-left: auto;
  padding: 2px 8px; background: #fee2e2; color: #dc2626;
  border-radius: 8px; font-weight: 700; font-size: 10px;
}

/* 帖子详情 */
.post-detail {
  background: #fff; border: 1px solid var(--border);
  border-radius: 14px; padding: 16px;
}
.post-detail-meta {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.post-detail-meta .avatar { width: 42px; height: 42px; font-size: 18px; }
.post-detail-title { font-size: 18px; font-weight: 800; color: #1f2937; margin-bottom: 12px; }
.post-detail-content {
  font-size: 14px; line-height: 1.85; color: #222;
  padding: 14px; background: #fafafa; border-radius: 10px;
  white-space: pre-wrap; word-break: break-word;
}
.post-detail-actions {
  display: flex; align-items: center; gap: 16px;
  margin-top: 12px; padding-top: 10px;
  border-top: 1px dashed #f1f5f9;
  font-size: 13px; color: #94a3b8;
}
.post-detail-actions span { display: flex; align-items: center; gap: 4px; }

.post-comments { margin-top: 16px; }
.comment {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 0;
  border-top: 1px solid #f0f0f2;
  transition: background .15s;
}
.comment:hover { background: #fafafa; }
.cm-body { flex: 1; }
.cm-name { font-size: 13px; font-weight: 600; margin-bottom: 3px; color: #1f2937; }
.cm-content { font-size: 14px; color: #333; line-height: 1.6; }

.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 17px; flex-shrink: 0;
}
.avatar.sm { width: 30px; height: 30px; font-size: 14px; background: linear-gradient(135deg, #64748b, #475569); }

/* ==================== 相册 ==================== */
.photos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.photo-item {
  position: relative;
  background: #fff; border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
  cursor: pointer;
  transition: all .15s;
}
.photo-item:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(15,23,42,.08); }
.photo-item:active { transform: scale(.98); }
.photo-item.unviewed::after {
  content: ''; position: absolute; top: 8px; right: 8px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.2);
}
.photo-thumb {
  width: 100%; aspect-ratio: 1 / 1; overflow: hidden; background: #f1f5f9;
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-label {
  padding: 8px 10px; font-size: 12px; color: #1f2937;
  font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.photo-detail {
  background: #fff; border: 1px solid var(--border);
  border-radius: 14px; padding: 14px;
}
.photo-detail-img {
  width: 100%; border-radius: 12px; overflow: hidden;
  margin-bottom: 14px; background: #f1f5f9;
}
.photo-detail-img img { width: 100%; display: block; }
.photo-detail-title { font-size: 17px; font-weight: 800; color: #1f2937; margin-bottom: 4px; }
.photo-detail-desc {
  font-size: 14px; line-height: 1.8; color: #333;
  padding: 14px; background: #fafafa; border-radius: 10px;
  margin-top: 10px;
}

/* ==================== 聊天 ==================== */
.chat-wrap { display: flex; flex-direction: column; height: 100%; }
.chat-head { text-align: center; font-size: 13px; font-weight: 600; color: #333; padding: 4px 0 10px; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 6px 2px 12px; display: flex; flex-direction: column; gap: 10px; }
.bubble {
  max-width: 78%; padding: 11px 14px; border-radius: 16px; font-size: 14px; line-height: 1.6;
  word-break: break-word; animation: bub .2s ease-out; white-space: pre-wrap;
}
@keyframes bub { from { opacity: 0; transform: translateY(6px); } }
.bubble.mo { align-self: flex-start; background: #fff; border: 1px solid #eef0f3; border-bottom-left-radius: 4px; color: #222; }
.bubble.me { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.chat-hint {
  align-self: center; font-size: 12px; color: #6b7280;
  background: #f3f4f6; padding: 7px 12px; border-radius: 16px;
  max-width: 88%; text-align: center;
}
.chat-input { display: flex; gap: 8px; padding-top: 10px; }
.chat-input .input { flex: 1; }

.profile-card { text-align: center; padding: 18px 10px 14px; }
.profile-avatar {
  width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 10px;
  background: linear-gradient(135deg, #64748b, #334155);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 700;
  box-shadow: 0 8px 20px rgba(51,65,85,.25);
}
.profile-name { font-size: 20px; font-weight: 800; }

/* ==================== 时钟 ==================== */
.clock-center { text-align: center; padding: 30px 10px 20px; }
.clk-time {
  font-size: 52px; font-weight: 200; color: #1d4ed8; letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
}
.clk-play { margin-top: 14px; font-size: 13px; color: var(--muted); }

/* ==================== 弹窗 ==================== */
.modal-overlay {
  position: absolute; inset: 0; z-index: 600;
  background: rgba(15,20,40,.55);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; animation: fade .18s;
}
.modal-box {
  width: 100%; max-width: 320px; background: #fff; border-radius: 18px;
  padding: 22px 20px; box-shadow: 0 20px 50px rgba(0,0,0,.4);
  animation: pop .2s cubic-bezier(.2,.8,.3,1.1);
}
@keyframes pop { from { opacity: 0; transform: scale(.92); } }
@keyframes fade { from { opacity: 0; } }
.modal-title { font-size: 16px; font-weight: 700; text-align: center; margin-bottom: 8px; }
.modal-hint { font-size: 12px; color: var(--muted); text-align: center; margin-bottom: 12px; line-height: 1.6; display: flex; align-items: center; justify-content: center; gap: 4px; }
.modal-text { font-size: 14px; color: #333; text-align: center; line-height: 1.7; margin-bottom: 6px; }
.modal-input { width: 100%; padding: 12px; border: 1px solid #d5dae2; border-radius: 10px; font-size: 15px; text-align: center; margin: 6px 0 12px; }
.modal-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.modal-btns { display: flex; gap: 10px; margin-top: 4px; }
.modal-btn { flex: 1; padding: 11px; border: none; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; }
.modal-btn.primary { background: var(--accent); color: #fff; }
.modal-btn.secondary { background: #eef0f3; color: #444; }
.modal-btn:active { transform: scale(.97); }

/* ==================== 新邮件提醒 ==================== */
#notify-wrap {
  position: absolute; top: 54px; left: 0; right: 0; z-index: 500;
  display: flex; flex-direction: column; gap: 8px; padding: 0 14px;
  pointer-events: none;
}
.mail-notify {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #ffffff, #f4f4ff);
  border: 1px solid #dfe2ff; border-left: 4px solid var(--accent);
  border-radius: 14px; padding: 12px 14px;
  box-shadow: 0 12px 30px rgba(20,30,80,.3);
  pointer-events: auto; animation: notifyIn .35s cubic-bezier(.2,.8,.3,1.1);
}
@keyframes notifyIn { from { opacity: 0; transform: translateY(-18px); } }
.mail-notify.out { transition: all .26s; opacity: 0; transform: translateY(-12px); }
.mn-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mn-body { flex: 1; min-width: 0; }
.mn-title { font-size: 14px; font-weight: 700; color: #111; }
.mn-sub { font-size: 12px; color: #555; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.mn-close { border: none; background: none; color: #999; font-size: 16px; cursor: pointer; padding: 6px; }

/* ==================== Toast ==================== */
#toast-wrap {
  position: absolute; bottom: 40px; left: 0; right: 0; z-index: 700;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
}
.toast {
  max-width: 86%; background: rgba(15,20,40,.94); color: #fff;
  padding: 11px 16px; border-radius: 12px; font-size: 13px; text-align: center;
  box-shadow: 0 10px 26px rgba(0,0,0,.4);
  animation: toastIn .3s ease-out;
  backdrop-filter: blur(6px);
}
.toast.out { transition: opacity .3s; opacity: 0; }
.toast .t-title { font-weight: 700; margin-bottom: 2px; }
.toast svg { vertical-align: -2px; margin-right: 4px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } }

/* ==================== 报告 ==================== */
#report-overlay {
  position: absolute; inset: 0; z-index: 800; background: #0b1020;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  overflow: auto; animation: fade .4s;
}
.report-form { width: 100%; max-width: 360px; margin: auto; color: #e8ecf8; }
.rf-title { font-size: 26px; font-weight: 800; text-align: center; }
.rf-sub { text-align: center; color: #94a3b8; font-size: 13px; margin: 8px 0 22px; }
.rf-meta { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 6px 16px; margin-bottom: 20px; }
.rf-row { display: flex; justify-content: space-between; padding: 11px 0; font-size: 14px; border-bottom: 1px solid rgba(255,255,255,.06); }
.rf-row:last-child { border-bottom: none; }
.rf-row b { color: #a5b4fc; font-weight: 600; }
.rf-field { margin-bottom: 16px; }
.rf-field label { display: block; font-size: 13px; color: #cbd5e6; margin-bottom: 8px; }
.rf-field .input { background: #161d33; border-color: #2b3350; color: #fff; }
.rf-field .input:focus { border-color: var(--accent); }

.report-card {
  width: 100%; max-width: 360px; margin: auto; color: #e8ecf8; text-align: center;
  animation: landIn .6s cubic-bezier(.2,.7,.2,1);
}
.report-card.truth {
  background:
    radial-gradient(300px 300px at 50% 0%, rgba(139,92,246,.18), transparent 70%),
    linear-gradient(180deg, rgba(139,92,246,.10), transparent);
  padding: 22px 18px; border-radius: 22px;
  box-shadow: 0 0 0 1px rgba(167,139,250,.15), 0 20px 60px rgba(139,92,246,.15);
}
.rc-badge {
  color: #a5b4fc; margin-bottom: 8px;
  animation: floaty 3.5s ease-in-out infinite;
  display: flex; justify-content: center;
}
.report-card.truth .rc-badge { color: #f0abfc; }
.rc-title { font-size: 14px; letter-spacing: 4px; color: #94a3b8; }
.rc-name { font-size: 26px; font-weight: 800; margin: 8px 0 4px; }
.rc-ending { font-size: 14px; color: #a5b4fc; margin-bottom: 6px; }
.rc-ending-title { font-size: 20px; font-weight: 800; color: #f0abfc; margin-bottom: 16px; }
.rc-summary {
  font-size: 14px; line-height: 1.9; color: #cbd5e6; text-align: left;
  background: rgba(255,255,255,.05); border-radius: 12px; padding: 16px;
}
.rc-divider { height: 1px; background: rgba(255,255,255,.1); margin: 18px 0; }
.rc-stats { display: flex; gap: 12px; }
.rc-stat { flex: 1; background: rgba(255,255,255,.06); border-radius: 12px; padding: 14px; }
.rc-stat-v { font-size: 17px; font-weight: 700; color: #fff; }
.rc-stat-l { font-size: 12px; color: #94a3b8; margin-top: 4px; }
.rc-date { margin-top: 16px; font-size: 12px; color: #64748b; }
.rc-actions { margin-top: 18px; }

/* ==================== 滚动条 ==================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #c8ccd6; border-radius: 3px; }
::-webkit-scrollbar-track { background: transparent; }

/* ==================== 宽屏 ==================== */
@media (min-width: 560px) {
  .phone-frame {
    height: min(92vh, 900px);
    width: 400px;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 10px #10141f, 0 0 0 11px #2a2f3d;
  }
}