/* =============================================================
   忆宇 AI 建站平台 - 全局样式 (阿里 / Ant Design 风格)
   主色 #1677ff · 浅色背景 #f5f7fa · 白色卡片圆角8px · 深蓝侧栏 #001529
   ============================================================= */
:root {
  /* 阿里 Ant Design 主色系 */
  --primary: #1677ff;            /* 主色(纯色,用于按钮/高亮) */
  --primary-solid: #1677ff;
  --primary-hover: #4096ff;
  --primary-deep: #0958d9;       /* 深蓝(链接/hover) */
  --bg: #f5f7fa;                 /* 全局浅灰背景 */
  --panel: #ffffff;              /* 卡片白底 */
  --border: #e8ecf2;             /* 细边框 */
  --text: #1f2733;               /* 主文字 */
  --muted: #8a94a3;              /* 次要文字 */
  --danger: #ff4d4f;
  --success: #52c41a;
  --warning: #faad14;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 2px 10px rgba(22, 44, 80, .06);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

/* ---------- 顶栏 ---------- */
.topbar { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 6px rgba(22,44,80,.04); }
.topbar-inner { max-width: 1280px; margin: 0 auto; padding: 0 20px; height: 60px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: .3px; }
.brand:hover { color: var(--text); }
.brand-logo { width: 30px; height: 30px; border-radius: 6px; flex-shrink: 0; object-fit: contain; display: inline-block; }
.main-nav { display: flex; align-items: center; gap: 26px; flex: 1; }
.main-nav a { color: var(--muted); font-size: 14px; position: relative; padding: 18px 0; transition: color .2s; }
.main-nav a:hover { color: var(--primary); }
.main-nav a.active { color: var(--primary); font-weight: 600; }
.main-nav a.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--primary); }
.topbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.balance-pill {
  display: inline-flex; align-items: center; padding: 4px 12px;
  background: #e6f2ff; color: var(--primary); border-radius: 14px;
  font-weight: 600; font-size: 13px; white-space: nowrap;
}
.user-box { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.user-box:hover { color: var(--primary); }
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff; font-size: 14px; font-weight: 600;
}
.user-name { font-size: 14px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 6px 14px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 14px; line-height: 1.5; cursor: pointer; background: #fff; color: var(--text);
  transition: all .2s; text-decoration: none; vertical-align: middle;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 2px 6px rgba(22,119,255,.2); }
