:root {
  --bg: #0a0a10;
  --bg2: #13131c;
  --bg3: #1b1b27;
  --text: #f3f3f8;
  --hint: #8a8aa0;
  --line: rgba(255,255,255,.07);
  --line2: rgba(255,255,255,.12);
  --a1: #8b5cf6; --a2: #ec4899;
  --grad: linear-gradient(135deg, var(--a1), var(--a2));
  --ok: #34d399; --err: #fb7185; --warn: #fbbf24;
  --r: 18px; --r-s: 12px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); min-height: 100%;
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif; }
body { overflow-x: hidden; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hidden { display: none !important; }
.hint { color: var(--hint); font-size: 12px; } .center { text-align: center; }

/* 背景光斑 */
.glow { position: fixed; border-radius: 50%; filter: blur(90px); opacity: .28; pointer-events: none; z-index: 0; }
.glow-a { width: 320px; height: 320px; background: var(--a1); top: -120px; right: -80px; }
.glow-b { width: 280px; height: 280px; background: var(--a2); bottom: 10%; left: -120px; opacity: .18; }

/* 顶栏 */
.topbar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center;
  padding: calc(10px + env(safe-area-inset-top)) 18px 10px;
  background: rgba(10,10,16,.72); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16px; letter-spacing: .2px; }
.logo { display: inline-flex; width: 30px; height: 30px; border-radius: 10px; background: var(--grad); align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(139,92,246,.45); }
.logo svg { width: 18px; height: 18px; fill: #fff; stroke: none; }
.credits { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 6px 12px 6px 9px; border-radius: 99px;
  background: var(--bg3); border: 1px solid var(--line2); }
.credits svg { width: 17px; height: 17px; color: var(--warn); }
.credits b { font-weight: 700; font-variant-numeric: tabular-nums; }

main { position: relative; z-index: 1; padding: 16px 16px calc(90px + env(safe-area-inset-bottom)); max-width: 640px; margin: 0 auto; }
.page { display: none; animation: fade .22s ease; } .page.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-title { font-size: 20px; font-weight: 800; margin: 4px 0 14px; letter-spacing: .2px; }

/* 卡片 */
.card { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 12px; }
.field-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-weight: 600; font-size: 14px; }
.count { font-size: 12px; color: var(--hint); font-variant-numeric: tabular-nums; }

/* 上传区 */
.upload-wrap { position: relative; margin-bottom: 10px; }
.upload { display: block; border-radius: var(--r); overflow: hidden; cursor: pointer; position: relative;
  background: linear-gradient(var(--bg2), var(--bg2)) padding-box, linear-gradient(135deg, rgba(139,92,246,.6), rgba(236,72,153,.35)) border-box;
  border: 1.5px dashed transparent; }
.upload-empty { height: 136px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--hint); }
.upload-icon { display: inline-flex; width: 44px; height: 44px; border-radius: 14px; background: rgba(139,92,246,.14); align-items: center; justify-content: center; margin-bottom: 4px; }
.upload-icon svg { width: 22px; height: 22px; color: var(--a1); }
.upload-title { color: var(--text); font-weight: 600; font-size: 14px; }
.upload-title em { font-style: normal; color: var(--hint); font-weight: 500; font-size: 12px; margin-left: 4px; }
.upload-sub { font-size: 12px; }
.upload img { width: 100%; max-height: 300px; object-fit: contain; display: block; background: #000; }
.remove-img { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.6); backdrop-filter: blur(6px); color: #fff; border: 1px solid rgba(255,255,255,.15); }
.remove-img svg { width: 16px; height: 16px; }
.route-tip { font-size: 12.5px; color: var(--hint); margin: 0 4px 14px; min-height: 18px; display: flex; align-items: center; gap: 6px; }
.route-tip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--grad); flex: none; }

/* 描述 */
.prompt-card textarea { width: 100%; resize: none; padding: 0; border: 0; background: transparent; color: var(--text);
  font: inherit; font-size: 15px; line-height: 1.6; outline: none; min-height: 96px; }
textarea::placeholder { color: #5e5e74; }
.chips { display: flex; gap: 8px; overflow-x: auto; margin-top: 10px; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; font-size: 12px; padding: 6px 11px; border-radius: 99px; background: var(--bg3); color: var(--hint); border: 1px solid var(--line); transition: .15s; }
.chips button:active { color: var(--text); border-color: var(--a1); }

/* 比例 */
.aspects { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.aspects button { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 10px 2px 8px; border-radius: var(--r-s);
  background: var(--bg3); border: 1.5px solid transparent; font-size: 11.5px; font-weight: 600; color: var(--hint); transition: .15s; }
.aspects button i { display: block; border: 1.5px solid currentColor; border-radius: 3px; opacity: .8; }
.aspects button.on { border-color: var(--a1); color: var(--text); background: rgba(139,92,246,.12); }
.aspects button.on i { border-color: var(--a1); background: rgba(139,92,246,.25); opacity: 1; }
.aspects button i.auto { border-style: dashed; }

/* 开关 */
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; }
.switch-text { display: flex; flex-direction: column; }
.switch-title { font-weight: 600; font-size: 14px; }
.switch-sub { font-size: 12px; color: var(--hint); }
.switch-row input { display: none; }
.switch { flex: none; width: 46px; height: 27px; border-radius: 99px; background: #2a2a38; position: relative; transition: .2s; border: 1px solid var(--line2); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.switch-row input:checked + .switch { background: var(--grad); border-color: transparent; }
.switch-row input:checked + .switch::after { left: 22px; }

/* 主按钮 */
.primary { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 15px; border-radius: var(--r);
  background: var(--grad); color: #fff; font-weight: 700; font-size: 16px; margin-top: 6px; position: relative; overflow: hidden;
  box-shadow: 0 10px 26px rgba(139,92,246,.35); transition: transform .12s, opacity .2s; }
.primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.22) 50%, transparent 70%);
  transform: translateX(-100%); animation: shine 3.2s ease-in-out infinite; }
