/* ============================================================
   🌱 众筹项目平台 —— 全站视觉主题系统
   支持 4 款精美主题风格：
   1. 🌿 吉卜力 (Ghibli) —— 宫崎骏温润水彩手绘风 · 森林绿 · 琥珀金 · 陶土红
   2. ⚡ 科技感 (Tech Cyber) —— 赛博暗夜黑 · 霓虹青 · 极光绿 · 未来极简 HUD
   3. 🎈 卡通 (Cartoon Pop) —— 欢快波普漫画风 · 粗黑描边 · 奶酪黄 · 活力珊瑚红
   4. 🍚 原本 (Classic) —— 经典温暖质朴风 · 原创纸质麦黄 · 质朴石墨
   ============================================================ */

:root,
[data-theme="ghibli"] {
  --theme-id: "ghibli";
  /* 吉卜力自然水彩调色盘 */
  --bg: #f7f4ea;
  --bg-2: #efebe0;
  --bg-subtle: #fbf9f4;
  --card: #fffef9;
  
  --ink: #223528;
  --ink-soft: #475d4e;
  --muted: #7d9382;
  --line: #ded6c5;
  --line-strong: #c8bc9e;

  --forest: #2f6140;          /* 龙猫苍翠绿 */
  --forest-hover: #244e33;
  --sprout: #549a65;
  --sprout-light: #e8f4eb;
  --gold: #e29734;            /* 暖阳提灯金 */
  --gold-deep: #be751d;
  --gold-light: #fbf0dc;
  --terracotta: #cf5336;      /* 陶土砖红 */
  --terracotta-deep: #a93c23;
  --terracotta-light: #fcece8;
  --sky: #468ea8;
  --sky-light: #eaf3f7;

  --shadow: 0 10px 28px rgba(34, 53, 40, 0.08);
  --shadow-hover: 0 16px 36px rgba(34, 53, 40, 0.13);
  --radius: 18px;
  --radius-sm: 12px;
  --font: "Noto Serif SC", "Songti SC", "PingFang SC", "Microsoft YaHei", serif;
  --body-bg-gradient:
    radial-gradient(1300px 700px at 85% -10%, rgba(226, 151, 52, 0.12), transparent 60%),
    radial-gradient(1000px 600px at -5% 15%, rgba(47, 97, 64, 0.09), transparent 55%),
    radial-gradient(900px 600px at 50% 90%, rgba(70, 142, 168, 0.07), transparent 50%),
    #f7f4ea;
}

/* ⚡ 科技感风格 (Tech Cyber) */
[data-theme="tech"] {
  --theme-id: "tech";
  --bg: #090d16;
  --bg-2: #0f172a;
  --bg-subtle: #141e33;
  --card: #0d1527;

  --ink: #f8fafc;
  --ink-soft: #94a3b8;
  --muted: #64748b;
  --line: #1e293b;
  --line-strong: #00f0ff;

  --forest: #00f0ff;          /* 赛博电光青 */
  --forest-hover: #38bdf8;
  --sprout: #10b981;          /* 极光绿 */
  --sprout-light: rgba(16, 185, 129, 0.15);
  --gold: #f59e0b;
  --gold-deep: #d97706;
  --gold-light: rgba(245, 158, 11, 0.15);
  --terracotta: #f43f5e;
  --terracotta-deep: #e11d48;
  --terracotta-light: rgba(244, 63, 94, 0.15);
  --sky: #0ea5e9;
  --sky-light: rgba(14, 165, 233, 0.15);

  --shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 16px rgba(0, 240, 255, 0.08);
  --shadow-hover: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 24px rgba(0, 240, 255, 0.22);
  --radius: 14px;
  --radius-sm: 8px;
  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
  --body-bg-gradient:
    radial-gradient(1200px 700px at 80% -10%, rgba(0, 240, 255, 0.08), transparent 60%),
    radial-gradient(1000px 600px at 10% 20%, rgba(16, 185, 129, 0.07), transparent 55%),
    #090d16;
}

