/* ===== 基础 ===== */
:root {
  --bg: #faf8f5; --card: #ffffff; --text: #2d2a26; --sub: #8a8580;
  --accent: #c9956b; --accent-light: #f0dcc8; --warm: #f5e6d3;
  --gold: #d4a574; --r: 14px; --shadow: 0 2px 16px rgba(45,42,38,0.06);
}
* { margin:0; padding:0; box-sizing:border-box; }
html, body {
  height: 100%;
  font-family: -apple-system, 'PingFang SC', 'Helvetica Neue', sans-serif;
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased;
}
.main-app { display:flex; flex-direction:column; height:100vh; height:100dvh; }
.scroll-area { flex:1; overflow-y:auto; overflow-x:hidden; -webkit-overflow-scrolling:touch; }
.page { display:none; padding:20px 20px 30px; min-height:100%; }
.page.active { display:block; }

/* Tab */
.tab-bar {
  display:flex; justify-content:space-around; align-items:center;
  height:56px; background:var(--card); border-top:1px solid rgba(0,0,0,0.05);
  flex-shrink:0; padding-bottom:env(safe-area-inset-bottom,0px);
}
.tab-item { display:flex; flex-direction:column; align-items:center; gap:2px; cursor:pointer; padding:4px 10px; }
.tab-icon { font-size:20px; } .tab-text { font-size:10px; color:var(--sub); }
.tab-item.active .tab-text { color:var(--accent); font-weight:600; }
.center-btn {
  width:44px; height:44px; border-radius:50%;
  background:linear-gradient(135deg,var(--accent),#e8a87c);
  display:flex; align-items:center; justify-content:center;
  font-size:20px; margin-top:-16px;
  box-shadow:0 4px 12px rgba(201,149,107,0.3);
}

/* Header */
.page-top { display:flex; align-items:center; justify-content:space-between; padding-bottom:18px; }
.page-top h2 { font-size:19px; font-weight:600; }
.back-btn,.add-btn {
  background:var(--card); border:none; padding:8px 14px;
  border-radius:20px; font-size:14px; cursor:pointer;
  box-shadow:var(--shadow); color:var(--text);
}

/* Home */
.home-header { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:20px; }
.greeting-date { font-size:13px; color:var(--sub); margin-bottom:4px; }
.greeting-text { font-size:24px; font-weight:700; }
.greeting-sub { font-size:13px; color:var(--sub); margin-top:4px; }
.streak-badge {
  background:linear-gradient(135deg,var(--accent),#e8a87c);
  color:white; padding:6px 14px; border-radius:20px;
  font-size:13px; font-weight:600;
  box-shadow:0 4px 12px rgba(201,149,107,0.3);
}

/* Moon Banner */
.moon-banner {
  display:flex; align-items:center; gap:10px;
  background:linear-gradient(135deg,#1a1a2e,#16213e);
  color:white; border-radius:var(--r); padding:12px 16px;
  margin-bottom:16px;
}
.moon-banner span:first-child { font-size:28px; }

/* Quote */
.daily-quote-card {
  background:linear-gradient(135deg,#fdf6ee,#f5e1cc);
  border-radius:var(--r); padding:22px; margin-bottom:20px;
  border:1px solid rgba(201,149,107,0.12);
}
.quote-text { font-size:15px; line-height:1.7; font-style:italic; }
.quote-author { font-size:12px; color:var(--accent); margin-top:10px; text-align:right; }

/* Vibe */
.vibe-selector { display:flex; justify-content:space-around; margin:8px 0; }
.vibe-btn {
  text-align:center; font-size:28px; cursor:pointer; padding:8px;
  border-radius:12px; transition:all 0.2s; border:2px solid transparent;
}
.vibe-btn small { font-size:11px; color:var(--sub); }
.vibe-btn.selected { border-color:var(--accent); background:var(--accent-light); transform:scale(1.15); }
.vibe-tip { text-align:center; font-size:13px; color:var(--accent); margin-top:4px; min-height:20px; }

/* Section */
.section { margin-bottom:24px; }
.section-title { font-size:16px; font-weight:600; margin-bottom:12px; }
.ritual-items { display:flex; flex-direction:column; gap:10px; }
.ritual-item {
  display:flex; align-items:center; gap:12px;
  background:var(--card); border-radius:var(--r);
  padding:14px; box-shadow:var(--shadow); cursor:pointer;
}
.ritual-item:active { opacity:0.9; }
.ritual-emoji { font-size:28px; width:44px; text-align:center; }
.ritual-info { flex:1; }
.ritual-name { font-size:15px; font-weight:600; }
.ritual-desc { font-size:12px; color:var(--sub); margin-top:2px; }
.ritual-check { font-size:20px; color:#d0ccc8; }
.ritual-check.done { color:#4caf50; }

/* Tools Grid */
.tools-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.tool-card {
  background:var(--card); border-radius:var(--r);
  padding:16px 6px; text-align:center; box-shadow:var(--shadow); cursor:pointer;
}
.tool-card:active { opacity:0.9; }
.tool-icon { font-size:28px; display:block; margin-bottom:6px; }
.tool-card p { font-size:12px; color:var(--sub); font-weight:500; }

/* Community Entry */
.community-entry {
  display:flex; align-items:center; gap:12px;
  background:var(--card); border-radius:var(--r);
  padding:16px; box-shadow:var(--shadow); cursor:pointer; margin-top:4px;
}
.community-entry span:first-child { font-size:28px; }
.ce-title { font-size:15px; font-weight:600; }
.ce-sub { font-size:12px; color:var(--sub); }
.ce-arrow { margin-left:auto; font-size:18px; color:var(--sub); }

/* Vision */
.vision-tabs { display:flex; gap:8px; overflow-x:auto; padding-bottom:14px; -webkit-overflow-scrolling:touch; }
.vision-tabs::-webkit-scrollbar { display:none; }
.vtab { flex-shrink:0; padding:7px 14px; border-radius:18px; background:var(--card); font-size:13px; cursor:pointer; white-space:nowrap; }
.vtab.active { background:var(--accent); color:white; }
.vision-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:12px; }
.vision-card { border-radius:var(--r); overflow:hidden; box-shadow:var(--shadow); background:var(--card); cursor:pointer; }
.vision-img { height:120px; display:flex; align-items:center; justify-content:center; font-size:36px; }
.vision-label { padding:10px; font-size:13px; font-weight:500; text-align:center; }
.add-vision { border:2px dashed var(--warm); background:transparent; box-shadow:none; }

/* Check */
.check-wrapper { padding-top:8px; }
.universe-check {
  background:linear-gradient(135deg,#fffef5,#fdf6ee);
  border:2px solid var(--gold); border-radius:var(--r); padding:22px 18px;
  box-shadow:0 4px 24px rgba(212,165,116,0.15);
}
.check-row { display:flex; justify-content:space-between; margin-bottom:14px; }
.check-row.bottom { margin-bottom:0; margin-top:16px; padding-top:12px; border-top:1px dashed var(--warm); font-size:13px; color:var(--gold); }
.check-bank { font-size:17px; font-weight:700; color:var(--gold); }
.check-no { font-size:12px; color:var(--sub); }
.check-field { margin-bottom:12px; }
.check-field label { font-size:12px; color:var(--sub); display:block; margin-bottom:4px; }
.check-field input { width:100%; border:none; border-bottom:1px dashed var(--warm); background:transparent; font-size:16px; font-weight:600; padding:4px 0; outline:none; color:var(--text); font-family:inherit; }
.check-field.amount input { font-size:22px; color:#c0392b; }

/* Letter */
.letter-wrapper { padding-top:8px; }
.letter-intro { text-align:center; margin-bottom:20px; }
.letter-intro h3 { font-size:19px; margin-bottom:6px; }
.letter-intro p { font-size:13px; color:var(--sub); line-height:1.6; }
.letter-paper {
  background:linear-gradient(180deg,#fffef8,#fdf6ee);
  border:1px solid var(--warm); border-radius:var(--r); padding:20px;
  box-shadow:var(--shadow);
}
.letter-dear { font-size:16px; font-weight:600; margin-bottom:12px; color:var(--accent); }
.letter-paper textarea { width:100%; border:none; background:transparent; font-size:14px; line-height:2; outline:none; resize:none; font-family:inherit; color:var(--text); background-image:repeating-linear-gradient(transparent,transparent 31px,#e8d5c0 31px,#e8d5c0 32px); }
.letter-sign { margin-top:16px; font-size:14px; text-align:right; color:var(--sub); }
.inline-input { border:none; border-bottom:1px solid var(--warm); background:transparent; font-size:14px; outline:none; width:80px; color:var(--text); font-family:inherit; }
.letter-date-line { font-size:12px; color:var(--sub); text-align:right; margin-top:8px; }

/* Gratitude */
.gratitude-wrapper { padding-top:8px; }
.gratitude-header { text-align:center; margin-bottom:22px; }
.gratitude-header h3 { font-size:20px; font-weight:700; margin:6px 0; }
.gratitude-date { font-size:13px; color:var(--sub); }
.hint { font-size:13px; color:var(--sub); }
.grat-entries { display:flex; flex-direction:column; gap:12px; margin-bottom:14px; }
.grat-entry { display:flex; gap:10px; align-items:flex-start; background:var(--card); border-radius:var(--r); padding:14px; box-shadow:var(--shadow); }
.grat-num { width:26px; height:26px; border-radius:50%; background:var(--warm); color:var(--accent); display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; flex-shrink:0; }
.grat-entry textarea { flex:1; border:none; outline:none; resize:none; font-size:14px; line-height:1.6; background:transparent; font-family:inherit; color:var(--text); }

/* Timeline */
.timeline-title { font-size:16px; font-weight:600; margin:24px 0 12px; }
.tl-item { background:var(--card); border-radius:var(--r); padding:14px; box-shadow:var(--shadow); border-left:3px solid var(--accent); margin-bottom:10px; }
.tl-date { font-size:12px; color:var(--accent); font-weight:600; margin-bottom:6px; }
.tl-text { font-size:13px; line-height:1.6; }

/* Morning */
.morning-wrapper { padding-top:8px; }
.morning-hero,.vis-hero { text-align:center; margin-bottom:24px; }
.big-emoji { font-size:56px; display:block; margin-bottom:10px; }
.morning-hero h3,.vis-hero h3 { font-size:19px; font-weight:700; }
.morning-hero p,.vis-hero p { font-size:13px; color:var(--sub); margin-top:4px; }

/* Breathing */
.breath-box {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  height:140px; background:var(--card); border-radius:var(--r);
  box-shadow:var(--shadow); cursor:pointer; margin-top:8px;
}
.breath-circle {
  width:60px; height:60px; border-radius:50%;
  background:linear-gradient(135deg,var(--accent),#e8a87c);
  transition: all 4s ease-in-out;
}
.breath-circle.inhale { width:100px; height:100px; opacity:1; }
.breath-circle.exhale { width:40px; height:40px; opacity:0.5; }
.breath-text { margin-top:10px; font-size:14px; color:var(--sub); }

/* Form */
.form-section { margin-bottom:20px; }
.form-section h4 { font-size:15px; font-weight:600; margin-bottom:8px; }
.form-section textarea,.form-section input,.full-input {
  width:100%; padding:12px; border:1px solid var(--warm);
  border-radius:var(--r); font-size:14px; outline:none;
  background:var(--card); font-family:inherit; color:var(--text);
}
.form-section textarea:focus,.form-section input:focus,.full-input:focus { border-color:var(--accent); }
.affirm-list { display:flex; flex-direction:column; gap:8px; }
.affirm-row { display:flex; align-items:center; gap:8px; background:var(--card); border-radius:var(--r); padding:10px 14px; box-shadow:var(--shadow); }
.affirm-pre { font-weight:600; color:var(--accent); white-space:nowrap; font-size:14px; }
.affirm-row input { flex:1; border:none; outline:none; font-size:14px; background:transparent; font-family:inherit; color:var(--text); padding:0; }

/* Visualize */
.vis-wrapper { padding-top:8px; }
.vis-guide { margin-bottom:20px; }
.vis-guide h4 { font-size:15px; font-weight:600; margin-bottom:10px; }
.vis-themes { display:flex; flex-wrap:wrap; gap:8px; }
.vis-theme { padding:8px 14px; border-radius:20px; background:var(--card); font-size:13px; cursor:pointer; box-shadow:var(--shadow); }
.vis-theme.active { background:var(--accent); color:white; }
.vis-script { margin-bottom:20px; }
.vis-script h4 { font-size:15px; font-weight:600; margin-bottom:10px; }
.script-content { background:var(--card); border-radius:var(--r); padding:20px; box-shadow:var(--shadow); }
.script-content p { font-size:14px; line-height:1.8; margin-bottom:10px; color:var(--text); }
.script-content p:last-child { margin-bottom:0; }

/* 369 */
.three69-wrapper,.fivefive-wrapper { padding-top:8px; }
.three69-intro { text-align:center; margin-bottom:22px; }
.three69-intro h3 { font-size:19px; font-weight:700; margin-bottom:6px; }
.three69-intro p { font-size:13px; color:var(--sub); line-height:1.6; }
.three69-steps { display:flex; flex-direction:column; gap:14px; margin-bottom:20px; }
.step-card { background:var(--card); border-radius:var(--r); padding:16px; box-shadow:var(--shadow); }
.step-top { font-size:15px; font-weight:600; margin-bottom:12px; }
.dots-row { display:flex; gap:10px; flex-wrap:wrap; }
.dot { width:30px; height:30px; border-radius:50%; background:var(--warm); border:2px solid #e0d5c5; cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:14px; transition:all 0.2s; }
.dot.done { background:var(--accent); border-color:var(--accent); color:white; box-shadow:0 2px 8px rgba(201,149,107,0.3); }
.dot.done::after { content:'✓'; }
.day-count { text-align:center; font-size:15px; margin-top:8px; }
.day-count strong { color:var(--accent); font-size:22px; }

/* 55x5 */
.progress-55 { margin-bottom:20px; }
.day55 { display:flex; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid var(--warm); }
.day55-label { font-weight:600; width:50px; }
.day55-count { flex:1; font-size:13px; color:var(--sub); }
.day55-status { font-size:18px; }
.write-count { text-align:center; margin-top:8px; font-size:14px; color:var(--sub); }

/* Future */
.future-wrapper { padding-top:8px; }
.future-paper { background:var(--card); border-radius:var(--r); padding:16px; box-shadow:var(--shadow); margin-bottom:16px; }
.future-date-pick { margin-bottom:14px; }
.future-date-pick label { font-size:13px; color:var(--sub); display:block; margin-bottom:6px; }
.future-date-pick input { width:100%; padding:10px; border:1px solid var(--warm); border-radius:var(--r); font-size:14px; outline:none; background:var(--card); font-family:inherit; }
.future-paper textarea { width:100%; border:none; outline:none; resize:none; font-size:14px; line-height:1.8; background:transparent; font-family:inherit; color:var(--text); }

/* Abundance */
.abundance-wrapper { padding-top:8px; }
.ab-categories { display:flex; flex-direction:column; gap:14px; margin-bottom:16px; }
.ab-cat { background:var(--card); border-radius:var(--r); padding:16px; box-shadow:var(--shadow); }
.ab-cat h4 { font-size:15px; margin-bottom:8px; }
.ab-cat textarea { width:100%; border:1px solid var(--warm); border-radius:10px; padding:10px; font-size:14px; outline:none; resize:none; font-family:inherit; background:var(--bg); }
.ab-cat textarea:focus { border-color:var(--accent); }

/* Moon */
.moon-wrapper { padding-top:8px; }
.moon-hero { text-align:center; margin-bottom:24px; }
.moon-sections { display:flex; flex-direction:column; gap:14px; margin-bottom:16px; }
.moon-card { background:var(--card); border-radius:var(--r); padding:16px; box-shadow:var(--shadow); }
.moon-card h4 { font-size:15px; margin-bottom:6px; }
.moon-card textarea { width:100%; border:1px solid var(--warm); border-radius:10px; padding:10px; font-size:14px; outline:none; resize:none; font-family:inherit; margin-top:8px; background:var(--bg); }

/* Tracking */
.tracking-wrapper { padding-top:8px; }
.stats-row { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:20px; }
.stat-box { background:var(--card); border-radius:var(--r); padding:14px 8px; text-align:center; box-shadow:var(--shadow); }
.stat-box.gold { background:linear-gradient(135deg,#fdf6ee,#f5e1cc); }
.stat-n { display:block; font-size:24px; font-weight:700; color:var(--accent); }
.stat-l { font-size:11px; color:var(--sub); }
.wish-list { display:flex; flex-direction:column; gap:10px; }
.wish-item { display:flex; align-items:center; gap:12px; background:var(--card); border-radius:var(--r); padding:14px; box-shadow:var(--shadow); }
.wish-item.done { background:linear-gradient(135deg,#fdf6ee,#faf8f5); }
.wish-icon { font-size:22px; flex-shrink:0; }
.wish-text { font-size:14px; font-weight:500; }
.wish-meta { font-size:12px; color:var(--sub); margin-top:3px; }

/* Community */
.community-wrapper { padding-top:8px; }
.ctabs { display:flex; gap:10px; margin-bottom:16px; }
.ctab { padding:7px 14px; border-radius:18px; background:var(--card); font-size:13px; cursor:pointer; }
.ctab.active { background:var(--accent); color:white; }
.post-list { display:flex; flex-direction:column; gap:12px; }
.post-card { background:var(--card); border-radius:var(--r); padding:16px; box-shadow:var(--shadow); }
.post-top { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.avatar { width:34px; height:34px; border-radius:50%; background:var(--warm); display:flex; align-items:center; justify-content:center; font-size:16px; }
.post-info { flex:1; }
.post-name { font-size:14px; font-weight:600; }
.post-time { font-size:11px; color:var(--sub); }
.tag-manifested { font-size:11px; padding:3px 8px; border-radius:10px; background:var(--accent-light); color:var(--accent); }
.post-body { font-size:14px; line-height:1.7; margin-bottom:12px; }
.post-acts { display:flex; gap:16px; font-size:13px; color:var(--sub); }

/* Guide Card */
.guide-card {
  display:flex; align-items:center; gap:12px;
  background:linear-gradient(135deg,#667eea,#764ba2);
  color:white; border-radius:var(--r); padding:14px 16px;
  margin-bottom:16px; cursor:pointer;
  box-shadow:0 4px 15px rgba(102,126,234,0.3);
}
.guide-icon { font-size:28px; }
.guide-title { font-size:15px; font-weight:600; }
.guide-sub { font-size:12px; opacity:0.9; }

/* Guide Page */
.guide-wrapper { padding-top:8px; }
.guide-hero { text-align:center; margin-bottom:24px; }
.guide-hero p { font-size:14px; color:var(--sub); line-height:1.7; margin-top:6px; }
.guide-section { margin-bottom:24px; }
.guide-section h4 { font-size:16px; font-weight:700; margin-bottom:14px; }

.guide-steps { display:flex; flex-direction:column; gap:14px; }
.gs { display:flex; gap:12px; background:var(--card); border-radius:var(--r); padding:16px; box-shadow:var(--shadow); }
.gs-num { width:30px; height:30px; border-radius:50%; background:linear-gradient(135deg,var(--accent),#e8a87c); color:white; display:flex; align-items:center; justify-content:center; font-weight:700; flex-shrink:0; }
.gs-title { font-size:15px; font-weight:600; margin-bottom:4px; }
.gs-desc { font-size:13px; color:var(--sub); line-height:1.6; }

.golden-rules { display:flex; flex-direction:column; gap:10px; }
.rule { display:flex; gap:10px; background:var(--card); border-radius:var(--r); padding:14px; box-shadow:var(--shadow); }
.rule span { font-size:18px; flex-shrink:0; }
.rule-title { font-size:14px; font-weight:600; margin-bottom:4px; }
.rule-desc { font-size:12px; color:var(--sub); line-height:1.6; }

.daily-flow { display:flex; flex-direction:column; gap:10px; }
.flow-item { display:flex; gap:12px; background:var(--card); border-radius:var(--r); padding:14px; box-shadow:var(--shadow); align-items:flex-start; }
.flow-time { font-size:12px; font-weight:700; color:var(--accent); width:56px; flex-shrink:0; padding-top:2px; }
.flow-item p { font-size:13px; }

.mistakes { display:flex; flex-direction:column; gap:10px; }
.mistake { background:var(--card); border-radius:var(--r); padding:14px; box-shadow:var(--shadow); }
.mistake p:first-child { font-size:14px; margin-bottom:4px; }

/* Worry Release */
.release-wrapper { padding-top:8px; }
.release-steps { display:flex; flex-direction:column; gap:16px; }
.rel-step { background:var(--card); border-radius:var(--r); padding:16px; box-shadow:var(--shadow); }
.rel-header { font-size:15px; font-weight:700; margin-bottom:10px; color:var(--text); }
.rel-step textarea { width:100%; border:1px solid var(--warm); border-radius:10px; padding:10px; font-size:13px; outline:none; resize:none; font-family:inherit; background:var(--bg); }
.rel-step textarea:focus { border-color:var(--accent); }
.rel-questions { display:flex; flex-direction:column; gap:10px; }
.rel-q p { font-size:13px; font-weight:500; margin-bottom:4px; }
.burn-btn {
  width:100%; padding:16px; border:none; border-radius:var(--r);
  background:linear-gradient(135deg,#ff6b35,#ff4500);
  color:white; font-size:16px; font-weight:700; cursor:pointer;
  box-shadow:0 4px 15px rgba(255,69,0,0.3);
}
.burn-btn:active { opacity:0.9; }
.burn-effect { text-align:center; padding:20px 0; }
.burn-text { font-size:48px; animation: burnFlicker 0.5s ease infinite; }
@keyframes burnFlicker { 0%,100% { opacity:1; } 50% { opacity:0.6; } }
.burn-msg { font-size:15px; line-height:1.8; color:var(--text); margin-top:12px; }

/* Identity / Be-Do-Have */
.identity-wrapper { padding-top:8px; }
.bdh-step { margin-bottom:18px; border-radius:var(--r); overflow:hidden; box-shadow:var(--shadow); }
.bdh-header { display:flex; align-items:center; gap:12px; padding:14px 16px; color:white; }
.bdh-header.be { background:linear-gradient(135deg,#667eea,#764ba2); }
.bdh-header.do { background:linear-gradient(135deg,#f093fb,#f5576c); }
.bdh-header.have { background:linear-gradient(135deg,#4facfe,#00f2fe); }
.bdh-num { font-size:24px; font-weight:700; }
.bdh-header h4 { font-size:16px; font-weight:700; }
.bdh-header p { font-size:12px; opacity:0.9; }
.bdh-body { background:var(--card); padding:16px; }
.id-questions { display:flex; flex-direction:column; gap:12px; margin-top:10px; }
.id-q { display:flex; gap:10px; align-items:flex-start; }
.id-q span { font-size:20px; margin-top:2px; }
.id-q div { flex:1; }
.id-q label { font-size:13px; font-weight:600; color:var(--text); display:block; margin-bottom:4px; }
.id-q input,.id-q textarea { width:100%; padding:10px; border:1px solid var(--warm); border-radius:10px; font-size:13px; outline:none; resize:none; font-family:inherit; background:var(--bg); }
.id-q input:focus,.id-q textarea:focus { border-color:var(--accent); }

.have-tools { display:flex; flex-direction:column; gap:8px; margin-top:10px; }
.have-tool { background:var(--bg); border-radius:10px; padding:12px 14px; font-size:13px; cursor:pointer; font-weight:500; }
.have-tool:active { opacity:0.8; }

/* Success Diary */
.success-wrapper { padding-top:8px; }

/* Buttons */
.primary-btn {
  width:100%; padding:14px; border:none; border-radius:var(--r);
  background:linear-gradient(135deg,var(--accent),#e8a87c);
  color:white; font-size:15px; font-weight:600; cursor:pointer;
  box-shadow:0 4px 12px rgba(201,149,107,0.3); margin-top:10px;
}
.primary-btn:active { opacity:0.9; }
.secondary-btn {
  width:100%; padding:12px; border:1px dashed var(--warm);
  border-radius:var(--r); background:transparent;
  color:var(--sub); font-size:13px; cursor:pointer; margin-bottom:8px;
}
.tip-text { text-align:center; margin-top:14px; font-size:13px; color:var(--sub); }

/* Check Preview */
.check-preview {
  position:fixed; inset:0; background:rgba(0,0,0,0.85);
  z-index:4000; display:flex; align-items:center; justify-content:center;
  padding:20px;
}
.check-preview-inner { text-align:center; max-width:400px; width:100%; }
.check-hint-top { color:rgba(255,255,255,0.7); font-size:13px; margin-bottom:14px; }
.check-card {
  border-radius:12px; overflow:hidden;
  box-shadow:0 8px 40px rgba(212,165,116,0.4);
}
.ck-bg {
  background:linear-gradient(160deg,#fffef5 0%,#fdf6ee 40%,#f5e6d3 100%);
  padding:28px 24px 20px;
  border:3px solid #d4a574;
  border-radius:12px;
  position:relative;
}
.ck-bg::before {
  content:''; position:absolute; inset:6px;
  border:1px solid rgba(212,165,116,0.25);
  border-radius:8px; pointer-events:none;
}
.ck-top { display:flex; justify-content:space-between; align-items:center; margin-bottom:4px; }
.ck-bank-name { font-size:18px; font-weight:700; color:#c9956b; letter-spacing:1px; }
.ck-serial { font-size:11px; color:#bbb; }
.ck-divider { height:1px; background:linear-gradient(90deg,transparent,#d4a574,transparent); margin:12px 0; }
.ck-line { display:flex; align-items:baseline; margin-bottom:10px; gap:10px; }
.ck-label { font-size:12px; color:#a09080; width:42px; flex-shrink:0; text-align:right; letter-spacing:2px; }
.ck-val { font-size:16px; font-weight:600; color:#2d2a26; flex:1; text-align:left; border-bottom:1px dashed #e0d5c5; padding-bottom:2px; }
.ck-name { color:#5e35b1; }
.ck-amount { font-size:24px; color:#c0392b; font-weight:800; }
.ck-bottom { display:flex; justify-content:space-between; align-items:center; margin-top:4px; }
.ck-sig { text-align:left; }
.ck-sig p:first-child { font-size:11px; color:#a09080; }
.ck-sig-text { font-size:20px; color:#c9956b; font-style:italic; }
.ck-stamp-circle {
  display:flex; align-items:center; justify-content:center;
  width:56px; height:56px; border-radius:50%;
  border:3px solid #c0392b; color:#c0392b;
  font-size:12px; font-weight:700; text-align:center; line-height:1.2;
  transform:rotate(-15deg);
}
.ck-footer { font-size:10px; color:#c9956b; text-align:center; margin-top:12px; letter-spacing:1px; }
.ck-brand { font-size:10px; color:#d4a574; text-align:center; margin-top:6px; opacity:0.6; }
.check-btns { display:flex; gap:12px; justify-content:center; margin-top:16px; }
.check-save-btn {
  background:linear-gradient(135deg,var(--accent),#e8a87c); border:none;
  color:white; padding:10px 24px; border-radius:24px;
  font-size:14px; font-weight:600; cursor:pointer;
  box-shadow:0 4px 12px rgba(201,149,107,0.3);
}
.check-close-btn {
  background:rgba(255,255,255,0.15); border:1px solid rgba(255,255,255,0.3);
  color:white; padding:10px 24px; border-radius:24px;
  font-size:14px; cursor:pointer;
}

/* AI Buttons */
.ai-btn {
  width:100%; padding:12px; border:2px solid #764ba2;
  border-radius:var(--r); background:linear-gradient(135deg,#f5f0ff,#ede7f6);
  color:#5e35b1; font-size:14px; font-weight:600; cursor:pointer;
  margin-top:8px; display:flex; align-items:center; justify-content:center; gap:6px;
}
.ai-btn:active { opacity:0.8; }
.ai-btn-sm {
  padding:8px 16px; border:1.5px solid #764ba2;
  border-radius:20px; background:linear-gradient(135deg,#f5f0ff,#ede7f6);
  color:#5e35b1; font-size:12px; font-weight:600; cursor:pointer;
  margin-top:8px; display:inline-flex; align-items:center; gap:4px;
}

/* AI Modal */
.ai-overlay {
  position:fixed; inset:0; background:rgba(0,0,0,0.5);
  z-index:3000; display:flex; align-items:flex-end; justify-content:center;
}
.ai-modal {
  background:var(--bg); border-radius:20px 20px 0 0;
  width:100%; max-width:500px; max-height:75vh;
  overflow:hidden; display:flex; flex-direction:column;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform:translateY(100%); } }
.ai-modal-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 20px; border-bottom:1px solid var(--warm);
  font-size:16px; font-weight:600;
}
.ai-modal-header button { background:none; border:none; font-size:18px; cursor:pointer; color:var(--sub); padding:4px 8px; }
.ai-modal-body { padding:20px; overflow-y:auto; flex:1; }
.ai-loading { text-align:center; padding:30px 0; }
.ai-spinner {
  width:40px; height:40px; border:3px solid var(--warm);
  border-top-color:#764ba2; border-radius:50%;
  animation: spin 1s linear infinite; margin:0 auto 12px;
}
@keyframes spin { to { transform:rotate(360deg); } }
.ai-loading p { color:var(--sub); font-size:14px; }
.ai-content { font-size:14px; line-height:1.8; color:var(--text); white-space:pre-wrap; }
.ai-modal-footer { padding:12px 20px 20px; }
.ai-use-btn {
  width:100%; padding:14px; border:none; border-radius:var(--r);
  background:linear-gradient(135deg,#667eea,#764ba2);
  color:white; font-size:15px; font-weight:600; cursor:pointer;
}

/* Modal */
.modal-overlay {
  position:fixed; inset:0; background:rgba(0,0,0,0.4);
  z-index:3500; display:flex; align-items:flex-end; justify-content:center;
}
.modal-box {
  background:var(--bg); border-radius:20px 20px 0 0;
  width:100%; max-width:500px; max-height:70vh; overflow-y:auto;
  animation: slideUp 0.3s ease;
}
.modal-hdr {
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 20px 10px; position:sticky; top:0; background:var(--bg); z-index:1;
}
.modal-hdr h3 { font-size:17px; font-weight:600; }
.modal-hdr button { background:none; border:none; font-size:18px; cursor:pointer; color:var(--sub); padding:4px 8px; }
.modal-bdy { padding:0 20px 24px; }

/* Toast */
.toast {
  position:fixed; bottom:90px; left:50%; transform:translateX(-50%);
  background:var(--text); color:white; padding:10px 22px;
  border-radius:24px; font-size:13px; z-index:2000; white-space:nowrap;
}