@keyframes shine { 0%, 60% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.primary:active { transform: scale(.985); }
.primary:disabled { opacity: .55; box-shadow: none; }
.primary svg { width: 18px; height: 18px; fill: #fff; stroke: none; }
.primary .pill { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: rgba(0,0,0,.22); margin-left: 2px; }
.ghost { display: inline-flex; align-items: center; justify-content: center; padding: 9px 16px; border-radius: var(--r-s); border: 1px solid var(--line2);
  color: var(--text); font-weight: 600; font-size: 13px; background: var(--bg3); }
#provider-hint { margin: 12px 0 0; }

/* 作品网格 */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { position: relative; border-radius: 14px; overflow: hidden; background: var(--bg2); border: 1px solid var(--line); cursor: pointer; aspect-ratio: 3/4; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .tile-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 9px; font-size: 11.5px; line-height: 1.4; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.75)); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile .badge { position: absolute; top: 8px; left: 8px; font-size: 10.5px; padding: 3px 8px; border-radius: 99px; font-weight: 600; backdrop-filter: blur(6px); }
.badge.running, .badge.queued { background: rgba(251,191,36,.18); color: var(--warn); }
.badge.failed { background: rgba(251,113,133,.2); color: var(--err); }
.tile-del { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.55); backdrop-filter: blur(6px); color: #fff; border: 1px solid rgba(255,255,255,.14); }
.tile-del svg { width: 15px; height: 15px; }
.ghost.danger { flex: 0 0 48px !important; color: var(--err); border-color: rgba(251,113,133,.35); }
.ghost.danger svg { width: 18px; height: 18px; }
.tile-pending { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 14px; text-align: center;
  background: radial-gradient(circle at 50% 30%, rgba(139,92,246,.18), transparent 60%), var(--bg2); }
.tile-pending .pct { font-size: 22px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tile-pending .bar { width: 70%; height: 4px; border-radius: 99px; background: var(--line2); overflow: hidden; }
.tile-pending .bar i { display: block; height: 100%; background: var(--grad); transition: width .4s; }
.tile-pending .msg { font-size: 11.5px; color: var(--hint); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tile-failed { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 14px; text-align: center; color: var(--err); font-size: 12px; background: var(--bg2); }
.tile-failed svg { width: 26px; height: 26px; }
.empty { text-align: center; color: var(--hint); padding: 70px 0 40px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty svg { width: 46px; height: 46px; color: #3a3a4c; stroke-width: 1.4; }
.empty p { margin: 0 0 4px; }

/* 我的 */
.profile { display: flex; align-items: center; gap: 14px; margin: 6px 0 18px; }
.avatar-ring { padding: 3px; border-radius: 50%; background: var(--grad); }
.avatar { width: 58px; height: 58px; border-radius: 50%; background: var(--bg3); border: 3px solid var(--bg); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.name { font-size: 19px; font-weight: 800; }
.credit-card { position: relative; overflow: hidden; border-radius: 22px; padding: 20px; margin-bottom: 12px; color: #fff;
  background: linear-gradient(135deg, #6d3df0 0%, #b03fd1 55%, #ec4899 100%); box-shadow: var(--shadow); }
.credit-card::before { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.12); top: -120px; right: -60px; }
.credit-label { font-size: 12.5px; opacity: .85; }
.credit-big { font-size: 44px; font-weight: 800; line-height: 1.15; margin: 4px 0 10px; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.credit-foot { display: flex; justify-content: space-between; align-items: center; font-size: 13px; opacity: .95; }
.buy { padding: 8px 16px; border-radius: 99px; background: #fff; color: #7c3aed; font-weight: 700; font-size: 13px; }
.list .row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }

/* 底栏 */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: grid; grid-template-columns: repeat(3, 1fr);
  background: rgba(10,10,16,.78); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-top: 1px solid var(--line);
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); }
.tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: #5f5f74; padding: 4px; transition: color .15s; }
.tabbar svg { width: 23px; height: 23px; }
.tabbar button.on { color: var(--text); }
.tabbar button.on svg { color: var(--a1); fill: rgba(139,92,246,.22); }

/* 大图 */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(6,6,10,.985); display: flex; flex-direction: column; animation: fade .18s ease; }
.lb-close { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 14px; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.1); color: #fff; z-index: 2; }
.lb-close svg { width: 18px; height: 18px; }
.lb-media { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: calc(56px + env(safe-area-inset-top)) 12px 12px; }
.lb-media img { max-width: 100%; max-height: 100%; border-radius: 12px; object-fit: contain; }
.lb-info { padding: 12px 18px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg); max-height: 42vh; overflow-y: auto; }
.lb-prompt { font-size: 14px; line-height: 1.55; }
.lb-final { font-size: 12px; color: var(--hint); margin-top: 8px; line-height: 1.5; }
.lb-final b { color: var(--a1); font-weight: 600; }
.lb-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.lb-meta span { font-size: 11.5px; padding: 3px 9px; border-radius: 99px; background: var(--bg3); color: var(--hint); border: 1px solid var(--line); }
.lb-actions { display: flex; gap: 10px; margin-top: 14px; }
.lb-actions .ghost { flex: 1; }

.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
  background: rgba(28,28,39,.95); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 13.5px; max-width: 82%; text-align: center;
  border: 1px solid var(--line2); box-shadow: var(--shadow); backdrop-filter: blur(10px); }

/* ================= 3D 立体主题（叠加层，删掉这一段即恢复原样） ================= */
:root {
  --hi: inset 0 1px 0 rgba(255,255,255,.10);            /* 顶部高光 */
  --lo: inset 0 -2px 0 rgba(0,0,0,.35);                  /* 底部暗边 */
  --lift: 0 2px 0 #07070b, 0 12px 24px rgba(0,0,0,.50);  /* 浮起投影 */
  --well: inset 0 2px 6px rgba(0,0,0,.60), inset 0 -1px 0 rgba(255,255,255,.05); /* 凹槽 */
}

/* 窗口 / 卡片：凸起的面板 */
.card { background: linear-gradient(180deg, #1c1c29 0%, #12121a 100%); border-color: rgba(255,255,255,.09);
  box-shadow: var(--hi), var(--lo), var(--lift); }
.upload { box-shadow: var(--hi), var(--lift); }
.upload-icon { background: linear-gradient(180deg, rgba(139,92,246,.30), rgba(139,92,246,.10));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 3px 0 rgba(60,30,130,.55), 0 8px 14px rgba(0,0,0,.4); }

/* 输入区：凹进去的槽 */
.prompt-card textarea { background: #0b0b11; border-radius: var(--r-s); padding: 12px; box-shadow: var(--well); }

/* 顶栏 / 底栏：悬浮的厚板 */
.topbar { box-shadow: inset 0 -1px 0 rgba(255,255,255,.05), 0 8px 20px rgba(0,0,0,.45); }
.tabbar { box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 -10px 24px rgba(0,0,0,.5); }
.logo { box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 -2px 0 rgba(0,0,0,.25), 0 3px 0 #4c1d95, 0 8px 16px rgba(139,92,246,.45); }

/* 通用小按钮：有厚度，按下去会沉 */
.credits, .chips button, .aspects button, .ghost, .lb-meta span {
  background: linear-gradient(180deg, #262636 0%, #191923 100%);
  box-shadow: var(--hi), 0 3px 0 #08080d, 0 6px 12px rgba(0,0,0,.40);
  transition: transform .08s, box-shadow .08s, color .15s, border-color .15s; }
.credits:active, .chips button:active, .aspects button:active, .ghost:active {
  transform: translateY(3px); box-shadow: var(--hi), 0 0 0 #08080d, 0 2px 4px rgba(0,0,0,.4); }
.chips { padding-bottom: 8px; }
.aspects { padding-bottom: 4px; }
.lb-meta span { box-shadow: var(--hi), 0 2px 0 #08080d; }

/* 比例：选中 = 按下并发光 */
.aspects button.on { background: linear-gradient(180deg, rgba(139,92,246,.10), rgba(139,92,246,.24)); transform: translateY(2px);
  box-shadow: inset 0 2px 5px rgba(0,0,0,.55), 0 1px 0 #08080d, 0 0 14px rgba(139,92,246,.35); }

/* 开关：凹槽 + 凸起圆钮 */
.switch { background: #101018; box-shadow: var(--well); }
.switch::after { background: linear-gradient(180deg, #ffffff, #cfcfe0);
  box-shadow: 0 2px 0 #8d8da6, 0 4px 8px rgba(0,0,0,.55), inset 0 1px 0 #fff; }
.switch-row input:checked + .switch { box-shadow: inset 0 2px 5px rgba(0,0,0,.35), 0 0 12px rgba(236,72,153,.35); }

/* 主按钮：原来的样子，只留一点点厚度 */
.primary { box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 2px 0 rgba(76,29,149,.8), 0 10px 26px rgba(139,92,246,.35);
  transition: transform .08s, box-shadow .08s, opacity .2s; }
.primary:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 0 0 rgba(76,29,149,.8), 0 5px 14px rgba(139,92,246,.3); }
.primary:disabled { box-shadow: none; }

/* 作品卡片 */
.tile { box-shadow: 0 3px 0 #07070b, 0 12px 22px rgba(0,0,0,.5); transition: transform .08s, box-shadow .08s; }
.tile::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), inset 0 -2px 0 rgba(0,0,0,.4); }
.tile:active { transform: translateY(2px); box-shadow: 0 1px 0 #07070b, 0 5px 10px rgba(0,0,0,.5); }
.remove-img, .tile-del, .lb-close { box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 2px 0 rgba(0,0,0,.6), 0 5px 10px rgba(0,0,0,.45); transition: transform .08s; }
.remove-img:active, .tile-del:active, .lb-close:active { transform: translateY(2px); }
.tile-pending .bar { height: 6px; box-shadow: var(--well); }

/* 我的 */
.avatar-ring { box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 4px 0 #4c1d95, 0 12px 20px rgba(0,0,0,.5); }
.credit-card { box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -3px 0 rgba(0,0,0,.22), 0 6px 0 #4c1d95, 0 20px 34px rgba(109,61,240,.35); margin-bottom: 20px; }
.credit-big { text-shadow: 0 2px 0 rgba(0,0,0,.22), 0 6px 14px rgba(0,0,0,.25); }
.buy { background: linear-gradient(180deg, #ffffff, #e6e0fa); box-shadow: inset 0 1px 0 #fff, 0 3px 0 #b9a6ee, 0 8px 14px rgba(0,0,0,.25); transition: transform .08s, box-shadow .08s; }
.buy:active { transform: translateY(3px); box-shadow: inset 0 1px 0 #fff, 0 0 0 #b9a6ee; }

/* 底栏选中项：凸起的小键帽 */
.tabbar button { margin: 0 10px; border-radius: 14px; transition: color .15s, transform .08s; }
.tabbar button.on { background: linear-gradient(180deg, #232332, #171720); box-shadow: var(--hi), 0 3px 0 #06060a, 0 8px 14px rgba(0,0,0,.45); }
.tabbar button:active { transform: translateY(2px); }
.tabbar button.on svg { filter: drop-shadow(0 2px 6px rgba(139,92,246,.6)); }

/* 大图窗口 / 提示条 */
.lb-media img { box-shadow: 0 4px 0 #050508, 0 22px 44px rgba(0,0,0,.7); }
.lb-info { background: linear-gradient(180deg, #181822, #0d0d14); box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 -12px 28px rgba(0,0,0,.55); }
.lb-actions { padding-bottom: 4px; }
.toast { background: linear-gradient(180deg, #2a2a3a, #1a1a25); box-shadow: var(--hi), 0 3px 0 #07070b, 0 14px 26px rgba(0,0,0,.55); }

/* ================= 创作页顶部一行（参考桌面版：标志 + 暗色/明亮 + 积分） ================= */
body:has(#page-create.active) .topbar { display: none; }
body:has(#page-create.active) main { padding-top: calc(12px + env(safe-area-inset-top)); }
.zk-top { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.zk-brand { display: inline-flex; align-items: center; gap: 8px; margin-inline-end: auto; }
.zk-logo { display: block; flex: none; width: 36px; height: 36px; background: var(--grad);
  -webkit-mask: url("zaka-logo.webp") center / contain no-repeat; mask: url("zaka-logo.webp") center / contain no-repeat; }
.zk-brand b { font-family: "Didot", "Bodoni 72", "Playfair Display", "Noto Serif Display", "Noto Serif", Georgia, "Songti SC", serif;
  font-weight: 600; font-size: 23px; letter-spacing: .6px;
  background: linear-gradient(180deg, #ffffff 0%, #b9bcc8 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.zk-seg { display: inline-flex; padding: 3px; border-radius: 19px; background: #0f0f16; box-shadow: var(--well); }
.zk-seg button { height: 30px; padding: 0 13px; border-radius: 15px; font-size: 13px; color: var(--hint); letter-spacing: .5px; }
.zk-seg button.on { background: linear-gradient(180deg, #34344a, #22222f); color: #fff; font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 2px 4px rgba(0,0,0,.6); }
.zk-lang { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 13px 0 10px; border-radius: 18px; font-size: 13.5px;
  color: var(--text); border: 1px solid var(--line2); background: linear-gradient(180deg, #262636, #191923);
  box-shadow: var(--hi), 0 3px 0 #08080d, 0 6px 12px rgba(0,0,0,.4); transition: transform .08s, box-shadow .08s; }
.zk-lang:active { transform: translateY(3px); box-shadow: var(--hi), 0 0 0 #08080d; }
.zk-lang svg { width: 17px; height: 17px; color: var(--warn); }
.zk-lang b { font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 360px) { .zk-brand b { font-size: 19px; } .zk-logo { width: 30px; height: 30px; } .zk-seg button { padding: 0 10px; } .zk-lang { padding: 0 10px 0 8px; } }

/* ================= 明亮主题（米白 + 香槟金，配色取自桌面版） ================= */
html.light { --bg: #f1ece2; --bg2: #fdfcf9; --bg3: #e4ddcf; --text: #1b1815; --hint: #7f776b;
  --line: #ddd5c6; --line2: #c9c0ae; --a1: #a67c24; --a2: #dcb968;
  --grad: linear-gradient(180deg, #f8e7b6 0%, #e2c175 42%, #b9933f 58%, #cfab57 100%);
  --ok: #3f8a63; --err: #b9503f; --warn: #a67c24; --shadow: 0 14px 34px rgba(70,56,30,.18);
  --hi: inset 0 1px 0 #ffffff; --lo: inset 0 -1px 0 rgba(120,104,76,.18);
  --lift: 0 2px 0 #bfb5a2, 0 10px 22px rgba(70,56,30,.14);
  --well: inset 0 2px 5px rgba(70,56,30,.22), inset 0 0 0 1px rgba(70,56,30,.05), 0 1px 0 #ffffff; }
html.light, html.light body { background: #f1ece2; }
html.light .glow { display: none; }
html.light .topbar { background: rgba(241,236,226,.85); box-shadow: 0 6px 16px rgba(70,56,30,.10); }
html.light .tabbar { background: rgba(253,252,249,.92); box-shadow: inset 0 1px 0 #fff, 0 -8px 20px rgba(70,56,30,.12); }
html.light .logo { box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 2px 0 #8c6518, 0 6px 12px rgba(166,124,36,.3); }
html.light .zk-logo { background: linear-gradient(180deg, #c99a3a, #8c6518); }
html.light .zk-brand b { background: linear-gradient(180deg, #2a2520, #4a4038); -webkit-background-clip: text; background-clip: text; color: transparent; }
html.light .zk-seg, html.light .switch { background: #e4ddcf; }
html.light .zk-seg button.on { background: linear-gradient(180deg, #ffffff, #efeadf); color: var(--text); box-shadow: inset 0 1px 0 #fff, 0 2px 4px rgba(70,56,30,.28); }
html.light .card { background: linear-gradient(180deg, #ffffff 0%, #fbf9f4 45%, #f2eee5 100%); border-color: var(--line2); }
html.light .upload { background: linear-gradient(#fdfcf9, #f6f2ea) padding-box, linear-gradient(135deg, #c2a25a, #dcb968) border-box; }
html.light .upload-icon { background: linear-gradient(180deg, #fbf3dc, #ecdcae); box-shadow: inset 0 1px 0 #fff, 0 2px 0 #b9933f, 0 6px 10px rgba(70,56,30,.15); }
html.light .upload img { background: #e4ddcf; }
html.light .prompt-card textarea { background: #f4f0e7; }
html.light textarea::placeholder { color: #a79f92; }
html.light .credits, html.light .zk-lang, html.light .chips button, html.light .aspects button, html.light .ghost, html.light .lb-meta span {
  background: linear-gradient(180deg, #ffffff, #f0ebe0); border-color: var(--line2);
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 #b9af9b, 0 5px 10px rgba(70,56,30,.14); }
html.light .credits:active, html.light .zk-lang:active, html.light .chips button:active, html.light .aspects button:active, html.light .ghost:active {
  box-shadow: inset 0 1px 0 #fff, 0 0 0 #b9af9b; }
html.light .aspects button.on { background: linear-gradient(180deg, #f3e6c2, #ead59b); border-color: var(--a1);
  box-shadow: inset 0 2px 4px rgba(120,90,20,.25), 0 1px 0 #fff; }
html.light .aspects button.on i { background: rgba(166,124,36,.2); }
html.light .switch-row input:checked + .switch { box-shadow: inset 0 2px 4px rgba(120,90,20,.3); }
html.light .primary { color: #2a1f08; text-shadow: 0 1px 0 rgba(255,255,255,.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 2px 0 #8c6518, 0 10px 22px rgba(166,124,36,.3); }
html.light .primary svg { fill: #2a1f08; }
html.light .primary .pill { background: rgba(60,40,0,.14); box-shadow: none; }
html.light .tile { box-shadow: 0 2px 0 #bfb5a2, 0 10px 20px rgba(70,56,30,.16); }
html.light .tile-pending { background: radial-gradient(circle at 50% 30%, rgba(166,124,36,.14), transparent 60%), var(--bg2); }
html.light .empty svg { color: #c9c0ae; }
html.light .avatar { color: var(--text); }
html.light .avatar-ring { box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 3px 0 #8c6518, 0 10px 18px rgba(70,56,30,.2); }
html.light .credit-card { color: #2a1f08; background: linear-gradient(135deg, #f8e7b6 0%, #dcb968 55%, #b9933f 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 4px 0 #8c6518, 0 18px 30px rgba(166,124,36,.28); }
html.light .credit-big { text-shadow: 0 1px 0 rgba(255,255,255,.4); }
html.light .buy { color: #8c6518; box-shadow: inset 0 1px 0 #fff, 0 3px 0 #b9933f; }
html.light .tabbar button { color: #a79f92; }
html.light .tabbar button.on { color: var(--text); background: linear-gradient(180deg, #ffffff, #efeadf); box-shadow: inset 0 1px 0 #fff, 0 2px 0 #b9af9b, 0 6px 10px rgba(70,56,30,.14); }
html.light .tabbar button.on svg { fill: rgba(166,124,36,.2); filter: none; }
html.light .lightbox { background: rgba(241,236,226,.985); }
html.light .lb-close { background: rgba(60,40,10,.55); }
html.light .lb-media img { box-shadow: 0 3px 0 #bfb5a2, 0 20px 40px rgba(70,56,30,.3); }
html.light .lb-info { background: linear-gradient(180deg, #ffffff, #f2eee5); box-shadow: inset 0 1px 0 #fff, 0 -10px 24px rgba(70,56,30,.14); }
html.light .toast { background: linear-gradient(180deg, #33302b, #1f1c18); box-shadow: 0 10px 22px rgba(70,56,30,.3); }

/* 语言按钮 + 语言选择面板 */
.zk-lang { padding: 0 13px; }
.zk-lang svg { width: 16px; height: 16px; color: var(--a1); }
.zk-sheet { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s ease; }
.zk-sheet-box { width: 100%; max-width: 640px; color: var(--text); border-radius: 26px 26px 0 0; padding: 18px 14px calc(18px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #1c1c29, #12121a); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 -14px 34px rgba(0,0,0,.6); }
.zk-sheet-box h3 { margin: 0 4px 10px; font-size: 16px; }
.zk-sheet-box button { display: flex; width: 100%; justify-content: space-between; align-items: center; height: 48px; padding: 0 14px; border-radius: 14px; font-size: 15px; }
.zk-sheet-box button.on { background: var(--bg3); font-weight: 700; box-shadow: var(--well); }
.zk-sheet-box button i { font-style: normal; color: var(--a1); font-weight: 800; }
html.light .zk-sheet { background: rgba(60,45,20,.35); }
html.light .zk-sheet-box { background: linear-gradient(180deg, #ffffff, #f2eee5); box-shadow: inset 0 1px 0 #fff, 0 -12px 28px rgba(70,56,30,.2); }
html.light .zk-lang svg { color: var(--a1); }

/* ================= 创作页压紧：首屏不用下滑就能看到“生成”按钮 ================= */
#page-create .zk-top { margin-bottom: 10px; }
/* 上传区：改成横排（图标在左、文字在右），高度 136 → 76 */
#page-create .upload-wrap { margin-bottom: 8px; }
#page-create .upload-empty { height: 76px; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 0 16px;
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-content: center; column-gap: 12px; row-gap: 1px; }
#page-create .upload-empty.hidden { display: none; }
#page-create .upload-icon { grid-row: 1 / 3; width: 40px; height: 40px; border-radius: 13px; margin: 0; }
#page-create .upload-icon svg { width: 20px; height: 20px; }
#page-create .upload-title, #page-create .upload-sub { text-align: start; }
#page-create .upload img { max-height: 190px; }
#page-create .route-tip { margin: 0 4px 10px; font-size: 12px; }
/* 卡片间距、内边距收一点 */
#page-create .card { padding: 12px 14px; margin-bottom: 10px; }
#page-create .field-head { margin-bottom: 8px; }
/* 描述框：默认 2 行，字多了自动长高 */
#page-create .prompt-card textarea { min-height: 68px; padding: 10px 12px; line-height: 1.5; }
#page-create .chips { margin-top: 8px; padding-bottom: 6px; }
#page-create .chips button { padding: 5px 11px; }
#page-create .aspects button { padding: 8px 2px 7px; gap: 5px; }
#page-create .primary { padding: 14px; margin-top: 4px; }
#page-create #provider-hint { margin: 8px 0 0; }
#page-create #provider-hint:empty { display: none; }
main { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
/* 矮屏手机再收一档 */
@media (max-height: 640px) {
  #page-create .upload-empty { height: 62px; }
  #page-create .upload-sub { display: none; }
  #page-create .upload-icon { grid-row: 1; width: 34px; height: 34px; }
  #page-create .prompt-card textarea { min-height: 52px; }
  #page-create .card { padding: 10px 14px; margin-bottom: 8px; }
  #page-create .route-tip { margin-bottom: 8px; }
}
#page-create .prompt-card textarea { height: 68px; }
@media (max-height: 660px) {
  #page-create .route-tip { display: none; }
  #page-create .upload-wrap { margin-bottom: 10px; }
  #page-create .aspects button { padding: 7px 2px 6px; }
}
@media (max-height: 640px) {
  #page-create .prompt-card textarea { height: 68px; min-height: 68px; }
  #page-create .upload-empty { height: 56px; }
  #page-create .chips { margin-top: 6px; padding-bottom: 5px; }
  #page-create .field-head { margin-bottom: 6px; }
  #page-create .primary { padding: 12px; margin-top: 2px; }
  #page-create .zk-top { margin-bottom: 8px; }
  body:has(#page-create.active) main { padding-top: calc(8px + env(safe-area-inset-top)); }
}
/* 特别矮的屏（小屏 iPhone）：示例词收起，描述框再矮一点 */
@media (max-height: 590px) {
  #page-create .chips { display: none; }
  #page-create .prompt-card textarea { height: 56px; min-height: 56px; }
}

/* “我的”页：免责声明 */
.disclaimer { padding: 14px 16px; }
.dis-title { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.dis-title svg { width: 17px; height: 17px; color: var(--warn); flex: none; }
.disclaimer ol { margin: 0; padding-inline-start: 18px; color: var(--hint); font-size: 12.5px; line-height: 1.65; }
.disclaimer li { margin-bottom: 6px; } .disclaimer li:last-child { margin-bottom: 0; }
.disclaimer li::marker { color: var(--a1); font-weight: 700; }

/* 首次打开的使用须知弹窗 */
.terms { position: fixed; inset: 0; z-index: 65; display: flex; align-items: center; justify-content: center; padding: calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));
  background: rgba(4,4,8,.78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.terms-box { width: 100%; max-width: 460px; max-height: 100%; display: flex; flex-direction: column; border-radius: 22px; padding: 18px 16px 14px;
  background: linear-gradient(180deg, #1e1e2c, #12121a); border: 1px solid rgba(255,255,255,.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 4px 0 #07070b, 0 26px 50px rgba(0,0,0,.7); }
.terms-box .dis-title { font-size: 16px; margin-bottom: 10px; }
.terms-lang { margin-inline-start: auto; height: 28px; padding: 0 11px; border-radius: 14px; font-size: 12px; color: var(--hint); border: 1px solid var(--line2); }
.terms-list { flex: 1; min-height: 0; overflow-y: auto; margin: 0 0 14px; padding-inline-start: 20px; color: var(--text); opacity: .86; font-size: 13px; line-height: 1.65; -webkit-overflow-scrolling: touch; }
.terms-list li { margin-bottom: 7px; } .terms-list li::marker { color: var(--a1); font-weight: 700; }
.terms-box .primary { margin: 0; flex: none; font-size: 15px; padding: 14px 10px; }
.terms-no { flex: none; margin-top: 8px; padding: 8px; font-size: 13px; color: var(--hint); }
html.light .terms { background: rgba(60,45,20,.45); }
html.light .terms-box { background: linear-gradient(180deg, #ffffff, #f2eee5); border-color: var(--line2); box-shadow: inset 0 1px 0 #fff, 0 3px 0 #bfb5a2, 0 24px 44px rgba(70,56,30,.3); }

/* 须知里的红线那一条 */
.disclaimer li.red, .terms-list li.red { color: var(--err); font-weight: 600; opacity: 1; }
.disclaimer li.red::marker, .terms-list li.red::marker { color: var(--err); }

/* “我的”页：邀请好友 */
.invite { padding: 14px 16px; }
.inv-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.inv-icon { flex: none; display: inline-flex; width: 42px; height: 42px; border-radius: 14px; align-items: center; justify-content: center; color: #fff;
  background: var(--grad); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 3px 0 rgba(0,0,0,.35), 0 8px 14px rgba(0,0,0,.35); }
.inv-icon svg { width: 22px; height: 22px; }
.inv-title { font-weight: 700; font-size: 15px; } .inv-sub { font-size: 12.5px; color: var(--hint); }
.inv-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; padding: 10px 4px; border-radius: var(--r-s); background: #0b0b11; box-shadow: var(--well); text-align: center; }
.inv-stats b { display: block; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; }
.inv-stats span { font-size: 11.5px; color: var(--hint); }
.inv-acts { display: flex; gap: 10px; padding-bottom: 4px; } .inv-acts .ghost { flex: 1; padding: 10px 8px; }
.inv-acts .ghost.pri { background: var(--grad); color: #fff; border-color: transparent; box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 3px 0 rgba(76,29,149,.85), 0 6px 12px rgba(0,0,0,.35); }
.inv-rule { margin: 10px 0 0; font-size: 12px; line-height: 1.6; color: var(--hint); }
.inv-rule a { color: var(--a1); font-weight: 600; }
html.light .inv-stats { background: #f4f0e7; }
html.light .inv-icon, html.light .inv-acts .ghost.pri { color: #2a1f08; }
html.light .inv-acts .ghost.pri { background: var(--grad); box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 2px 0 #8c6518, 0 6px 12px rgba(166,124,36,.25); }

/* 首次弹窗只显示红线一条 */
.terms-one { margin: 2px 0 16px; color: var(--err); font-weight: 600; font-size: 14.5px; line-height: 1.7; }

/* USDT 充值面板 */
.zk-sheet-box .pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 12px; }
.zk-sheet-box .pay-grid button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; height: auto; padding: 14px 6px 12px; border-radius: 16px;
  border: 1px solid var(--line2); background: linear-gradient(180deg, #262636, #191923); box-shadow: var(--hi), 0 3px 0 #08080d, 0 6px 12px rgba(0,0,0,.4); transition: transform .08s, box-shadow .08s; }
.zk-sheet-box .pay-grid button:active { transform: translateY(3px); box-shadow: var(--hi), 0 0 0 #08080d; }
.pay-grid b { font-size: 26px; font-weight: 800; line-height: 1.1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pay-grid span { font-size: 11.5px; color: var(--hint); }
.pay-grid em { font-style: normal; margin-top: 8px; font-size: 13px; font-weight: 700; padding: 3px 12px; border-radius: 99px; background: #0b0b11; box-shadow: var(--well); }
.pay-note { margin: 0 4px 6px; font-size: 12px; line-height: 1.6; color: var(--hint); }
.pay-amt { margin: 6px 4px 4px; font-size: 15px; font-weight: 600; } .pay-amt b { font-size: 30px; font-weight: 800; margin-inline-end: 4px; }
.pay-amt i { font-style: normal; font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--bg3); color: var(--hint); margin-inline-start: 4px; }
.pay-addr { display: flex; align-items: center; gap: 10px; margin: 8px 0 12px; padding: 12px; border-radius: var(--r-s); background: #0b0b11; box-shadow: var(--well); cursor: pointer; }
.pay-addr span { flex: 1; font: 13px/1.5 ui-monospace, Menlo, monospace; word-break: break-all; }
.pay-addr em { flex: none; font-style: normal; font-size: 12px; font-weight: 700; color: var(--a1); }
.pay-go { margin: 0 0 12px; }
.pay-wait { display: flex; align-items: center; gap: 8px; margin: 4px; font-size: 12.5px; color: var(--hint); }
.pay-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); animation: paypulse 1.2s ease-in-out infinite; }
@keyframes paypulse { 50% { opacity: .25; transform: scale(.7); } }
html.light .zk-sheet-box .pay-grid button { background: linear-gradient(180deg, #ffffff, #f0ebe0); box-shadow: inset 0 1px 0 #fff, 0 2px 0 #b9af9b, 0 5px 10px rgba(70,56,30,.14); }
html.light .pay-grid em, html.light .pay-addr { background: #f4f0e7; }
.zk-sheet-box .pay-grid button { position: relative; }
.pay-grid u { position: absolute; top: -7px; inset-inline-end: -4px; text-decoration: none; font-size: 11px; font-weight: 800; color: #fff; padding: 2px 8px; border-radius: 99px;
  background: linear-gradient(135deg, #fb7185, #f59e0b); box-shadow: 0 2px 0 rgba(0,0,0,.4), 0 4px 8px rgba(0,0,0,.35); }

/* 大图预览：保存按钮 */
.lb-actions { flex-wrap: wrap; }
.lb-actions .ghost { padding: 10px 8px; white-space: nowrap; }
.lb-actions .ghost.pri { gap: 6px; background: var(--grad); color: #fff; border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 3px 0 rgba(76,29,149,.85), 0 6px 12px rgba(0,0,0,.35); }
.lb-actions .ghost.pri svg { width: 16px; height: 16px; }
html.light .lb-actions .ghost.pri { color: #2a1f08; box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 2px 0 #8c6518, 0 6px 12px rgba(166,124,36,.25); }

/* 大图预览右上角的关闭按钮：不要立体感 */
.lb-close, .lb-close:active { box-shadow: none; transform: none; }

/* 作品卡片上的删除按钮：不要立体感 */
.tile-del, .tile-del:active { box-shadow: none; transform: none; }

/* 排队中的作品卡片：显示前面还有几人 */
.tile-pending .q-wait { font-size: 14px; font-weight: 700; color: var(--warn); line-height: 1.3; }

/* 描述框里的示例文字：固定三行（要素 / 镜头方位 / 例子），字号略小，68px 高的输入框刚好放下 */
#prompt::placeholder { font-size: 12px; line-height: 1.3; white-space: pre-line; }

/* 网页版：登录框 + "我的"页入口 */
.lg-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.lg-tabs button { flex: 1; height: 38px; border-radius: 12px; font-size: 14px; color: var(--hint); border: 1px solid var(--line2); }
.lg-tabs button.on { color: var(--text); border-color: var(--a1); font-weight: 600; }
.lg-input { width: 100%; box-sizing: border-box; height: 46px; margin-bottom: 10px; padding: 0 14px; border-radius: 12px; font-size: 16px;
  color: var(--text); background: rgba(127,127,127,.12); border: 1px solid var(--line2); outline: none; }
.lg-input:focus { border-color: var(--a1); }
.lg-hint { min-height: 18px; margin: 0 0 12px; font-size: 12px; line-height: 1.5; color: var(--hint); }
.web-card .inv-rule { margin: 6px 0 12px; }
.web-card .ghost { width: 100%; }
.web-card .inv-acts .ghost { width: auto; flex: 1; }
.web-card .web-acc { margin: 12px 0 8px; }
.zk-sheet-box .lg-input:disabled { opacity: .6; }
.zk-sheet-box .primary { width: 100%; margin: 0; }