/* 🎈 卡通波普风格 (Cartoon Pop) */
[data-theme="cartoon"] {
  --theme-id: "cartoon";
  --bg: #fffbf0;
  --bg-2: #ffeaa7;
  --bg-subtle: #fff9e6;
  --card: #ffffff;

  --ink: #18181b;
  --ink-soft: #3f3f46;
  --muted: #71717a;
  --line: #18181b;
  --line-strong: #18181b;

  --forest: #ff4757;          /* 活力卡通红 */
  --forest-hover: #ee2f40;
  --sprout: #2ed573;          /* 薄荷绿 */
  --sprout-light: #e3f9ed;
  --gold: #ffa502;            /* 阳光黄 */
  --gold-deep: #e59400;
  --gold-light: #fff3cd;
  --terracotta: #ff6b81;
  --terracotta-deep: #e84118;
  --terracotta-light: #ffebee;
  --sky: #1e90ff;
  --sky-light: #e8f4fd;

  --shadow: 4px 4px 0px #18181b;
  --shadow-hover: 6px 6px 0px #18181b;
  --radius: 20px;
  --radius-sm: 14px;
  --font: "Comic Sans MS", "PingFang SC", "Microsoft YaHei", cursive, sans-serif;
  --body-bg-gradient:
    radial-gradient(circle at 10% 10%, rgba(255, 234, 167, 0.4), transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(255, 107, 129, 0.15), transparent 40%),
    #fffbf0;
}

/* 🍚 原本经典风格 (Classic) */
[data-theme="classic"] {
  --theme-id: "classic";
  --bg: #fcfaf6;
  --bg-2: #f3ede2;
  --bg-subtle: #fbf9f4;
  --card: #ffffff;

  --ink: #2b2520;
  --ink-soft: #554d45;
  --muted: #80756b;
  --line: #e6ded3;
  --line-strong: #c8bcad;

  --forest: #b45309;          /* 经典麦香棕 */
  --forest-hover: #92400e;
  --sprout: #65a30d;
  --sprout-light: #f2f8e9;
  --gold: #d97706;
  --gold-deep: #b45309;
  --gold-light: #fef3c7;
  --terracotta: #dc2626;
  --terracotta-deep: #b91c1c;
  --terracotta-light: #fee2e2;
  --sky: #0284c7;
  --sky-light: #e0f2fe;

  --shadow: 0 8px 24px rgba(43, 37, 32, 0.06);
  --shadow-hover: 0 14px 32px rgba(43, 37, 32, 0.1);
  --radius: 16px;
  --radius-sm: 10px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --body-bg-gradient:
    radial-gradient(1100px 600px at 70% 0%, rgba(217, 119, 6, 0.08), transparent 60%),
    #fcfaf6;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--body-bg-gradient);
  min-height: 100vh;
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  transition: background 0.3s ease, color 0.3s ease;
}

/* 风格纹理装饰：吉卜力浮叶、科技网格、卡通波点 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

[data-theme="ghibli"] body::before,
:root:not([data-theme]) body::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill='%232f6140' fill-opacity='0.045'%3E%3Cpath d='M20 25 C14 18 10 12 18 10 C25 8 28 18 20 25 Z'/%3E%3Ccircle cx='55' cy='16' r='2' fill='%23e29734' fill-opacity='0.06'/%3E%3Cpath d='M75 55 C82 48 88 52 85 60 C80 66 72 62 75 55 Z'/%3E%3Ccircle cx='28' cy='70' r='2.2' fill='%23e29734' fill-opacity='0.05'/%3E%3Cpath d='M40 85 C35 78 40 70 48 74 C50 82 45 88 40 85 Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 100px 100px;
}

[data-theme="tech"] body::before {
  background-image: linear-gradient(rgba(0, 240, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.035) 1px, transparent 1px);
  background-size: 40px 40px;
}

[data-theme="cartoon"] body::before {
  background-image: radial-gradient(#18181b 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.06;
}

[data-theme="classic"] body::before {
  background-image: radial-gradient(rgba(43, 37, 32, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}

main {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px 80px;
  position: relative;
  z-index: 1;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ---------- 顶部导航 ---------- */
.site-header {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1px;
}

.brand img {
  width: 46px;
  height: 46px;
  filter: drop-shadow(0 4px 6px rgba(47, 97, 64, 0.15));
}
.brand small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.5px;
}

/* 顶部风格与语言控制区 */
.header-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* 顶部风格平铺按钮组 (Flattened Theme Bar) */
.theme-bar {
  display: inline-flex;
  align-items: center;
  background: var(--card);
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  padding: 3px;
  gap: 3px;
  box-shadow: 0 2px 0 var(--line);
  max-width: 100%;
}

.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.theme-btn:hover {
  color: var(--ink);
  background: var(--bg-subtle);
}