.btn-primary:hover { background: var(--primary-hover); color: #fff; border-color: var(--primary-hover); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--muted); }
.btn-ghost:hover { color: var(--primary); border-color: var(--primary); }
.btn-block { width: 100%; display: flex; justify-content: center; }
.btn-sm { padding: 2px 10px; font-size: 12px; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 13px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 7px 11px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 14px; background: #fff; color: var(--text); outline: none; transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(22,119,255,.15); }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.input-group { display: flex; gap: 8px; }
.input-group .field input { flex: 1; }
.input-group .btn { white-space: nowrap; }

/* ---------- 前台主区 ---------- */
.front-main { min-height: calc(100vh - 60px); }
.hero {
  position: relative; overflow: hidden;
  text-align: center; padding: 84px 20px 76px;
  background:
    radial-gradient(620px 300px at 18% 0%, rgba(22,119,255,.10), transparent 62%),
    radial-gradient(720px 320px at 85% 8%, rgba(64,150,255,.10), transparent 62%),
    linear-gradient(180deg, #eef4ff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
.hero::after {
  content: ''; position: absolute; left: 50%; bottom: -46px; transform: translateX(-50%);
  width: 760px; height: 120px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(22,119,255,.12), transparent);
  filter: blur(10px); pointer-events: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; margin-bottom: 24px;
  border: 1px solid #d6e6ff; background: #fff; color: var(--primary);
  border-radius: 999px; font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow);
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(82,196,26,.16); }
.hero h1 { font-size: 44px; margin: 0 0 18px; font-weight: 800; letter-spacing: .5px; line-height: 1.25; }
.hero h1 .grad {
  background: linear-gradient(90deg, var(--primary) 0%, #4096ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--muted); font-size: 16px; margin: 0 auto 34px; max-width: 680px; }
.hero-cta { display: flex; justify-content: center; gap: 14px; position: relative; z-index: 2; }
.hero-cta .btn-primary { font-size: 16px; padding: 11px 32px; border-radius: 8px; }
.hero-cta .btn-ghost { font-size: 16px; padding: 11px 28px; border-radius: 8px; background: #fff; }
.hero-stats { display: flex; justify-content: center; gap: 64px; margin-top: 54px; position: relative; z-index: 2; }
.hero-stats .stat b { font-size: 30px; color: var(--primary); display: block; font-weight: 800; }
.hero-stats .stat span { color: var(--muted); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 20px; }
.section-title { text-align: center; font-size: 26px; margin: 0 0 30px; font-weight: 700; }

/* 6 宫格 */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  display: block; background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s; color: var(--text);
}
.card:hover { box-shadow: 0 6px 20px rgba(22,44,80,.1); transform: translateY(-2px); color: var(--text); }
.card .icon { font-size: 30px; margin-bottom: 10px; }
.card .icon svg { width: 30px; height: 30px; color: var(--primary); }
/* 首页功能卡图标(Feather 线性) */
.card-icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eef4ff, #deedff);
  border: 1px solid #d6e6ff; color: var(--primary);
  margin-bottom: 14px; transition: transform .25s, box-shadow .25s;
}
.card-icon svg { width: 26px; height: 26px; }
.card:hover .card-icon { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(22,119,255,.20); }
.card h3 { margin: 0 0 8px; font-size: 17px; }
.card p { color: var(--muted); font-size: 13px; margin: 0; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; position: relative; }
.steps::before {
  content: ''; position: absolute; top: 25px; left: 12%; right: 12%;
  height: 2px; background: repeating-linear-gradient(90deg, var(--border) 0 6px, transparent 6px 12px);
}
.steps .step { position: relative; z-index: 1; text-align: center; padding: 0 20px; }
.steps .step b {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: #fff; color: var(--primary); border: 2px solid #d6e6ff;
  margin-bottom: 14px; font-weight: 700; font-size: 18px; box-shadow: var(--shadow);
}
.steps .step p { margin: 0; color: var(--muted); font-size: 14px; font-weight: 500; }

/* ---------- 页脚 ---------- */
.footer { background: #fff; border-top: 1px solid var(--border); margin-top: 40px; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 32px 20px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-brand { font-size: 18px; font-weight: 700; }
.footer-links { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-col h4 { margin: 0 0 10px; font-size: 14px; }
.footer-col a { display: block; color: var(--muted); font-size: 13px; padding: 2px 0; }
.footer-col a:hover { color: var(--primary); }
.footer-copy { text-align: center; color: var(--muted); font-size: 12px; padding: 16px; border-top: 1px solid var(--border); }

/* ---------- 后台布局 (简约白色侧栏) ---------- */
.layout { display: flex; min-height: calc(100vh - 60px); }
.sidebar {
  width: 232px; background: #fff; color: var(--text); flex-shrink: 0;
  position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; z-index: 40;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--border);
}
.menu-btn { display: none; border: 0; background: none; font-size: 22px; cursor: pointer; line-height: 1; padding: 4px 8px; color: var(--text); }
.sidebar-head { display: none; align-items: center; justify-content: flex-end; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text); flex-shrink: 0; }
.sidebar-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.sidebar-logo:hover { color: var(--text); }
.sidebar-title { font-weight: 700; font-size: 15px; letter-spacing: .5px; }
.nav-toggle { cursor: pointer; font-size: 15px; color: var(--muted); border: 1px solid var(--border); border-radius: 6px; background: #fff; padding: 4px 9px; line-height: 1; }
.sidebar-nav { padding: 8px 8px; flex: 1; overflow-y: auto; }
.nav-group { margin-bottom: 8px; }
.nav-caption {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 12px 6px; color: var(--text); font-size: 13px;
  letter-spacing: .5px; font-weight: 600; cursor: pointer; user-select: none;
  border-bottom: 1px solid var(--border); margin-bottom: 6px;
}
.nav-caption:hover { color: var(--primary); }
.cap-arrow { font-size: 10px; transition: transform .2s; color: var(--muted); }
.nav-group.collapsed .cap-arrow { transform: rotate(-90deg); }
.nav-group.collapsed .nav-collapse { display: none; }
.nav-sub {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 12px 4px 18px; color: #a0a8b5;
  font-size: 11px; letter-spacing: .5px;
}
.nav-sub::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: #c3cad6; flex-shrink: 0; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px 8px 30px; margin: 2px 0; border-radius: 8px;
  color: #3d4757; font-size: 14px;
  transition: background .2s, color .2s;
}
.nav-ico { width: 17px; height: 17px; flex-shrink: 0; opacity: .75; color: #6b7686; }
.nav-item:hover { background: #f5f7fa; color: var(--primary); }
.nav-item:hover .nav-ico { color: var(--primary); }
.nav-item.active { background: #e6f2ff; color: var(--primary); font-weight: 600; }
.nav-item.active .nav-ico { color: var(--primary); opacity: 1; }

.main { flex: 1; padding: 24px 28px; min-width: 0; }

/* ---------- 通用面板/统计 ---------- */
.page-title { margin: 0 0 20px; font-size: 22px; font-weight: 700; }
.panel {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px;
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow); transition: transform .15s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card b { font-size: 24px; color: var(--primary); display: block; }
.stat-card span { color: var(--muted); font-size: 13px; }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 14px; text-align: left; font-size: 13px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { background: #fafbfc; color: var(--muted); font-weight: 600; white-space: nowrap; }
.table tbody tr:hover { background: #f7faff; }
.table tr:last-child td { border-bottom: none; }
.table .muted { color: var(--muted); }

/* ---------- 状态标签 ---------- */
.tag {
  display: inline-block; padding: 1px 9px; border-radius: 4px; font-size: 12px;
  line-height: 20px; background: #f2f4f7; color: var(--muted); border: 1px solid var(--border);
}
.tag-success { background: #f0feeb; color: var(--success); border-color: #c3ecb0; }
.tag-warn { background: #fff7e6; color: var(--warning); border-color: #ffe7a3; }
.tag-danger { background: #fff1f0; color: var(--danger); border-color: #ffd6d4; }
.tag-primary { background: #e6f2ff; color: var(--primary); border-color: #b7d6ff; }

/* ---------- Tabs (阿里分段/页签) ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tab {
  padding: 6px 16px; border: 1px solid var(--border); border-radius: 6px;
  background: #fff; color: var(--text); cursor: pointer; font-size: 14px; transition: all .2s;
}
.tab:hover { color: var(--primary); border-color: var(--primary); }
.tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.ptab { margin-bottom: 16px; }

/* ---------- 进度条 ---------- */
.progress { height: 8px; background: #eef1f5; border-radius: 4px; overflow: hidden; margin-bottom: 10px; }
.progress-bar { height: 100%; background: var(--primary); border-radius: 4px; transition: width .3s; }

/* ---------- 单选框 ---------- */
.radio { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 14px; margin-bottom: 6px; }

/* ---------- 提示条 ---------- */
.alert {
  padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; font-size: 13px; cursor: pointer;
  background: #f0f6ff; color: var(--primary); border: 1px solid #b7d6ff;
}
.alert-success { background: #f0feeb; color: var(--success); border-color: #c3ecb0; }
.alert-error { background: #fff1f0; color: var(--danger); border-color: #ffd6d4; }

/* ---------- 日志输出区 ---------- */
.stream-output {
  background: #f7f8fa; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px; min-height: 120px; white-space: pre-wrap; font-size: 12px; color: var(--text);
}

/* ---------- 认证页 ---------- */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 40px 16px;
  background: linear-gradient(135deg, #eef4ff 0%, var(--bg) 100%);
}
.auth-box {
  width: 420px; max-width: 100%; background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 36px 32px 30px; box-shadow: 0 12px 40px rgba(22,44,80,.1);
}
.auth-box h2 { margin: 0 0 6px; font-size: 22px; }
.auth-box .sub { color: var(--muted); margin: 0 0 22px; font-size: 13px; }
.auth-box .foot { text-align: center; margin-top: 18px; color: var(--muted); font-size: 13px; }

/* ---------- 弹窗 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100; display: none; align-items: center; justify-content: center; }
.modal-mask.open { display: flex; }
.modal { background: #fff; border-radius: 12px; width: 420px; max-width: 92vw; padding: 24px; box-shadow: 0 12px 40px rgba(0,0,0,.18); }
.modal-title { font-size: 17px; font-weight: 600; margin-bottom: 16px; }

/* ---------- 聊天页 ---------- */
.chat-page { display: flex; gap: 16px; height: calc(100vh - 130px); }
.chat-sessions {
  width: 220px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; overflow-y: auto; flex-shrink: 0;
}
.session-item {
  padding: 10px 12px; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: background .15s;
}
.session-item:hover { background: #f5f7fa; }
.session-item.active { background: #e6f2ff; color: var(--primary); }
.chat-main {
  flex: 1; background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; flex-direction: column; min-width: 0;
}
.chat-head { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: #fafbfc; }
.chat-empty { color: var(--muted); text-align: center; margin: auto; }
.msg { max-width: 80%; padding: 10px 14px; border-radius: 8px; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.msg.user { align-self: flex-end; background: var(--primary); color: #fff; }
.msg.assistant { align-self: flex-start; background: #fff; border: 1px solid var(--border); color: var(--text); }
.chat-input { display: flex; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border); }
.chat-input textarea { flex: 1; resize: none; border: 1px solid var(--border); border-radius: 8px; padding: 10px; font-family: inherit; outline: none; }
.chat-input textarea:focus { border-color: var(--primary); }
.model-price { margin-left: 10px; color: var(--muted); font-size: 12px; }
@media (max-width: 700px) {
  .chat-sessions { width: 64px; }
  .chat-sessions .session-item { font-size: 0; }
  .chat-sessions .session-item::first-letter { font-size: 14px; }
}

/* ---------- 会话/群聊列表项 ---------- */
.sess, .gitem { transition: background .15s; }
.sess:hover, .gitem:hover { background: #f5f7fa; }
.sess.active, .gitem.active { background: #e6f2ff; }

/* ---------- 桌面/移动端 ---------- */
.viewport-switch {
  position: fixed; right: 12px; bottom: 12px; z-index: 60; display: flex;
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; box-shadow: var(--shadow);
}
.viewport-switch button { border: none; background: transparent; padding: 6px 14px; cursor: pointer; font-size: 13px; }
.viewport-switch button.on { background: var(--primary); color: #fff; }
body.mobile .front-main, body.mobile .main { max-width: 480px; margin: 0 auto; }

/* 响应式 */
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .sidebar { width: 200px; }
}
@media (max-width: 640px) {
  .grid-3, .steps, .stats-grid { grid-template-columns: 1fr; }
  .main-nav { display: none; }
  .menu-btn { display: inline-flex; }
  .sidebar { position: fixed; left: -100%; transition: left .25s; height: 100vh; top: 0; box-shadow: 4px 0 20px rgba(0,0,0,.1); }
  .sidebar.open { left: 0; }
  .hero h1 { font-size: 30px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* =============================================================
   客户控制台: 底部 Tab 导航栏 (仅手机/平板显示; 桌面用左侧菜单栏)
   ============================================================= */
.tabbar {
  display: none;                 /* 桌面隐藏 */
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 560px;
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 16px rgba(22, 44, 80, .06);
  z-index: 90;
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 9px 0 8px;
  color: #9aa4b1;
  font-size: 11px;
  text-decoration: none;
  transition: color .15s;
}
.tabbar-item svg { width: 22px; height: 22px; }
.tabbar-item:hover { color: #5b6472; }
.tabbar-item.active { color: #1677ff; font-weight: 600; }

#console-nav a:hover { color: #1677ff; }

/* ---- 手机/平板 (UA 自动检测) 优先应用移动布局 ---- */
body.device-mobile .tabbar,
body.device-tablet .tabbar { display: flex; max-width: 100%; }
body.device-mobile .menu-btn,
body.device-tablet .menu-btn { display: inline-flex; }
body.device-mobile .sidebar,
body.device-tablet .sidebar { position: fixed; left: -100%; transition: left .25s; height: 100vh; top: 0; box-shadow: 4px 0 20px rgba(0,0,0,.1); }
body.device-mobile .sidebar.open,
body.device-tablet .sidebar.open { left: 0; }
body.device-mobile .sidebar-head,
body.device-tablet .sidebar-head { display: flex; }
body.device-mobile .layout .main,
body.device-tablet .layout .main { padding-bottom: 84px; }

/* ---- 窄视口 (CSS 媒体查询) 兜底: UA 识别不到时按屏幕宽度自动适应 ---- */
@media (max-width: 960px) {
  .tabbar { display: flex; max-width: 100%; }
  .menu-btn { display: inline-flex; }
  .sidebar { position: fixed; left: -100%; transition: left .25s; height: 100vh; top: 0; box-shadow: 4px 0 20px rgba(0,0,0,.1); }
  .sidebar.open { left: 0; }
  .sidebar-head { display: flex; }
  body.backend .layout .main { padding-bottom: 84px; }
  body.front .front-main.console { padding-bottom: 84px; }
}

/* ---------- 进入系统 3s 浅色科技风入场 (Splash) ---------- */
.splash {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(620px 320px at 16% 0%, rgba(22,119,255,.10), transparent 62%),
    radial-gradient(700px 340px at 86% 6%, rgba(64,150,255,.12), transparent 62%),
    linear-gradient(180deg, #eef4ff 0%, #f8fbff 100%);
  color: #1f2733; overflow: hidden;
  transition: opacity .6s ease, visibility .6s ease;
}
.splash.hide { opacity: 0; visibility: hidden; pointer-events: none; }
/* 透视科技网格 */
.splash-grid {
  position: absolute; left: 0; right: 0; bottom: 0; height: 46%;
  background-image:
    linear-gradient(rgba(22,119,255,.20) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22,119,255,.20) 1px, transparent 1px);
  background-size: 38px 38px;
  transform: perspective(340px) rotateX(64deg);
  transform-origin: 50% 0;
  animation: gridMove 1.1s linear infinite;
  -webkit-mask-image: linear-gradient(to top, rgba(255,255,255,.95), transparent);
  mask-image: linear-gradient(to top, rgba(255,255,255,.95), transparent);
  pointer-events: none;
}
/* 数字雨 */
.splash-matrix { position: absolute; inset: 0; opacity: .5; pointer-events: none; }
.splash-matrix span {
  position: absolute; font-family: Consolas, Menlo, monospace; font-size: 13px;
  color: #2f7bff; text-shadow: 0 0 7px rgba(47,123,255,.35);
}
/* 中央主视觉 */
.splash-stage { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; }
.splash-logo-wrap {
  position: relative; width: 96px; height: 96px;
  display: flex; align-items: center; justify-content: center;
}
.splash-logo-wrap::before {
  content: ''; position: absolute; inset: 0; border-radius: 22px;
  background: #fff; border: 1px solid #d6e6ff;
  box-shadow: 0 4px 18px rgba(22,119,255,.18), inset 0 0 14px rgba(22,119,255,.12);
  animation: splashPulse 1.8s ease-out infinite;
}
.splash-logo { position: relative; z-index: 1; width: 46px; height: 46px; object-fit: contain; border-radius: 10px; display: block; }
.splash-name {
  margin-top: 22px; font-size: 24px; font-weight: 800; letter-spacing: 3px; text-align: center;
  color: #0958d9; text-shadow: 0 1px 2px rgba(9,88,217,.12);
  animation: splashFadeUp .7s ease both;
}
/* 终端开机日志 */
.splash-term {
  margin-top: 26px; width: 340px; max-width: 86vw; min-height: 118px;
  text-align: left; font-family: Consolas, Menlo, monospace; font-size: 13px;
  color: #1f2733; line-height: 1.9;
  padding: 12px 14px; border: 1px solid #d6e6ff; border-radius: 8px;
  background: rgba(255,255,255,.92); box-shadow: 0 6px 20px rgba(22,119,255,.10);
}
.splash-term .t-line { opacity: 0; animation: tIn .22s forwards; }
.splash-term .t-prompt { color: #0958d9; }
.splash-term .t-ok { color: #16a34a; }
.splash-term .t-link { color: #7c3aed; }
.splash-term .t-cur {
  display: inline-block; width: 8px; height: 13px; margin-left: 2px; vertical-align: -2px;
  background: #1677ff; box-shadow: 0 0 8px rgba(22,119,255,.7); animation: cur .85s steps(1) infinite;
}
/* 进度条 */
.splash-progress { margin-top: 20px; width: 340px; max-width: 86vw; height: 4px; position: relative; background: rgba(22,119,255,.18); border-radius: 2px; overflow: visible; }
.splash-progress i { position: absolute; left: 0; top: 0; bottom: 0; width: 0%; border-radius: 2px; background: linear-gradient(90deg, #4096ff, #1677ff, #22d3ee); box-shadow: 0 0 10px rgba(22,119,255,.8); transition: width .2s linear; }
.splash-progress b { position: absolute; top: -19px; right: 0; font-size: 12px; color: #1677ff; font-family: Consolas, Menlo, monospace; font-weight: 600; }
@keyframes gridMove { from { background-position: 0 0; } to { background-position: 0 38px; } }
@keyframes matrixFall { from { top: -8%; } to { top: 112%; } }
@keyframes tIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes cur { 50% { opacity: 0; } }
@keyframes splashPulse {
  0% { box-shadow: 0 4px 14px rgba(22,119,255,.14), inset 0 0 10px rgba(22,119,255,.10); }
  50% { box-shadow: 0 6px 26px rgba(22,119,255,.34), inset 0 0 18px rgba(22,119,255,.20); }
  100% { box-shadow: 0 4px 14px rgba(22,119,255,.14), inset 0 0 10px rgba(22,119,255,.10); }
}
@keyframes splashFadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .splash-grid, .splash-matrix span, .splash-logo-wrap::before, .splash-term .t-cur { animation: none; }
  .splash { transition: opacity .35s ease; }
}

/* =============================================================
   手机/平板端精简版 —— 暖色主题 (仅 device-mobile / device-tablet 生效)
   仅保留: AI网站智能生成 / 在线对话 / 任务记录
   PC 端蓝色科技风不受影响
   ============================================================= */
:is(body.device-mobile, body.device-tablet) {
  --primary: #C4903F;            /* 暖金主色 */
  --primary-hover: #D4A257;
  --primary-deep: #A87B30;
  --bg: #F6F4EF;                 /* 暖米灰页面底 */
  --border: #ECE7DE;             /* 暖调细边框 */
  --text: #2C2620;
  --muted: #9A9080;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 2px 10px rgba(120, 90, 40, .06);
  --gold-grad: linear-gradient(135deg, #DFAE60 0%, #C48F3C 100%);
}

/* ---------- 顶部栏 ---------- */
:is(body.device-mobile, body.device-tablet) .topbar { box-shadow: 0 1px 6px rgba(120,90,40,.05); }
:is(body.device-mobile, body.device-tablet) .topbar-inner { height: 52px; padding: 0 14px; gap: 10px; }
:is(body.device-mobile, body.device-tablet) .brand-name { display: none; }
:is(body.device-mobile, body.device-tablet) .main-nav { display: none; }
:is(body.device-mobile, body.device-tablet) .topbar-right { display: none; }
:is(body.device-mobile, body.device-tablet) .menu-btn { display: none; }

.m-more-btn {
  display: none; height: 36px; margin-left: auto;
  padding: 0 14px; gap: 5px;
  border-radius: 18px; border: 1px solid #E6DECF; background: #fff;
  color: #8A7450; font-size: 13px; font-weight: 600;
  align-items: center; justify-content: center; cursor: pointer;
}
.m-more-btn svg { width: 18px; height: 18px; color: #B08235; }
:is(body.device-mobile, body.device-tablet) .m-more-btn { display: inline-flex; margin-left: auto; }

/* ---------- 主区/面板暖色化 ---------- */
:is(body.device-mobile, body.device-tablet) .layout { display: block; }
:is(body.device-mobile, body.device-tablet) .layout .main {
  padding: 16px 14px calc(84px + env(safe-area-inset-bottom));
}
:is(body.device-mobile, body.device-tablet) .page-title { font-size: 19px; margin-bottom: 14px; }
:is(body.device-mobile, body.device-tablet) .panel {
  border-radius: 14px; padding: 16px;
  box-shadow: 0 2px 12px rgba(120, 90, 40, .05);
}
:is(body.device-mobile, body.device-tablet) .btn { border-radius: 10px; }
:is(body.device-mobile, body.device-tablet) .btn-primary {
  background: var(--gold-grad); border-color: transparent;
  box-shadow: 0 4px 12px rgba(196, 143, 60, .28);
}
:is(body.device-mobile, body.device-tablet) .btn-primary:hover {
  background: var(--gold-grad); border-color: transparent; color: #fff;
}
:is(body.device-mobile, body.device-tablet) .field input,
:is(body.device-mobile, body.device-tablet) .field textarea,
:is(body.device-mobile, body.device-tablet) .field select {
  border-radius: 10px; padding: 11px 13px; font-size: 15px;
  background: #fff;
}
:is(body.device-mobile, body.device-tablet) .field input:focus,
:is(body.device-mobile, body.device-tablet) .field textarea:focus,
:is(body.device-mobile, body.device-tablet) .field select:focus {
  border-color: #D9B572; box-shadow: 0 0 0 3px rgba(196, 143, 60, .14);
}
:is(body.device-mobile, body.device-tablet) .progress-bar { background: var(--gold-grad); }
:is(body.device-mobile, body.device-tablet) .tag-primary { background: #FBF3E3; color: #B08235; border-color: #EAD9B4; }
:is(body.device-mobile, body.device-tablet) .tab.active { background: var(--gold-grad); border-color: transparent; }

/* ---------- 底部 3 Tab + 中间凸起主按钮 ---------- */
:is(body.device-mobile, body.device-tablet) .tabbar {
  background: #fff; border-top: 1px solid var(--border);
  box-shadow: 0 -3px 18px rgba(120, 90, 40, .08);
}
:is(body.device-mobile, body.device-tablet) .tabbar-item {
  justify-content: flex-end;
  padding: 7px 0 calc(8px + env(safe-area-inset-bottom));
  color: #A79E8F; font-size: 11px;
}
:is(body.device-mobile, body.device-tablet) .tabbar-item svg { width: 23px; height: 23px; }
:is(body.device-mobile, body.device-tablet) .tabbar-item.active { color: #B08235; }
.tabbar-center { position: relative; }
.tabbar-center > span:last-child { line-height: 1; }
.tabbar-add-btn {
  position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--gold-grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid #fff;
  box-shadow: 0 7px 16px rgba(196, 143, 60, .42);
}
.tabbar-add-btn svg { width: 25px !important; height: 25px !important; }
.tabbar-center.active .tabbar-add-btn { box-shadow: 0 7px 20px rgba(196, 143, 60, .6); }

/* ---------- 右上角"更多"半屏弹层 ---------- */
.m-sheet-mask {
  position: fixed; inset: 0; z-index: 200; display: none;
  background: rgba(45, 35, 20, .42);
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
}
.m-sheet {
  position: fixed; left: 50%; bottom: 0; transform: translate(-50%, 100%);
  z-index: 201; display: none;
  width: 100%; max-width: 560px;
  background: #fff; border-radius: 20px 20px 0 0;
  padding: 8px 18px calc(20px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 36px rgba(60, 40, 10, .16);
  transition: transform .28s ease;
}
:is(body.device-mobile, body.device-tablet) .m-sheet-mask { display: block; }
:is(body.device-mobile, body.device-tablet) .m-sheet { display: block; }
.m-sheet-mask.open { opacity: 1; visibility: visible; }
.m-sheet.open { transform: translate(-50%, 0); }
.m-sheet-bar { width: 40px; height: 4px; border-radius: 2px; background: #E4DED2; margin: 6px auto 16px; }
.m-sheet-head { display: flex; align-items: center; gap: 12px; padding: 4px 2px 16px; border-bottom: 1px solid var(--border); }
.m-sheet-avatar {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold-grad); color: #fff; font-size: 19px; font-weight: 700;
}
.m-sheet-uname { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.m-vip-badge {
  font-size: 10px; font-weight: 700; color: #fff; background: var(--gold-grad);
  border-radius: 5px; padding: 1px 6px; letter-spacing: .5px;
}
.m-sheet-bal { font-size: 13px; color: var(--muted); margin-top: 2px; }
.m-sheet-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
  padding: 18px 0 16px; border-bottom: 1px solid var(--border);
}
.m-sheet-grid a {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  color: var(--text); font-size: 11.5px; text-decoration: none;
}
.m-sheet-grid a svg { width: 24px; height: 24px; color: #B08235; }
.m-sheet-tip {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 16px 0 14px; padding: 11px 13px;
  background: #FBF8F1; border: 1px solid #F0E7D2; border-radius: 12px;
  font-size: 12px; line-height: 1.6; color: #8A7C5F;
}
.m-sheet-tip svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; color: #C49A52; }
.m-sheet-logout {
  display: block; text-align: center; padding: 12px;
  border: 1px solid var(--border); border-radius: 12px;
  color: #B05B3A; font-size: 15px; text-decoration: none; background: #fff;
}

/* ---------- 任务记录: 卡片流 ---------- */
:is(body.device-mobile, body.device-tablet) #task-tabs {
  flex-wrap: nowrap; overflow-x: auto; gap: 8px;
  margin: 0 -14px 14px; padding: 2px 14px 6px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
:is(body.device-mobile, body.device-tablet) #task-tabs::-webkit-scrollbar { display: none; }
:is(body.device-mobile, body.device-tablet) #task-tabs .btn { flex: 0 0 auto; }
.task-panel-desktop { }
.m-task-list { display: none; }
:is(body.device-mobile, body.device-tablet) .task-panel-desktop { display: none; }
:is(body.device-mobile, body.device-tablet) .m-task-list {
  display: flex; flex-direction: column; gap: 12px;
}
.m-task-card {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 14px; box-shadow: 0 2px 12px rgba(120, 90, 40, .05);
}
.mtc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mtc-type { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 600; }
.mtc-type::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold-grad); flex-shrink: 0;
}
.mtc-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.mtc-row .progress { flex: 1; margin-bottom: 0; }
.mtc-pct { font-size: 12px; color: var(--muted); min-width: 36px; text-align: right; }
.mtc-meta { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted); }
.mtc-meta b { color: #B08235; font-weight: 600; }
.mtc-actions { margin-top: 12px; display: flex; gap: 8px; }
.mtc-actions .btn { flex: 1; padding: 8px 0; }
.m-task-empty {
  display: none; text-align: center; color: var(--muted);
  background: #fff; border: 1px dashed var(--border); border-radius: 14px; padding: 46px 20px;
}
:is(body.device-mobile, body.device-tablet) .m-task-empty.show { display: block; }

/* ---------- AI 建站: 向导式极简表单 ---------- */
:is(body.device-mobile, body.device-tablet) .build-grid {
  grid-template-columns: 1fr !important; gap: 14px;
}
:is(body.device-mobile, body.device-tablet) #prompt {
  min-height: 150px; line-height: 1.7; border-radius: 12px;
}
.prompt-wrap { position: relative; }
.m-mic-btn {
  display: none; position: absolute; right: 10px; bottom: 10px;
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
  background: #fff; color: #B08235; align-items: center; justify-content: center; cursor: pointer;
}
.m-mic-btn svg { width: 18px; height: 18px; }
.m-mic-btn.recording { background: #FBE9E7; border-color: #E8B4AA; color: #C0563B; }
:is(body.device-mobile, body.device-tablet) .m-mic-btn { display: inline-flex; }

/* PHP / HTML 分段选择 (桌面/移动通用) */
.seg { display: flex; gap: 10px; }
.seg label { flex: 1; position: relative; display: block; }
.seg input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.seg span {
  display: block; text-align: center; padding: 11px 8px;
  border: 1px solid var(--border); border-radius: 10px; background: #fff;
  font-size: 14px; color: var(--muted); cursor: pointer; transition: all .15s;
}
.seg input:checked + span {
  border-color: #D9B572; background: #FBF3E3; color: #9C6F26;
  font-weight: 600; box-shadow: inset 0 0 0 1px #EAD3A5;
}

/* 高级设置折叠 (仅手机端折叠, 桌面端直接展开) */
.m-advanced { display: contents; }
.m-advanced summary { display: none; }
:is(body.device-mobile, body.device-tablet) .m-advanced {
  display: block; background: #FBFAF7; border: 1px solid var(--border);
  border-radius: 12px; margin-bottom: 16px;
}
:is(body.device-mobile, body.device-tablet) .m-advanced summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 14px; cursor: pointer; list-style: none;
  font-size: 14px; font-weight: 600; color: #7A6E58;
}
:is(body.device-mobile, body.device-tablet) .m-advanced summary::-webkit-details-marker { display: none; }
:is(body.device-mobile, body.device-tablet) .m-advanced summary::after {
  content: '▾'; color: #B3A487; font-size: 13px; transition: transform .2s;
}
:is(body.device-mobile, body.device-tablet) .m-advanced[open] summary::after { transform: rotate(180deg); }
:is(body.device-mobile, body.device-tablet) .m-advanced .adv-body { padding: 2px 14px 14px; }

:is(body.device-mobile, body.device-tablet) #costPreview {
  background: #FBF3E3; border-color: #EFDDB6; color: #8A6A2B; border-radius: 12px;
}
:is(body.device-mobile, body.device-tablet) #buildBtn { padding: 14px; font-size: 16px; border-radius: 14px; }
:is(body.device-mobile, body.device-tablet) .stream-output { border-radius: 12px; min-height: 90px; }

/* ---------- 在线对话: 全屏 IM 形态 ---------- */
:is(body.device-mobile, body.device-tablet).page-chat .main { padding: 0 !important; }
:is(body.device-mobile, body.device-tablet).page-chat .chat-page {
  height: calc(100vh - 52px - 64px - env(safe-area-inset-bottom));
  height: calc(100dvh - 52px - 64px - env(safe-area-inset-bottom));
  gap: 0;
}
:is(body.device-mobile, body.device-tablet).page-chat .chat-main { border: 0; border-radius: 0; }
.m-chat-menu {
  display: none; width: 38px; height: 38px; flex-shrink: 0;
  border: 1px solid var(--border); border-radius: 10px; background: #fff;
  color: var(--text); align-items: center; justify-content: center; cursor: pointer;
}
.m-chat-menu svg { width: 19px; height: 19px; }
:is(body.device-mobile, body.device-tablet).page-chat .m-chat-menu { display: inline-flex; }
:is(body.device-mobile, body.device-tablet).page-chat .chat-head { padding: 8px 12px; gap: 10px; }
:is(body.device-mobile, body.device-tablet).page-chat .chat-head select {
  flex: 1; min-width: 0; height: 40px; border-radius: 10px; padding: 7px 10px;
}
:is(body.device-mobile, body.device-tablet).page-chat .model-price { display: none; }
:is(body.device-mobile, body.device-tablet).page-chat .chat-messages { padding: 14px 13px; background: #F6F4EF; }
:is(body.device-mobile, body.device-tablet).page-chat .msg { max-width: 84%; border-radius: 14px; }
:is(body.device-mobile, body.device-tablet).page-chat .msg.user { background: var(--gold-grad); }
:is(body.device-mobile, body.device-tablet).page-chat .chat-input {
  padding: 9px 12px 10px; gap: 9px; background: #fff; border-top: 1px solid var(--border);
}
:is(body.device-mobile, body.device-tablet).page-chat .chat-input textarea {
  border-radius: 20px; min-height: 40px; max-height: 96px; padding: 9px 15px; font-size: 15px;
}
:is(body.device-mobile, body.device-tablet).page-chat #chat-send {
  border-radius: 20px; padding: 0 20px; flex-shrink: 0;
}

/* 会话列表: 左侧全屏覆盖层 */
:is(body.device-mobile, body.device-tablet).page-chat .chat-sessions {
  position: fixed; z-index: 230; left: 0; top: 0; bottom: 0;
  width: 80%; max-width: 310px; border-radius: 0 16px 16px 0;
  padding: 16px 12px calc(16px + env(safe-area-inset-bottom));
  transform: translateX(-102%); transition: transform .25s ease;
  background: #fff;
}
:is(body.device-mobile, body.device-tablet).page-chat .chat-sessions.open {
  transform: none; box-shadow: 8px 0 32px rgba(60, 40, 10, .20);
}
:is(body.device-mobile, body.device-tablet).page-chat .chat-sessions .session-item {
  font-size: 14px !important; padding: 12px 13px;
}
:is(body.device-mobile, body.device-tablet).page-chat .session-item.active {
  background: #FBF3E3; color: #B08235;
}
.m-sess-head { display: none; }
:is(body.device-mobile, body.device-tablet).page-chat .m-sess-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; padding: 0 4px;
}
.m-sess-head b { font-size: 16px; }
.m-sess-close {
  border: 0; background: #F4EFE5; width: 30px; height: 30px; border-radius: 50%;
  color: #8A7C5F; cursor: pointer; font-size: 13px;
}
.m-chat-mask { display: none; }
:is(body.device-mobile, body.device-tablet).page-chat .m-chat-mask {
  position: fixed; inset: 0; z-index: 220; background: rgba(45, 35, 20, .4);
}
.m-chat-mask.open { display: block; }

/* =============================================================
   个人资料页 · 手机端简约版
   ============================================================= */
.m-profile-head { display: none; }
:is(body.device-mobile, body.device-tablet).page-profile { --mdev: 1; }
:is(body.device-mobile, body.device-tablet).page-profile .page-title { display: none; }
:is(body.device-mobile, body.device-tablet).page-profile .profile-grid {
  grid-template-columns: 1fr !important; gap: 14px;
}
/* 头像信息卡 (仅手机显示) */
:is(body.device-mobile, body.device-tablet).page-profile .m-profile-head {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 18px 16px; margin-bottom: 14px;
  box-shadow: 0 2px 12px rgba(120, 90, 40, .05);
}
.m-profile-avatar {
  width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold-grad); color: #fff; font-size: 23px; font-weight: 700;
}
.m-profile-name { font-size: 18px; font-weight: 700; line-height: 1.3; }
.m-profile-sub { font-size: 13px; color: var(--muted); margin-top: 1px;
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-profile-code {
  display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 600;
  color: #9C6F26; background: #FBF3E3; border: 1px solid #EAD9B4;
  border-radius: 6px; padding: 1px 9px;
}
/* 手机端隐藏 PC 冗余信息 (各页通用) */
:is(body.device-mobile, body.device-tablet) .m-hide { display: none !important; }
/* 表单: 全宽保存钮 */
:is(body.device-mobile, body.device-tablet).page-profile #profile-form .btn-primary {
  width: 100%; padding: 12px; font-size: 15px; margin-top: 2px;
}
:is(body.device-mobile, body.device-tablet).page-profile .panel h3 { font-size: 15px; }
/* 账户信息表格 -> 简洁列表行 */
:is(body.device-mobile, body.device-tablet).page-profile .m-info-panel table,
:is(body.device-mobile, body.device-tablet).page-profile .m-info-panel tbody,
:is(body.device-mobile, body.device-tablet).page-profile .m-info-panel tr { display: block; }
:is(body.device-mobile, body.device-tablet).page-profile .m-info-panel tr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid #F2EEE6;
}
:is(body.device-mobile, body.device-tablet).page-profile .m-info-panel tr:last-child { border-bottom: 0; padding-bottom: 2px; }
:is(body.device-mobile, body.device-tablet).page-profile .m-info-panel th,
:is(body.device-mobile, body.device-tablet).page-profile .m-info-panel td {
  padding: 0; border: 0; background: none; font-size: 13.5px; line-height: 1.5;
}
:is(body.device-mobile, body.device-tablet).page-profile .m-info-panel th {
  width: auto; font-weight: 400; color: var(--muted); white-space: nowrap;
}
:is(body.device-mobile, body.device-tablet).page-profile .m-info-panel td {
  text-align: right; color: var(--text); word-break: break-all;
}

/* =============================================================
   我的钱包 · 手机端简约版
   ============================================================= */
.m-wallet-hero { display: none; }
:is(body.device-mobile, body.device-tablet).page-wallet .page-title { display: none; }
:is(body.device-mobile, body.device-tablet).page-wallet .main {
  display: flex; flex-direction: column;
}
/* 余额主卡 */
:is(body.device-mobile, body.device-tablet).page-wallet .m-wallet-hero {
  display: block; order: 1;
  background: linear-gradient(150deg, #FDF7EA 0%, #F8EDD5 55%, #F3E2BC 100%);
  border: 1px solid #ECDCB8; border-radius: 18px;
  padding: 20px 18px 16px; margin-bottom: 14px;
  box-shadow: 0 4px 16px rgba(160, 120, 50, .10);
}
.m-wh-label { font-size: 12.5px; color: #9A8456; }
.m-wh-balance {
  font-size: 34px; font-weight: 800; color: #6E4E17;
  line-height: 1.25; margin: 2px 0 14px; letter-spacing: .5px;
}
.m-wh-mini {
  display: flex; gap: 8px; padding: 12px 0;
  border-top: 1px solid rgba(176, 130, 53, .18);
  border-bottom: 1px solid rgba(176, 130, 53, .18);
}
.m-wh-item { flex: 1; text-align: center; }
.m-wh-item + .m-wh-item { border-left: 1px solid rgba(176, 130, 53, .18); }
.m-wh-item b { display: block; font-size: 15px; color: #7A5A22; font-weight: 700; }
.m-wh-item span { display: block; font-size: 11px; color: #A6905F; margin-top: 3px; }
.m-wh-punch {
  width: 100%; margin-top: 14px; padding: 12px;
  border: 0; border-radius: 13px; cursor: pointer;
  background: var(--gold-grad); color: #fff;
  font-size: 15px; font-weight: 700;
  box-shadow: 0 5px 14px rgba(196, 143, 60, .34);
}
.m-wh-punch:disabled {
  background: #ECE5D5; color: #A99B7D; box-shadow: none; cursor: default;
}
/* 区块顺序: 充值/卡密 → 优惠券 */
:is(body.device-mobile, body.device-tablet).page-wallet .wallet-grid { order: 2; }
:is(body.device-mobile, body.device-tablet).page-wallet .wallet-row-coupons { order: 3; }
:is(body.device-mobile, body.device-tablet).page-wallet .wallet-grid {
  grid-template-columns: 1fr !important; gap: 14px;
}
:is(body.device-mobile, body.device-tablet).page-wallet .wallet-row-coupons {
  grid-template-columns: 1fr !important; margin-bottom: 0;
}
:is(body.device-mobile, body.device-tablet).page-wallet .wallet-row-coupons .panel { margin: 0; }
/* 支付方式两钮均分 */
:is(body.device-mobile, body.device-tablet).page-wallet .pay-method { flex: 1; padding: 11px 0; }
:is(body.device-mobile, body.device-tablet).page-wallet .panel h3 { font-size: 15px; }
:is(body.device-mobile, body.device-tablet).page-wallet #recharge-btn,
:is(body.device-mobile, body.device-tablet).page-wallet #card-btn { padding: 13px; font-size: 15px; border-radius: 12px; }

/* 支付完成返回提示条 (双端通用) */
.pay-back-tip {
  border-radius: 12px; padding: 12px 15px; margin-bottom: 14px;
  font-size: 14px; line-height: 1.5; border: 1px solid;
}
.pay-back-tip.ok {
  background: #F3FAF2; border-color: #CFE8C9; color: #3F7A33;
}
.pay-back-tip.warn {
  background: #FBF3E3; border-color: #EAD9B4; color: #9C6F26;
}

/* =============================================================
   我的订单 · 手机端简约版 (筛选横滑 + 卡片流)
   ============================================================= */
:is(body.device-mobile, body.device-tablet).page-orders .page-title { display: none; }
/* 筛选 chips 横滑 */
:is(body.device-mobile, body.device-tablet).page-orders #order-tabs {
  flex-wrap: nowrap; overflow-x: auto; gap: 8px;
  margin: 0 -14px 14px !important; padding: 2px 14px 6px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
:is(body.device-mobile, body.device-tablet).page-orders #order-tabs::-webkit-scrollbar { display: none; }
:is(body.device-mobile, body.device-tablet).page-orders #order-tabs .btn {
  flex: 0 0 auto; border-radius: 16px; padding: 7px 16px;
}
:is(body.device-mobile, body.device-tablet).page-orders .order-panel-desktop { display: none; }
.m-order-list { display: none; }
:is(body.device-mobile, body.device-tablet).page-orders .m-order-list {
  display: flex; flex-direction: column; gap: 12px;
}
.m-order-card {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 15px; box-shadow: 0 2px 12px rgba(120, 90, 40, .05);
}
.moc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.moc-type { font-size: 14px; font-weight: 600; color: #6B5D48; }
.moc-amount {
  font-size: 24px; font-weight: 800; color: #2C2620; line-height: 1.2;
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px;
}
.moc-chg { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.moc-chg.up { color: #B08235; background: #FBF3E3; }
.moc-chg.down { color: #8A8175; background: #F4F1EA; }
.moc-no, .moc-remark, .moc-time { font-size: 12px; color: var(--muted); line-height: 1.6;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.moc-remark { color: #8A7C5F; }
.moc-time { margin-top: 1px; }
.m-order-pager { display: none; }
:is(body.device-mobile, body.device-tablet).page-orders .m-order-pager {
  display: flex; gap: 10px; align-items: center; justify-content: center;
  margin-top: 16px; font-size: 13px; color: var(--muted);
}
:is(body.device-mobile, body.device-tablet).page-orders .m-order-pager .btn {
  border-radius: 18px; padding: 8px 22px;
}
:is(body.device-mobile, body.device-tablet).page-orders #mOrderEmpty { display: none; }
:is(body.device-mobile, body.device-tablet).page-orders #mOrderEmpty.show { display: block; }

/* =============================================================
   联系客服(工单) · 手机端简约版
   ============================================================= */
:is(body.device-mobile, body.device-tablet).page-tickets .page-title { display: none; }
:is(body.device-mobile, body.device-tablet).page-tickets .ticket-grid {
  grid-template-columns: 1fr !important; gap: 14px;
}
:is(body.device-mobile, body.device-tablet).page-tickets .panel h3 { font-size: 15px; }
:is(body.device-mobile, body.device-tablet).page-tickets #ticketSubmitBtn {
  padding: 13px; font-size: 15px; border-radius: 12px;
}
:is(body.device-mobile, body.device-tablet).page-tickets #shots {
  font-size: 13px; padding: 9px 10px;
}
:is(body.device-mobile, body.device-tablet).page-tickets .ticket-panel-desktop { display: none; }
.m-ticket-list { display: none; }
:is(body.device-mobile, body.device-tablet).page-tickets .m-ticket-list {
  display: flex; flex-direction: column; gap: 12px;
}
.m-ticket-card {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 13px 15px; box-shadow: 0 2px 12px rgba(120, 90, 40, .05);
}
.mtc2-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px;
}
.mtc2-cat {
  font-size: 11.5px; font-weight: 600; color: #9C6F26;
  background: #FBF3E3; border: 1px solid #EAD9B4; border-radius: 6px;
  padding: 2px 9px;
}
.mtc2-title {
  font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.5;
  margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.mtc2-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--muted);
}
:is(body.device-mobile, body.device-tablet).page-tickets #tempty {
  border: 1px dashed var(--border); border-radius: 14px; background: #fff;
  margin-top: 0;
}
