/* ==================== 糯叽机 - 全局样式 ==================== */
:root {
  --bg: #000000;
  --surface: #ffffff;
  --surface-2: #f2f2f7;
  --text: #1c1c1e;
  --text-2: #6c6c70;
  --separator: #e5e5ea;
  --accent: #007aff;
  --accent-soft: rgba(0, 122, 255, 0.12);
  --green: #34c759;
  --red: #ff3b30;
  --orange: #ff9500;
  --danger: #ff3b30;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --frame-w: 390px;
  --frame-h: 820px;
}
body[data-theme="dark"] {
  --surface: #1c1c1e;
  --surface-2: #2c2c2e;
  --text: #ffffff;
  --text-2: #98989e;
  --separator: #38383a;
  --accent-soft: rgba(10, 132, 255, 0.2);
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(1200px 800px at 50% 20%, #2a2a3a, #000000);
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ---------- 手机外壳 ---------- */
.device {
  width: var(--frame-w); height: var(--frame-h);
  background: #000; border-radius: 54px;
  padding: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 2px #1a1a1a inset;
  position: relative;
}
.device-notch {
  position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  width: 120px; height: 28px; background: #000; border-radius: 18px; z-index: 60;
}
.phone-frame {
  width: 100%; height: 100%; background: var(--surface);
  border-radius: 42px; overflow: hidden; position: relative;
  display: flex; flex-direction: column;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset;
}

/* ---------- 状态栏 ---------- */
.status-bar {
  height: 48px; flex: 0 0 48px;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 28px 6px; font-size: 13px; font-weight: 600; color: var(--text);
  position: relative; z-index: 40;
}
.status-center { flex: 1; }
.status-right { display: flex; gap: 6px; align-items: center; }
.status-sig, .status-batt { width: 18px; height: 14px; }

/* ---------- 主屏 ---------- */
.home-screen {
  flex: 1; position: relative; overflow: hidden;
  background: var(--surface); background-size: cover; background-position: center;
}
.home-scroller { height: calc(100% - 96px); display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.home-scroller::-webkit-scrollbar { display: none; }
.home-page { min-width: 100%; height: 100%; scroll-snap-align: start; display: flex; align-items: flex-start; }
.icon-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 16px; row-gap: 22px;
  padding: 24px 20px; width: 100%;
}
.page-dots { position: absolute; bottom: 96px; left: 0; right: 0; display: flex; justify-content: center; gap: 7px; z-index: 5; }
.page-dots .dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(128,128,128,0.4); transition: all .2s; }
.page-dots .dot.active { background: var(--accent); width: 20px; border-radius: 4px; }

/* Dock */
.dock {
  position: absolute; bottom: 14px; left: 14px; right: 14px; height: 78px;
  background: rgba(255,255,255,0.55); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-radius: 24px; display: flex; align-items: center; justify-content: space-around;
  padding: 0 16px; box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}
body[data-theme="dark"] .dock { background: rgba(40,40,42,0.6); }

/* ---------- App 图标 ---------- */
.app-icon { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.app-icon-glyph {
  width: 56px; height: 56px; border-radius: 14px; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.22);
  transition: transform .12s ease;
  flex: 0 0 56px;
}
.app-icon-glyph svg { width: 29px; height: 29px; }
.app-icon:active .app-icon-glyph { transform: scale(0.9); }
.app-icon-label { font-size: 11px; color: var(--text); text-align: center; width: 100%; line-height: 1.25; word-break: break-all; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.home-screen.editing .app-icon-glyph { animation: jiggle .3s infinite; }
@keyframes jiggle { 0%{transform:rotate(-2deg)} 50%{transform:rotate(2deg)} 100%{transform:rotate(-2deg)} }
.edit-done { position: absolute; top: 12px; right: 14px; z-index: 50; }
.edit-done button { background: var(--accent); color: #fff; border: none; border-radius: 16px; padding: 6px 14px; font-size: 13px; font-weight: 600; }

/* ---------- 应用视图 ---------- */
.app-view { flex: 1; display: flex; flex-direction: column; background: var(--surface); position: relative; z-index: 30; }
.topbar {
  height: 52px; flex: 0 0 52px; display: flex; align-items: center; gap: 8px;
  padding: 0 10px; border-bottom: 0.5px solid var(--separator); position: sticky; top: 0; background: var(--surface); z-index: 10;
}
.topbar-back { width: 34px; height: 34px; border: none; background: none; color: var(--accent); cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: 8px; }
.topbar-back svg { width: 22px; height: 22px; }
.topbar-title { flex: 1; font-size: 17px; font-weight: 600; text-align: center; }
.topbar-right { display: flex; gap: 4px; align-items: center; }
.topbar-icon { width: 34px; height: 34px; border: none; background: none; color: var(--accent); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.topbar-icon svg { width: 20px; height: 20px; }

.app-body { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.app-body.scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px; }

/* ---------- 通用组件 ---------- */
.group { background: var(--surface); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; box-shadow: var(--shadow); }
.group-title { font-size: 13px; color: var(--text-2); margin-bottom: 10px; font-weight: 600; text-transform: uppercase; }
.group-note { font-size: 13px; color: var(--text-2); line-height: 1.6; margin: 8px 0; }
.section-title { font-size: 14px; font-weight: 600; margin: 14px 2px 8px; color: var(--text); }
.search-bar { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border-radius: 10px; padding: 8px 12px; margin-bottom: 14px; }
.search-bar svg { color: var(--text-2); flex: 0 0 16px; }
.search-bar input { border: none; background: none; outline: none; flex: 1; font-size: 14px; color: var(--text); }

.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 5px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--separator); border-radius: 10px;
  font-size: 14px; color: var(--text); background: var(--surface-2); outline: none; font-family: inherit;
}
.field textarea { min-height: 76px; resize: vertical; }
.field-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.field-row .btn { flex: 1; min-width: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; border: 1px solid var(--separator); border-radius: 10px;
  background: var(--surface); color: var(--accent); font-size: 14px; font-weight: 500; cursor: pointer;
  transition: all .12s;
}
.btn:active { opacity: 0.6; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-icon { width: 34px; height: 34px; padding: 0; border: none; background: none; color: var(--accent); }
.btn-block { width: 100%; justify-content: flex-start; margin-bottom: 8px; }
.btn-block svg { width: 16px; height: 16px; }

.switch-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; font-size: 14px; }
.switch { position: relative; width: 48px; height: 28px; flex: 0 0 48px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: #c7c7cc; border-radius: 14px; transition: .2s; }
.slider:before { content: ''; position: absolute; width: 24px; height: 24px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.switch input:checked + .slider { background: var(--green); }
.switch input:checked + .slider:before { transform: translateX(20px); }

.cell { display: flex; align-items: center; justify-content: space-between; padding: 12px 4px; border-bottom: 0.5px solid var(--separator); font-size: 14px; cursor: pointer; }
.cell:last-child { border-bottom: none; }
.cell-note { color: var(--text-2); font-size: 13px; }
.cell-note.red { color: var(--red); }
.cell-note.green { color: var(--green); }

.avatar { border-radius: 50%; background-size: cover; background-position: center; flex: 0 0 auto; overflow: hidden; }
.avatar-empty { background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--text-2); }

.badge { display: inline-block; background: var(--red); color: #fff; font-size: 11px; border-radius: 10px; padding: 1px 6px; margin-left: 6px; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--text-2); }
.empty-icon { width: 60px; height: 60px; margin: 0 auto 12px; background: var(--surface-2); border-radius: 30px; display: flex; align-items: center; justify-content: center; }
.empty-icon svg { width: 28px; height: 28px; color: var(--text-2); }
.empty-state p { font-size: 14px; line-height: 1.5; }
.app-empty { text-align: center; padding: 60px 20px; color: var(--text-2); }

.fab { position: absolute; right: 20px; bottom: 30px; width: 54px; height: 54px; border-radius: 27px; background: var(--accent); color: #fff; border: none; box-shadow: 0 6px 18px rgba(0,122,255,0.4); display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 20; }
.fab svg { width: 24px; height: 24px; }

/* ---------- Tabbar ---------- */
.tabbar { display: flex; border-bottom: 0.5px solid var(--separator); background: var(--surface); }
.tabbar .tab { flex: 1; padding: 12px 0; text-align: center; font-size: 14px; color: var(--text-2); background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer; }
.tabbar .tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.tab-content { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px; }

/* ---------- 聊天 ---------- */
.chat-messages { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px 14px; background: var(--surface-2); }
.msg { display: flex; flex-direction: column; margin-bottom: 14px; }
.msg-user { align-items: flex-end; }
.msg-char { align-items: flex-start; }
.msg-bubble { max-width: 76%; padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.5; word-break: break-word; white-space: pre-wrap; }
.msg-user .msg-bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.msg-char .msg-bubble { background: var(--surface); color: var(--text); border-bottom-left-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.msg-time { font-size: 10px; color: var(--text-2); margin-top: 4px; padding: 0 4px; }
.chat-hint { text-align: center; color: var(--text-2); font-size: 13px; padding: 30px 0; }
.typing .dot { display: inline-block; width: 7px; height: 7px; background: var(--text-2); border-radius: 50%; margin: 0 2px; animation: blink 1.2s infinite; }
.typing .dot:nth-child(2) { animation-delay: .2s; }
.typing .dot:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,80%,100%{opacity:.3} 40%{opacity:1} }

.chat-input-bar { flex: 0 0 56px; display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: var(--surface); border-top: 0.5px solid var(--separator); }
.chat-input-bar input { flex: 1; border: 1px solid var(--separator); border-radius: 20px; padding: 9px 14px; font-size: 15px; outline: none; background: var(--surface-2); color: var(--text); }
.chat-btn { width: 40px; height: 40px; border-radius: 20px; border: none; background: var(--surface-2); color: var(--accent); cursor: pointer; display: flex; align-items: center; justify-content: center; flex: 0 0 40px; }
.chat-btn svg { width: 20px; height: 20px; }
.chat-btn.send { background: var(--accent); color: #fff; }
.chat-btn.wand { background: #af52de; color: #fff; }

/* ---------- 聊天列表 ---------- */
.chat-list { display: flex; flex-direction: column; }
.chat-item { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 0.5px solid var(--separator); cursor: pointer; }
.chat-item-main { flex: 1; min-width: 0; }
.chat-item-name { font-size: 15px; font-weight: 600; display: flex; align-items: center; }
.chat-item-preview { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.chat-item-time { font-size: 11px; color: var(--text-2); align-self: flex-start; }

/* ---------- 名册 ---------- */
.char-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.char-card { background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.char-name { font-size: 15px; font-weight: 600; }
.char-identity { font-size: 12px; color: var(--text-2); }
.char-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }

/* ---------- 朋友圈 ---------- */
.moments-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.moment-list { display: flex; flex-direction: column; gap: 12px; }
.moment-item { background: var(--surface); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.moment-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.moment-name { font-size: 14px; font-weight: 600; }
.moment-time { font-size: 11px; color: var(--text-2); }
.moment-text { font-size: 14px; line-height: 1.6; }
.moment-img { height: 160px; border-radius: 10px; background-size: cover; background-position: center; margin-top: 8px; }

/* ---------- 我页 ---------- */
.me-card { text-align: center; padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.me-name { font-size: 20px; font-weight: 700; }
.me-id { font-size: 13px; color: var(--text-2); }
.me-sig { font-size: 14px; color: var(--text-2); }

/* ---------- 记忆宫殿 ---------- */
.mem-stats { display: flex; gap: 12px; margin-bottom: 16px; }
.mem-stat { flex: 1; background: var(--surface); border-radius: var(--radius); padding: 16px; text-align: center; box-shadow: var(--shadow); }
.mem-stat .n { font-size: 26px; font-weight: 700; color: var(--accent); }
.mem-stat .l { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.mem-list { display: flex; flex-direction: column; gap: 8px; }
.mem-item { background: var(--surface); border-radius: 10px; padding: 12px; box-shadow: var(--shadow); }
.mem-star { color: #ffcc00; font-size: 12px; }
.mem-text { font-size: 14px; line-height: 1.5; margin-top: 4px; }
.mem-time { font-size: 11px; color: var(--text-2); margin-top: 6px; }

/* ---------- 世界书 ---------- */
.book-card { background: var(--surface); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.book-name { font-size: 15px; font-weight: 600; }
.book-meta { font-size: 12px; color: var(--text-2); margin: 4px 0 8px; }
.entry-card { background: var(--surface); border-radius: 10px; padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow); }
.entry-name { font-size: 14px; font-weight: 600; }
.entry-kw { font-size: 12px; color: var(--accent); margin: 4px 0; }
.entry-content { font-size: 13px; color: var(--text-2); line-height: 1.5; }

/* ---------- 预设 ---------- */
.preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.preset-card { background: var(--surface); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); text-align: center; }
.preset-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.preset-note { font-size: 11px; color: var(--text-2); margin-bottom: 10px; }

/* ---------- 论坛 ---------- */
.board-list { display: flex; flex-direction: column; gap: 10px; }
.board-card { background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); cursor: pointer; }
.board-name { font-size: 15px; font-weight: 600; }
.board-note { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.post-card { background: var(--surface); border-radius: 10px; padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow); }
.post-title { font-size: 15px; font-weight: 600; }
.post-body { font-size: 13px; color: var(--text-2); margin: 6px 0; }
.post-meta { font-size: 11px; color: var(--text-2); }

/* ---------- 羁绊空间 ---------- */
.bond-hero { text-align: center; padding: 26px; background: linear-gradient(135deg, #ff6b81, #ff2d55); border-radius: var(--radius); color: #fff; margin-bottom: 14px; }
.bond-days { font-size: 15px; opacity: .9; }
.bond-days b { font-size: 30px; }
.bond-level { font-size: 13px; margin: 4px 0; opacity: .9; }
.bond-char { font-size: 14px; margin-top: 6px; }
.bond-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.bond-item { background: var(--surface); border-radius: var(--radius); padding: 16px 8px; text-align: center; box-shadow: var(--shadow); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--accent); }
.bond-item svg { width: 22px; height: 22px; }

/* ---------- 心动观察 ---------- */
.crush-meter { margin-top: 16px; }
.crush-label { font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.crush-bar { height: 14px; background: var(--surface-2); border-radius: 7px; overflow: hidden; }
.crush-fill { height: 100%; background: var(--green); transition: width .5s, background .5s; border-radius: 7px; }
.crush-num { font-size: 12px; color: var(--text-2); margin-top: 6px; text-align: right; }

/* ---------- 家园 ---------- */
.home-rooms { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 14px; }
.room-card { background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); text-align: center; }
.room-card.locked { opacity: .5; }
.room-icon { color: var(--accent); margin-bottom: 8px; }
.room-icon svg { width: 24px; height: 24px; }
.room-name { font-size: 14px; font-weight: 600; }
.room-people { font-size: 11px; color: var(--text-2); margin-top: 4px; }

/* ---------- 外出 ---------- */
.outing-map { position: relative; height: 260px; background: linear-gradient(160deg, #c8e6c9, #a5d6a7); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; }
.map-place { position: absolute; background: #fff; border-radius: 50%; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; font-size: 11px; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.place-1 { top: 20%; left: 20%; }
.place-2 { top: 60%; left: 30%; }
.place-3 { top: 30%; left: 65%; }
.place-4 { top: 70%; left: 70%; }
.map-center { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.6); color: #fff; padding: 6px 14px; border-radius: 14px; font-size: 12px; white-space: nowrap; }

/* ---------- 异世界 ---------- */
.isekai-hero { text-align: center; padding: 30px; background: linear-gradient(135deg, #7d5fff, #5856d6); border-radius: var(--radius); color: #fff; margin-bottom: 14px; }
.isekai-title { font-size: 22px; font-weight: 700; }
.isekai-note { font-size: 13px; opacity: .9; margin-top: 6px; }

/* ---------- 糯哩 ---------- */
.bili-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bili-card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); cursor: pointer; }
.bili-thumb { height: 90px; display: flex; align-items: center; justify-content: center; color: #fff; }
.bili-thumb svg { width: 28px; height: 28px; }
.bili-title { padding: 8px 10px; font-size: 13px; font-weight: 600; }
.live-danmaku { margin: 10px 0; }
.dm { font-size: 13px; color: var(--text); padding: 4px 0; }

/* ---------- 电台 ---------- */
.radio-list { display: flex; flex-direction: column; gap: 10px; }
.radio-card { display: flex; align-items: center; gap: 14px; background: var(--surface); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); cursor: pointer; }
.radio-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, #ff3b30, #ff9500); }
.radio-name { flex: 1; font-size: 15px; font-weight: 600; }
.radio-play { color: var(--accent); }

/* ---------- 游戏大厅 ---------- */
.game-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.game-card { background: var(--surface); border-radius: var(--radius); padding: 20px 12px; text-align: center; box-shadow: var(--shadow); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--accent); }
.game-card svg { width: 26px; height: 26px; }
.game-stage { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 20px 0; }
.game-result { text-align: center; min-height: 40px; }
.result-line { font-size: 14px; color: var(--text-2); }
.result-verdict { font-size: 18px; font-weight: 700; margin-top: 6px; }
.rp-score { font-size: 13px; color: var(--text-2); }
.rp-row { display: flex; gap: 12px; }
.rp-btn { padding: 16px 20px; border-radius: 14px; border: 1px solid var(--separator); background: var(--surface); color: var(--text); font-size: 15px; cursor: pointer; box-shadow: var(--shadow); }
.rp-btn:active { transform: scale(0.94); }
.td-card, .soup-card, .riddle-card { background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); font-size: 15px; line-height: 1.6; text-align: center; max-width: 320px; min-height: 60px; display: flex; align-items: center; justify-content: center; }
.soup-clue { font-size: 13px; color: var(--text-2); line-height: 1.6; max-width: 320px; text-align: center; }

/* 五子棋 */
.goban { display: inline-block; background: #d9a45b; padding: 6px; border-radius: 8px; box-shadow: 0 4px 14px rgba(0,0,0,0.3); }
.goban-row { display: flex; }
.goban-cell { width: 22px; height: 22px; border: 0.5px solid rgba(0,0,0,0.15); display: flex; align-items: center; justify-content: center; font-size: 16px; cursor: pointer; }
.goban-cell.black { color: #000; }
.goban-cell.white { color: #fff; text-shadow: 0 0 2px #000; }
.gomoku-info { font-size: 14px; font-weight: 600; }
.uno-table { display: flex; justify-content: center; margin: 10px 0; }
.uno-card-discard { background: #fff; border: 2px solid #007aff; border-radius: 10px; padding: 14px 18px; font-weight: 700; color: #007aff; }
.uno-hand { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.uno-card { background: #fff; border-radius: 8px; padding: 10px 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.2); cursor: pointer; font-size: 13px; font-weight: 600; color: #1c1c1e; }

/* ---------- 日历 ---------- */
.cal-head { font-size: 17px; font-weight: 700; text-align: center; margin-bottom: 12px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 14px; }
.cal-dow { text-align: center; font-size: 12px; color: var(--text-2); padding: 4px 0; }
.cal-day { text-align: center; padding: 8px 0; border-radius: 8px; font-size: 14px; position: relative; }
.cal-day.today { background: var(--accent); color: #fff; font-weight: 700; }
.cal-day.has .dot { position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; border-radius: 50%; background: var(--orange); }

/* ---------- 健康 ---------- */
.health-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.health-stat { background: var(--surface); border-radius: var(--radius); padding: 14px 6px; text-align: center; box-shadow: var(--shadow); }
.hs-icon { color: var(--accent); margin-bottom: 6px; }
.hs-icon svg { width: 20px; height: 20px; }
.hs-val { font-size: 15px; font-weight: 700; }
.hs-label { font-size: 11px; color: var(--text-2); margin-top: 2px; }

/* ---------- 吃了吗 ---------- */
.meal-hero { background: linear-gradient(135deg, #ff9500, #ff6b3d); border-radius: var(--radius); padding: 22px; color: #fff; margin-bottom: 14px; }
.meal-q { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.meal-actions { display: flex; flex-direction: column; gap: 8px; }
.meal-actions .btn { background: rgba(255,255,255,0.2); color: #fff; border-color: rgba(255,255,255,0.3); }

/* ---------- 番茄钟 ---------- */
.focus-hero { text-align: center; padding: 20px 0; }
.focus-circle { width: 200px; height: 200px; border-radius: 50%; margin: 0 auto 20px; background: linear-gradient(135deg, #ff6b6b, #ff4757); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 8px 30px rgba(255,71,87,0.4); }
.focus-time { font-size: 40px; font-weight: 700; }
.focus-task { font-size: 13px; opacity: .9; margin-top: 4px; }
.focus-btns { display: flex; gap: 10px; justify-content: center; }

/* ---------- 人生升级 ---------- */
.life-hero { display: flex; gap: 10px; margin-bottom: 14px; }
.life-hp, .life-exp, .life-coin { flex: 1; background: var(--surface); border-radius: var(--radius); padding: 14px; text-align: center; box-shadow: var(--shadow); font-size: 13px; }
.life-hp b { color: var(--red); font-size: 20px; }
.life-exp b { color: var(--accent); font-size: 20px; }
.life-coin b { color: var(--orange); font-size: 20px; }
.life-tasks { display: flex; flex-direction: column; }

/* ---------- 白狗 ---------- */
.dog-hero { text-align: center; padding: 24px; color: var(--text-2); }
.dog-hero svg { width: 48px; height: 48px; }
.dog-note { font-size: 13px; margin-top: 10px; }

/* ---------- 钱包 ---------- */
.wallet-card { border-radius: var(--radius); padding: 22px; color: #fff; margin-bottom: 14px; box-shadow: 0 8px 24px rgba(52,199,89,0.35); }
.wc-name { font-size: 13px; opacity: .9; }
.wc-balance { font-size: 32px; font-weight: 700; margin-top: 12px; }
.wallet-stats { display: flex; gap: 10px; margin-bottom: 14px; }
.ws { flex: 1; background: var(--surface); border-radius: var(--radius); padding: 14px; text-align: center; box-shadow: var(--shadow); }
.ws .v { font-size: 16px; font-weight: 700; }
.ws .l { font-size: 11px; color: var(--text-2); margin-top: 4px; }

/* ---------- 商店 ---------- */
.shop-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.shop-card { background: var(--surface); border-radius: var(--radius); padding: 12px 6px; text-align: center; box-shadow: var(--shadow); cursor: pointer; }
.shop-icon { color: var(--accent); margin-bottom: 6px; }
.shop-icon svg { width: 26px; height: 26px; }
.shop-name { font-size: 11px; line-height: 1.3; }
.shop-price { font-size: 12px; color: var(--red); margin-top: 4px; font-weight: 600; }

/* ---------- 外卖 ---------- */
.food-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.food-shop { display: flex; align-items: center; gap: 14px; background: var(--surface); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); cursor: pointer; }
.fs-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; }
.fs-name { flex: 1; font-size: 15px; font-weight: 600; }
.fs-note { font-size: 12px; color: var(--text-2); }

/* ---------- App Store ---------- */
.store-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.store-card { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 10px; padding: 12px; box-shadow: var(--shadow); cursor: pointer; font-size: 13px; }
.store-card svg { width: 24px; height: 24px; color: var(--accent); }

/* ---------- 炼金术 ---------- */
.alchemy-list { display: flex; flex-direction: column; }

/* ---------- 弹层 / Toast ---------- */
.sheet-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 430px; background: var(--surface); border-radius: 20px 20px 0 0; padding: 16px 18px 28px; max-height: 80vh; overflow-y: auto; animation: slideup .25s ease; }
@keyframes slideup { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; font-size: 16px; font-weight: 600; margin-bottom: 14px; }
.sheet-close { border: none; background: var(--surface-2); width: 28px; height: 28px; border-radius: 14px; color: var(--text-2); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.sheet-close svg { width: 16px; height: 16px; }
.sheet-body { display: flex; flex-direction: column; gap: 8px; }

.toast { position: fixed; top: 60px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.85); color: #fff; padding: 10px 20px; border-radius: 22px; font-size: 14px; z-index: 200; display: none; max-width: 80%; text-align: center; }
.toast.success { background: rgba(52,199,89,0.92); }
.toast.error { background: rgba(255,59,48,0.92); }

/* ---------- 通知横幅 ---------- */
.banner { position: fixed; top: 56px; left: 50%; transform: translateX(-50%); width: 90%; max-width: 350px; background: var(--surface); border-radius: 14px; box-shadow: 0 8px 30px rgba(0,0,0,0.3); display: flex; gap: 10px; padding: 12px; z-index: 150; cursor: pointer; animation: slidedown .3s ease; }
@keyframes slidedown { from { transform: translate(-50%,-30px); opacity: 0; } to { transform: translate(-50%,0); opacity: 1; } }
.banner-app { color: var(--accent); display: flex; align-items: center; }
.banner-body { flex: 1; min-width: 0; }
.banner-title { font-size: 13px; font-weight: 600; }
.banner-text { font-size: 12px; color: var(--text-2); margin-top: 2px; }

/* ---------- 悬浮球 ---------- */
#float-ball { position: fixed; right: 14px; bottom: 90px; z-index: 120; }
.fb-core { width: 46px; height: 46px; border-radius: 50%; background: #fff; box-shadow: 0 4px 16px rgba(0,0,0,0.3); display: flex; align-items: center; justify-content: center; color: #ff9500; cursor: pointer; }
.fb-core svg { width: 22px; height: 22px; }
.fb-menu { display: none; flex-direction: column; gap: 6px; position: absolute; bottom: 56px; right: 0; background: var(--surface); border-radius: 14px; box-shadow: 0 8px 24px rgba(0,0,0,0.3); padding: 10px; min-width: 130px; }
#float-ball.open .fb-menu { display: flex; }
.fb-item { display: flex; align-items: center; gap: 8px; border: none; background: none; padding: 8px 10px; font-size: 13px; color: var(--text); cursor: pointer; border-radius: 8px; text-align: left; }
.fb-item:hover { background: var(--surface-2); }
.fb-item svg { width: 16px; height: 16px; color: var(--accent); }

/* ---------- 锁屏 ---------- */
#lockscreen { position: fixed; inset: 0; z-index: 300; background: #000; color: #fff; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.lock-time { font-size: 64px; font-weight: 300; }
.lock-date { font-size: 16px; opacity: .7; }
.lock-hint { font-size: 14px; opacity: .5; margin-top: 20px; }
.lock-pin-dots { display: flex; gap: 16px; margin-top: 30px; }
.pin-dot { width: 12px; height: 12px; border-radius: 50%; background: #333; }
.pin-dot.on { background: #fff; }
.lock-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 30px; }
.pad-key { width: 70px; height: 70px; border-radius: 35px; border: none; background: #1c1c1e; color: #fff; font-size: 22px; cursor: pointer; }
.pad-key:active { background: #333; }

/* ---------- 成人确认 ---------- */
.adult-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 400; display: flex; align-items: center; justify-content: center; padding: 24px; }
.adult-box { background: var(--surface); color: var(--text); border-radius: 20px; padding: 28px; max-width: 340px; text-align: center; }
.adult-title { font-size: 20px; font-weight: 700; margin-bottom: 14px; }
.adult-text { font-size: 14px; line-height: 1.7; color: var(--text-2); margin-bottom: 20px; }
.adult-btns { display: flex; flex-direction: column; gap: 10px; }

/* ---------- 软糯糯 ---------- */
.assistant-chat { flex: 1; overflow-y: auto; padding: 16px 14px; background: var(--surface-2); }

/* ---------- 提示注脚 ---------- */
.hint-note { margin-top: 20px; color: #666; font-size: 12px; text-align: center; }

/* ---------- 响应式：手机直接全屏 ---------- */
@media (max-width: 430px) {
  .device { width: 100vw; height: 100vh; border-radius: 0; padding: 0; box-shadow: none; }
  .device-notch { display: none; }
  .phone-frame { border-radius: 0; }
  .status-bar { height: 44px; flex-basis: 44px; padding: 0 20px 4px; }
  .hint-note { display: none; }
}