.theme-btn.active {
  background: var(--forest);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

[data-theme="tech"] .theme-btn.active {
  background: var(--forest);
  color: #050811;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

[data-theme="cartoon"] .theme-btn.active {
  background: var(--forest);
  color: #ffffff;
  box-shadow: 2px 2px 0px #18181b;
}

[data-theme="classic"] .theme-btn.active {
  background: var(--forest);
  color: #ffffff;
}

.btn-lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  color: var(--ink);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 2px 0 var(--line);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-lang:hover {
  border-color: var(--gold);
  color: var(--gold-deep);
  transform: translateY(-1px);
}

.btn-lang:active {
  transform: translateY(1px);
}

.nav { display: flex; gap: 10px; align-items: center; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  background: var(--card);
  border: 2px solid var(--line-strong);
  border-radius: 999px;
  padding: 10px 22px;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  box-shadow: 0 3px 0 var(--line-strong);
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--line-strong); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--line-strong); }

/* 吉卜力主要按钮：森林苍翠绿 */
.btn-primary {
  background: var(--forest);
  border-color: var(--forest-hover);
  color: #fff;
  box-shadow: 0 3px 0 var(--forest-hover);
}
.btn-primary:hover {
  box-shadow: 0 5px 0 var(--forest-hover);
  background: #39744c;
}

/* 琥珀金按钮 */
.btn-gold {
  background: var(--gold);
  border-color: var(--gold-deep);
  color: #fff;
  box-shadow: 0 3px 0 var(--gold-deep);
}
.btn-gold:hover {
  box-shadow: 0 5px 0 var(--gold-deep);
  background: #eaa445;
}

.btn-ghost { background: transparent; box-shadow: none; border-color: var(--line); }
.btn-ghost:hover { background: rgba(222, 214, 197, 0.35); box-shadow: none; }

.btn-lg { font-size: 18px; padding: 13px 30px; }
.btn-sm { font-size: 14px; padding: 6px 16px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ⚡ 科技感主题按钮与交互专属定制 */
[data-theme="tech"] .btn {
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
  border-color: #27374d;
}
[data-theme="tech"] .btn-primary {
  background: #00f0ff;
  border-color: #38bdf8;
  color: #080c14;
  font-weight: 700;
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.45);
}
[data-theme="tech"] .btn-primary:hover {
  background: #38bdf8;
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.65);
}
[data-theme="tech"] .bowl-card {
  border: 1.5px solid #1e293b;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
}
[data-theme="tech"] .bowl-card:hover {
  border-color: #00f0ff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.7), 0 0 18px rgba(0, 240, 255, 0.2);
}
[data-theme="tech"] input,
[data-theme="tech"] textarea,
[data-theme="tech"] select {
  background: #111a2e;
  border-color: #22324e;
  color: #f8fafc;
}
[data-theme="tech"] input:focus,
[data-theme="tech"] textarea:focus,
[data-theme="tech"] select:focus {
  border-color: #00f0ff;
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.2);
}
[data-theme="tech"] .media-upload-box {
  background: #0d1628;
  border-color: #22324e;
}
[data-theme="tech"] .media-upload-box:hover {
  border-color: #00f0ff;
  background: #111d35;
}

/* 🎈 卡通主题按钮与卡片专属定制 (Neo-Brutal Comic Pop) */
[data-theme="cartoon"] .btn {
  border: 2.5px solid #18181b;
  border-radius: 14px;
  box-shadow: 3px 3px 0 #18181b;
}
[data-theme="cartoon"] .btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 #18181b;
}
[data-theme="cartoon"] .btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #18181b;
}
[data-theme="cartoon"] .btn-primary {
  background: #ff4757;
  color: #fff;
  border-color: #18181b;
}
[data-theme="cartoon"] .bowl-card {
  border: 2.5px solid #18181b;
  box-shadow: 4px 4px 0 #18181b;
}
[data-theme="cartoon"] .bowl-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 #18181b;
}
[data-theme="cartoon"] .card-panel,
[data-theme="cartoon"] .detail-card,
[data-theme="cartoon"] .modal-panel {
  border: 2.5px solid #18181b;
  box-shadow: 6px 6px 0 #18181b;
}
[data-theme="cartoon"] input,
[data-theme="cartoon"] textarea,
[data-theme="cartoon"] select {
  border: 2px solid #18181b;
  box-shadow: 2px 2px 0 #18181b;
}
[data-theme="cartoon"] input:focus,
[data-theme="cartoon"] textarea:focus,
[data-theme="cartoon"] select:focus {
  box-shadow: 3px 3px 0 #ff4757;
}

/* ---------- 首屏 Hero ---------- */
.hero {
  text-align: center;
  padding: 36px 0 20px;
  position: relative;
}

.hero-bowl {
  width: 175px;
  margin: 0 auto 10px;
  animation: ghibliFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 14px 20px rgba(47, 97, 64, 0.22));
}

.hero h1 {
  font-size: clamp(30px, 5.2vw, 48px);
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1.4;
  color: var(--ink);
}

.hero h1 em {
  font-style: normal;
  color: var(--forest);
  text-shadow: 0 2px 8px rgba(47, 97, 64, 0.15);
}

.hero .sub {
  margin: 14px auto 26px;
  color: var(--ink-soft);
  font-size: clamp(15px, 2.1vw, 18px);
  max-width: 600px;
}

.hero .slogan {
  margin: 22px auto 0;
  color: var(--gold-deep);
  font-size: 15px;
  min-height: 1.6em;
  font-weight: 600;
}

.hero .slogan.fade { animation: fadeTip 0.5s ease; }

@keyframes fadeTip {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

@keyframes ghibliFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(0.8deg); }
}

@keyframes settle {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(-2deg); }
  50% { transform: rotate(2deg); }
  75% { transform: rotate(-1deg); }
  100% { transform: rotate(0deg); }
}
.anim-settle { animation: settle 0.6s ease; }

/* ---------- 众筹项目卡片 ---------- */
.section-title {
  font-size: 24px;
  font-weight: 800;
  margin: 46px 0 18px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: var(--ink);
}
.section-title small { font-size: 14px; color: var(--muted); font-weight: 400; }

.bowl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
}

.bowl-card {
  position: relative;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 20px 18px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.bowl-card::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1.5px dashed rgba(200, 188, 158, 0.5);
  border-radius: 14px;
  pointer-events: none;
}

.bowl-card:hover {
  transform: translateY(-4px);
  border-color: var(--forest);
  box-shadow: var(--shadow-hover);
}

/* 卡片首图展示 */
.card-cover-wrap {
  width: calc(100% + 40px);
  margin: -20px -20px 4px -20px;
  height: 160px;
  overflow: hidden;
  background: var(--bg-2);
  position: relative;
  border-bottom: 2px solid var(--line);
}

.card-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.bowl-card:hover .card-cover-img { transform: scale(1.04); }

.bowl-card .row { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }

.bowl-card .avatar {
  width: 44px; height: 44px; border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line);
  background: var(--bg-2);
  flex: none;
}

.bowl-card h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-all;
}

.bowl-card .meta { color: var(--ink-soft); font-size: 14px; position: relative; z-index: 1; }

.bowl-card .status-tag {
  flex: none;
  align-self: flex-start;
  margin-top: 3px;
  font-size: 12px;
  background: var(--sprout-light);
  color: var(--forest);
  border: 1.5px solid #bdd7c4;
  border-radius: 999px;
  padding: 2px 10px;
  white-space: nowrap;
  font-weight: 600;
}

.media-hint-pills {
  font-size: 12px;
  color: var(--forest);
  background: var(--sprout-light);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #c9e0d0;
}

/* ---------- 众筹进度条（吉卜力生机绿芽风格） ---------- */
.progress {
  position: relative;
  height: 26px;
  background: var(--bg-2);
  border: 2px solid var(--line-strong);
  border-radius: 13px;
  overflow: hidden;
  z-index: 1;
}

.progress .fill {
  height: 100%;
  border-radius: 11px;
  background: linear-gradient(90deg, #539c65, #357444);
  transition: width 0.7s ease;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.progress .fill.full {
  background: linear-gradient(90deg, #e29734, #cf5336);
}

.progress .pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  z-index: 2;
  text-shadow: 0 0 6px var(--card);
}

.bowl-card .foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  color: var(--ink-soft);
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
  gap: 6px;
}

.bowl-card .foot .who { display: flex; align-items: center; gap: 6px; }

/* ---------- 空状态 ---------- */
.empty {
  text-align: center;
  padding: 50px 20px;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 254, 249, 0.7);
}

.empty img { width: 130px; opacity: 0.95; }
.empty h2 { font-size: 24px; margin: 16px 0 6px; color: var(--ink); }
.empty p { color: var(--ink-soft); margin-bottom: 22px; }

/* ---------- 表单容器 ---------- */
.card-panel {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 30px;
  box-shadow: var(--shadow);
  max-width: 660px;
  margin: 0 auto;
}

.card-panel h2 { font-size: 26px; margin-bottom: 4px; color: var(--ink); }
.card-panel .lead { color: var(--ink-soft); margin-bottom: 22px; font-size: 15px; }

.field { margin-bottom: 20px; }

.field label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 15px;
  color: var(--ink);
}

.field label .req { color: var(--terracotta); }
.field .hint { color: var(--muted); font-size: 12.5px; font-weight: 400; margin-left: 8px; }

.field input[type="text"],
.field input[type="number"],
.field input[type="date"],
.field input[type="url"],
.field textarea,
.field select {
  width: 100%;
  font-family: var(--font);
  font-size: 15px;
  color: var(--ink);
  background: #fffdf7;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(47, 97, 64, 0.16);
}

.field input::placeholder, .field textarea::placeholder {
  color: rgba(71, 93, 78, 0.45);
}

.field textarea { min-height: 100px; resize: vertical; }

.field .char-count { text-align: right; font-size: 12px; color: var(--muted); margin-top: 4px; }

.field .slug-preview {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--muted);
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

/* ---------- 媒体配置输入区域（0~5图片 / 0~3视频 / 0~3外链） ---------- */
.media-config-section {
  background: #fbf9f2;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 22px;
}

.section-sub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-label {
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 0 !important;
}

.badge-count {
  font-size: 12.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--sprout-light);
  color: var(--forest);
  border: 1px solid #bdd7c4;
}

.media-actions-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.hint-text {
  font-size: 12px;
  color: var(--muted);
}

/* 图片上传预览卡片列表 */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}

.media-item-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  border: 2px solid var(--line-strong);
  overflow: hidden;
  background: var(--bg-2);
  box-shadow: 0 2px 5px rgba(0,0,0,0.06);
}

.media-item-card .media-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-item-card .media-idx-tag {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(34, 53, 40, 0.75);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-remove-media {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(207, 83, 54, 0.9);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-remove-media:hover {
  transform: scale(1.15);
  background: var(--terracotta-deep);
}

/* 视频列表 */
.video-preview-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 8px;
}

.video-item-card {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.video-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.video-idx-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--forest);
  background: var(--sprout-light);
  padding: 2px 8px;
  border-radius: 4px;
}

.video-item-title {
  font-size: 14px;
  color: var(--ink);
  flex: 1;
  margin: 0 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 外链输入行 */
.link-inputs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

.link-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  padding: 10px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
}

.link-inputs {
  flex: 1;
  display: flex;
  gap: 8px;
}

.link-title-input {
  width: 40% !important;
  font-size: 13.5px !important;
  padding: 7px 10px !important;
}

.link-url-input {
  width: 60% !important;
  font-size: 13.5px !important;
  padding: 7px 10px !important;
}

/* 截止日期快速选择与提示 */
.deadline-presets-bar,
.amount-presets-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.deadline-preset-btn,
.amount-preset-btn {
  padding: 6px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-soft);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.deadline-preset-btn:hover,
.amount-preset-btn:hover {
  border-color: var(--forest);
  color: var(--forest);
  background: var(--bg-subtle);
}

.deadline-preset-btn.active,
.amount-preset-btn.active {
  border-color: var(--forest);
  background: var(--sprout-light);
  color: var(--forest);
  font-weight: 700;
  box-shadow: 0 0 0 2px rgba(47, 97, 64, 0.12);
}

.deadline-inputs-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.deadline-inputs-wrap input[type="date"] {
  max-width: 220px;
}

.deadline-hint-bubble {
  font-size: 13px;
  font-weight: 600;
  color: var(--forest);
  background: var(--sprout-light);
  border: 1px solid #bdd7c4;
  padding: 6px 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* 多收款方式配置卡片 */
.payment-config-section {
  background: var(--bg-subtle);
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 24px;
}

.pay-method-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.pay-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-soft);
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.pay-toggle-btn:hover {
  border-color: var(--forest);
  color: var(--ink);
}

.pay-toggle-btn.active {
  border-color: var(--forest);
  background: var(--card);
  color: var(--forest);
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.pay-toggle-btn .pay-dot {
  font-size: 11px;
}

.pay-toggle-btn.active .pay-dot {
  color: var(--sprout);
}

.pay-toggle-btn .pay-ready-tag {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--muted);
  font-weight: 500;
}

.pay-toggle-btn.active .pay-ready-tag.ready {
  background: var(--sprout-light);
  color: var(--forest);
  font-weight: 700;
}

.pay-cards-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pay-channel-card {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  transition: all 0.2s ease;
}

.pay-channel-card.collapsed {
  display: none;
}

.pay-channel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.pay-channel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

.pay-channel-title strong {
  color: var(--ink);
}

.pay-channel-title .tag-status {
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--muted);
}

.pay-channel-title .tag-status.ready {
  background: var(--sprout-light);
  color: var(--forest);
  font-weight: 600;
  border: 1px solid #bdd7c4;
}

.switch-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
  user-select: none;
  font-weight: 600;
}

.switch-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--forest);
  cursor: pointer;
}

.pay-channel-body {
  margin-top: 8px;
}

/* 收款方式选择 */
.pay-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }

.pay-tab {
  flex: 1;
  min-width: 110px;
  text-align: center;
  padding: 10px 8px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fffdf7;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 600;
  color: var(--ink-soft);
  transition: all 0.15s ease;
}

.pay-tab.active {
  border-color: var(--forest);
  background: var(--sprout-light);
  color: var(--forest);
  box-shadow: 0 0 0 3px rgba(47, 97, 64, 0.14);
}

/* 图片上传组件 */
.upload-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 2px dashed var(--line-strong);
  border-radius: 12px;
  background: #fffdf7;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.upload-box:hover { border-color: var(--forest); }

.field-error,
.field-error .upload-box {
  border-color: var(--terracotta) !important;
  box-shadow: 0 0 0 3px rgba(207, 83, 54, 0.15) !important;
}

.upload-box .thumb {
  width: 68px; height: 68px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid var(--line);
  background: var(--bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 24px;
  flex: none;
  overflow: hidden;
}

.upload-box .tip { font-size: 13.5px; color: var(--ink-soft); }
.upload-box .tip strong { color: var(--ink); display: block; }

/* ---------- 项目详情页 (bowl.html) ---------- */
.detail-wrap { max-width: 800px; margin: 0 auto; }

.detail-card {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 34px 30px;
  position: relative;
  overflow: hidden;
}

.detail-card::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1.5px dashed rgba(200, 188, 158, 0.45);
  border-radius: 18px;
  pointer-events: none;
}

.detail-top { display: flex; align-items: flex-start; gap: 18px; position: relative; z-index: 1; }

.detail-bowl-img {
  width: 110px;
  flex: none;
  filter: drop-shadow(0 10px 14px rgba(47, 97, 64, 0.2));
}

.detail-title {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 800;
  line-height: 1.4;
  color: var(--ink);
}

.detail-amount { font-size: 19px; color: var(--ink-soft); margin: 8px 0 4px; }
.detail-amount .amt-state { color: var(--forest); font-weight: 800; }
.detail-amount b { color: var(--forest); font-size: 28px; }

.detail-status {
  display: inline-block;
  margin-top: 8px;
  font-size: 14px;
  color: var(--forest);
  background: var(--sprout-light);
  border: 1.5px solid #bdd7c4;
  border-radius: 999px;
  padding: 3px 14px;
  font-weight: 600;
}

.detail-status.s-done { color: var(--terracotta); background: var(--terracotta-light); border-color: #f2c7bd; }
.detail-status.s-cold { color: var(--muted); background: var(--bg-2); border-color: var(--line); }

.detail-progress { margin: 22px 0; position: relative; z-index: 1; }
.detail-progress .progress { height: 34px; }
.detail-progress .pct { font-size: 15px; }

.detail-desc { margin: 20px 0; position: relative; z-index: 1; }

.detail-desc .why {
  background: #fbf9f2;
  border-left: 4px solid var(--forest);
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
  color: var(--ink-soft);
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.8;
  font-size: 15.5px;
}

/* 项目详情页的媒体模块展示 */
.project-media-block {
  margin: 26px 0;
  position: relative;
  z-index: 1;
}

.media-block-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 14px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.media-block-title small {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}

/* 水彩相簿/画廊网格 (0~5 张图片) */
.project-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 14px;
}

.gallery-thumb-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--line-strong);
  background: var(--bg-2);
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-thumb-wrap:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 18px rgba(34, 53, 40, 0.15);
  border-color: var(--forest);
}

.gallery-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-zoom-hint {
  position: absolute;
  inset: auto 0 0 0;
  background: linear-gradient(transparent, rgba(34, 53, 40, 0.8));
  color: #fff;
  font-size: 11px;
  text-align: center;
  padding: 6px 4px 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gallery-thumb-wrap:hover .gallery-zoom-hint { opacity: 1; }

/* 视频播放展示 (0~3 段视频) */
.project-videos-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.video-player-card {
  background: #fbf9f2;
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.05);
}

.video-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.video-tag {
  font-size: 12px;
  font-weight: 700;
  background: var(--sprout-light);
  color: var(--forest);
  border: 1px solid #bdd7c4;
  padding: 2px 8px;
  border-radius: 4px;
}

.video-title {
  font-size: 15px;
  color: var(--ink);
}

.video-card-body video {
  width: 100%;
  max-height: 380px;
  border-radius: 10px;
  background: #111;
  display: block;
}

/* 项目外链展示 (0~3 个外链) */
.project-links-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.project-link-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: #fbf9f2;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  transition: all 0.16s ease;
  box-shadow: 0 2px 0 var(--line);
}

.project-link-pill:hover {
  background: var(--sprout-light);
  border-color: var(--forest);
  color: var(--forest);
  transform: translateY(-2px);
  box-shadow: 0 4px 0 var(--forest);
}

.project-link-pill .link-arrow {
  font-size: 12px;
  color: var(--muted);
}

/* Lightbox 大图预览画廊 */
.lightbox-modal {
  position: relative;
  max-width: 90vw;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-modal img {
  max-width: 88vw;
  max-height: 78vh;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  border: 3px solid #fff;
  background: #000;
}

.lightbox-caption {
  color: #fff;
  font-size: 14px;
  margin-top: 10px;
  background: rgba(0,0,0,0.6);
  padding: 4px 16px;
  border-radius: 999px;
}

.lightbox-close {
  position: absolute;
  top: -38px;
  right: -8px;
  background: rgba(255,255,255,0.85);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #222;
  transition: transform 0.15s ease;
}

.lightbox-close:hover { transform: scale(1.15); }

.detail-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0 6px;
  position: relative;
  z-index: 1;
}

.kv {
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  position: relative;
  z-index: 1;
}

/* ---------- 支持记录 ---------- */
.records { margin-top: 40px; }

.record-list { display: flex; flex-direction: column; gap: 10px; }

.record {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.record .r-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--sprout-light);
  border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex: none;
}

.record .r-main { flex: 1; min-width: 0; }
.record .r-name { font-weight: 700; font-size: 15px; color: var(--ink); }
.record .r-name .amt { color: var(--forest); font-weight: 800; margin-left: 6px; }
.record .r-msg { color: var(--ink-soft); font-size: 14px; word-break: break-all; }
.record .r-time { color: var(--muted); font-size: 12px; margin-top: 4px; }

.pending-record { border-style: dashed; background: #fffcf2; }
.pending-record .pending-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ---------- 弹窗通用 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(34, 53, 40, 0.45);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-mask.show { opacity: 1; pointer-events: auto; }

.modal {
  background: var(--card);
  border: 2px solid var(--line-strong);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(34, 53, 40, 0.25);
  max-width: 460px;
  width: 100%;
  padding: 28px 26px;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.22s ease;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-mask.show .modal { transform: none; }

.modal h3 { font-size: 22px; margin-bottom: 4px; color: var(--ink); }
.modal .lead { color: var(--ink-soft); font-size: 14px; margin-bottom: 18px; }
.modal .close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none;
  font-size: 22px; color: var(--muted); cursor: pointer;
}

.qr-box { text-align: center; margin: 16px 0; }
.qr-box img {
  max-width: 260px;
  max-height: 340px;
  width: auto;
  height: auto;
  border-radius: 12px;
  border: 2px solid var(--line);
}

.qr-tip { font-size: 14px; color: var(--ink-soft); text-align: center; }
.qr-tip b { color: var(--terracotta); }

.addr-box {
  display: flex; gap: 8px; align-items: center;
  background: #fbf9f2; border: 2px solid var(--line);
  border-radius: 12px; padding: 10px 12px; margin: 12px 0;
  word-break: break-all; font-size: 13px;
}

.alert {
  background: var(--gold-light);
  border: 1.5px solid var(--gold);
  color: var(--gold-deep);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13.5px;
  margin: 10px 0;
}

.alert-red { background: var(--terracotta-light); border-color: var(--terracotta); color: var(--terracotta-deep); }

/* 支持成功场景动画 */
.ding-scene {
  position: relative;
  width: 150px;
  height: 132px;
  margin: 8px auto 2px;
}

.ding-scene .rice {
  position: absolute;
  top: 0;
  left: 50%;
  width: 22px;
  height: 14px;
  background: url("../img/logo.svg") center/contain no-repeat;
  opacity: 0;
  z-index: 2;
}

.ding-scene .rice:nth-child(1) { margin-left: -16px; }
.ding-scene .rice:nth-child(2) { margin-left: 1px; }
.ding-scene .rice:nth-child(3) { margin-left: 15px; }

.ding-scene .rice.drop { animation: seedInto 0.5s ease forwards; }

@keyframes seedInto {
  0% { opacity: 0; transform: translateY(-46px) scale(0.8); }
  55% { opacity: 1; }
  100% { opacity: 1; transform: translateY(52px) scale(1); }
}

.ding-scene .ding-bowl {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 128px;
  transform-origin: 50% 90%;
}

.ding-scene.wobble .ding-bowl { animation: bowlWobble 0.55s ease; }

@keyframes bowlWobble {
  0% { transform: translateX(-50%) rotate(0deg); }
  20% { transform: translateX(-50%) rotate(-2.5deg); }
  50% { transform: translateX(-50%) rotate(2.5deg); }
  80% { transform: translateX(-50%) rotate(-1.5deg); }
  100% { transform: translateX(-50%) rotate(0deg); }
}

.ding-text { text-align: center; font-size: 20px; font-weight: 800; margin-top: 8px; color: var(--ink); }

/* ---------- 底部页脚 ---------- */
.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 34px 20px 42px;
  border-top: 1.5px dashed var(--line);
  position: relative;
  z-index: 1;
}

.site-footer a { color: var(--forest); }
.site-footer p { margin: 4px 0; }

/* ---------- 小部件 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 15px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 200;
  max-width: 90vw;
  box-shadow: 0 10px 30px rgba(0,0,0,0.22);
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.alert-mask {
  position: fixed;
  inset: 0;
  background: rgba(34, 53, 40, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.alert-mask.show { opacity: 1; pointer-events: auto; }

.alert-pop {
  background: var(--card);
  border: 2px solid var(--line-strong);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(34, 53, 40, 0.25);
  max-width: 360px;
  width: 100%;
  padding: 24px 22px 20px;
  text-align: center;
  position: relative;
  transform: translateY(10px) scale(0.97);
  transition: transform 0.2s ease;
}

.alert-mask.show .alert-pop { transform: none; }

.alert-pop .alert-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
}

.alert-pop .alert-msg {
  font-size: 15px;
  color: var(--ink);
  margin: 8px 0 18px;
  line-height: 1.7;
  word-break: break-all;
}

.spinner {
  width: 34px; height: 34px;
  border: 3px solid var(--line);
  border-top-color: var(--forest);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 30px auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

.form-error {
  background: var(--terracotta-light);
  border: 1.5px solid var(--terracotta);
  color: var(--terracotta-deep);
  border-radius: 12px;
  padding: 11px 15px;
  font-size: 14px;
  margin-bottom: 16px;
}
.form-error:empty { display: none; }

/* ---------- 移动端全屏深度适配 ---------- */
@media (max-width: 768px) {
  .site-header {
    flex-wrap: wrap;
    padding: 16px 16px 10px;
    gap: 12px;
  }
  .brand {
    font-size: 20px;
  }
  .brand img {
    width: 38px;
    height: 38px;
  }
  .header-controls {
    margin-left: auto;
  }
  .nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .bowl-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 640px) {
  main {
    padding: 0 14px 60px;
  }
  .hero {
    padding: 20px 0 16px;
  }
  .hero-bowl {
    width: 130px;
  }
  .hero h1 {
    font-size: 26px;
    line-height: 1.35;
  }
  .hero .sub {
    font-size: 14px;
    padding: 0 8px;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    margin: 18px auto 0;
    gap: 10px;
  }
  .hero-actions .btn {
    width: 100%;
  }

  .card-panel,
  .detail-card {
    padding: 20px 14px;
    border-radius: 14px;
  }

  .detail-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
  }
  .detail-bowl-img {
    width: 88px;
    height: 88px;
  }
  .detail-amount {
    font-size: 15px;
  }
  .detail-actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }
  .detail-actions .btn {
    width: 100%;
  }

  .link-inputs {
    flex-direction: column;
    gap: 8px;
  }
  .link-title-input,
  .link-url-input {
    width: 100% !important;
  }

  .project-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .video-embed-item {
    aspect-ratio: 16/9;
  }

  .modal-panel {
    padding: 22px 16px;
    max-width: 95vw;
    max-height: 88vh;
    border-radius: 16px;
  }
  .modal-tabs {
    flex-wrap: wrap;
    gap: 6px;
  }
  .modal-tab {
    flex: 1 1 calc(50% - 6px);
    text-align: center;
    padding: 8px 10px;
    font-size: 13px;
  }

  /* 触控优化：保证至少 44px 高度 */
  .btn,
  .btn-sm,
  .btn-lg,
  input[type="text"],
  input[type="number"],
  input[type="date"],
  input[type="password"],
  select,
  .theme-select,
  .btn-lang {
    min-height: 44px;
    font-size: 15px;
  }

  .theme-select {
    padding-right: 28px;
    font-size: 13px;
  }
  .btn-lang {
    font-size: 13px;
    padding: 8px 12px;
  }

  .feed-item {
    padding: 12px 14px;
  }
  .feed-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .feed-amt {
    align-self: flex-start;
  }
}

@media (max-width: 400px) {
  .brand {
    font-size: 18px;
  }
  .brand small {
    display: none;
  }
  .project-gallery-grid {
    grid-template-columns: 1fr;
  }
}
