:root {
  /* 亮色商业主题：白底 + 蓝紫主色 + 玻璃卡面 */
  --bg: #ffffff;
  --bg-2: #f6f8fc;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-2: rgba(15, 23, 42, 0.04);
  --panel-solid: #ffffff;
  --line: rgba(15, 23, 42, 0.1);
  --line-strong: rgba(15, 23, 42, 0.18);
  --text: #0f172a;
  --muted: #5b6478;
  --dim: #8a93a6;
  --pink: #4f46e5;
  --violet: #7c3aed;
  --cyan: #0891b2;
  --accent: #4f46e5;
  --accent-2: #7c3aed;
  --ok: #16a34a;
  --warn: #b45309;
  --err: #dc2626;
  --radius: 16px;
  --glass: blur(22px) saturate(160%);
  --glass-soft: blur(14px) saturate(150%);
  --edge: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(15, 23, 42, 0.03);
  --shadow: 0 20px 48px rgba(15, 23, 42, 0.1), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 8px 22px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }

html { background: var(--bg); }

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

body {
  background:
    radial-gradient(1200px 760px at 50% -12%, #eef2ff 0%, rgba(238, 242, 255, 0) 62%),
    linear-gradient(180deg, #ffffff 0%, #fbfcfe 46%, #f7f9fc 100%);
  background-attachment: fixed;
}

/* 毛玻璃底衬：三团很淡的色斑，白卡透上去才有层次 */
body::before {
  content: "";
  position: fixed;
  inset: -20vh -10vw;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(46vw 34vw at 12% 6%, rgba(99, 102, 241, 0.16), transparent 62%),
    radial-gradient(42vw 32vw at 88% 2%, rgba(168, 85, 247, 0.13), transparent 62%),
    radial-gradient(50vw 40vw at 64% 94%, rgba(6, 182, 212, 0.12), transparent 66%),
    radial-gradient(40vw 30vw at 6% 96%, rgba(244, 114, 182, 0.1), transparent 64%);
  filter: blur(30px);
  animation: drift 26s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.7;
  background-image: linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px;
  mask-image: radial-gradient(70% 60% at 50% 26%, #000 26%, transparent 100%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 26%, #000 26%, transparent 100%);
}

@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(2%, -1.5%, 0) scale(1.04); }
  100% { transform: translate3d(-2%, 2%, 0) scale(1.02); }
}

@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
}

a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: rgba(79, 70, 229, 0.18); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.18);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(15, 23, 42, 0.3); background-clip: padding-box; }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 22px; position: relative; z-index: 1; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.68));
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.nav-in { display: flex; align-items: center; gap: 26px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.02em; font-size: 17px; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 9px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.nav-links { display: flex; gap: 4px; font-size: 14px; color: var(--muted); }
.nav-links a {
  padding: 6px 12px; border-radius: 999px; border: 1px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.nav-links a:hover { color: var(--text); background: rgba(15, 23, 42, 0.05); }
.nav-links a.active {
  color: var(--accent);
  background: rgba(79, 70, 229, 0.09);
  border-color: rgba(79, 70, 229, 0.2);
  box-shadow: none;
  font-weight: 600;
}
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  backdrop-filter: var(--glass-soft);
  -webkit-backdrop-filter: var(--glass-soft);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06), var(--edge);
  font-weight: 600; font-size: 14px; cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s, opacity 0.15s;
}
.btn:hover { background: #fff; border-color: rgba(15, 23, 42, 0.26); box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary {
  border: 1px solid rgba(255, 255, 255, 0.4); color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.26), transparent 46%),
    linear-gradient(135deg, #4f46e5, #7c3aed);
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn-primary:hover {
  filter: brightness(1.05);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.3), transparent 46%),
    linear-gradient(135deg, #4f46e5, #7c3aed);
  box-shadow: 0 16px 34px rgba(79, 70, 229, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.42);
}
.btn-ghost { background: rgba(255, 255, 255, 0.6); border-color: var(--line); color: var(--muted); box-shadow: none; }
.btn-ghost:hover { color: var(--text); background: #fff; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn-danger:hover { border-color: rgba(220, 38, 38, 0.4); color: var(--err); background: rgba(220, 38, 38, 0.06); }

/* ---------- cards / layout ---------- */
.card {
  position: relative;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.78));
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow), var(--edge);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
}
.section { padding: 54px 0; }
.section-title { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 8px; }
.section-sub { color: var(--muted); margin: 0 0 26px; font-size: 14px; }
.grid { display: grid; gap: 16px; }
.row { display: flex; gap: 12px; align-items: center; }
.spacer { flex: 1; }

/* ---------- studio ---------- */
.studio { display: grid; grid-template-columns: 372px 1fr; gap: 18px; align-items: start; padding: 22px 0 60px; }
@media (max-width: 980px) { .studio { grid-template-columns: 1fr; } }

[hidden] { display: none !important; }

.panel { padding: 18px; }
.panel:not(.card) {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.76));
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  backdrop-filter: var(--glass-soft);
  -webkit-backdrop-filter: var(--glass-soft);
  box-shadow: var(--shadow-sm), var(--edge);
}
.panel h3 { margin: 0 0 14px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); font-weight: 700; }

.tabs {
  display: flex; gap: 4px; padding: 4px; border-radius: 12px; margin-bottom: 16px;
  background: rgba(15, 23, 42, 0.05); border: 1px solid var(--line);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}
.tabs button {
  flex: 1; height: 32px; border: none; background: transparent; color: var(--muted);
  border-radius: 9px; cursor: pointer; font-size: 13px; font-weight: 600;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.tabs button:hover { color: var(--text); }
.tabs button.on {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12), var(--edge);
}

.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 12px; color: var(--dim); margin-bottom: 6px; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600; }
.input, .select, .textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 11px; padding: 10px 12px; outline: none;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.input::placeholder, .textarea::placeholder { color: #a8b0be; }
.input:hover, .select:hover, .textarea:hover { border-color: rgba(15, 23, 42, 0.28); }
.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(79, 70, 229, 0.65);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.14), inset 0 1px 2px rgba(15, 23, 42, 0.03);
}
.textarea { min-height: 104px; resize: vertical; line-height: 1.5; }
select.select option { background: #fff; color: var(--text); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 12px; border-radius: 999px; font-size: 12.5px;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.9);
  color: var(--muted); cursor: pointer;
  backdrop-filter: var(--glass-soft);
  -webkit-backdrop-filter: var(--glass-soft);
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}
.chip:hover { color: var(--text); border-color: rgba(15, 23, 42, 0.3); }
.chip.on {
  border-color: rgba(79, 70, 229, 0.55); color: #4f46e5;
  background: linear-gradient(180deg, rgba(79, 70, 229, 0.14), rgba(79, 70, 229, 0.07));
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  font-weight: 600;
}

.drop {
  border: 1px dashed rgba(15, 23, 42, 0.22); border-radius: 13px; padding: 16px;
  text-align: center; color: var(--dim); font-size: 13px; cursor: pointer;
  background: rgba(255, 255, 255, 0.7);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.drop:hover, .drop.over {
  border-color: rgba(79, 70, 229, 0.6);
  background: rgba(79, 70, 229, 0.06);
  color: var(--text);
}
.ref-preview {
  position: relative; display: block; border-radius: 13px; overflow: hidden;
  border: 1px solid var(--line); background: #f4f6fa; line-height: 0;
}
/* 参考图按自身比例显示：不裁切、不留黑边，竖图受最大高度约束、横图撑满栏宽 */
.ref-preview img { display: block; margin: 0 auto; max-width: 100%; max-height: 420px; width: auto; height: auto; }
.ref-preview .ref-note {
  position: absolute; left: 8px; bottom: 8px; line-height: 1.5; font-size: 11px;
  padding: 3px 8px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.88); border: 1px solid rgba(15, 23, 42, 0.12);
  color: var(--text); backdrop-filter: var(--glass-soft); -webkit-backdrop-filter: var(--glass-soft);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}
.ref-preview button {
  position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 9px;
  border: 1px solid rgba(15, 23, 42, 0.14); background: rgba(255, 255, 255, 0.9); color: var(--text);
  backdrop-filter: var(--glass-soft); -webkit-backdrop-filter: var(--glass-soft); cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}
.ref-preview button:hover { border-color: var(--accent); color: var(--accent); }
/* 圈选按钮与遮罩叠加层 */
.ref-preview .ref-paint {
  top: auto; bottom: 8px; right: 8px; width: auto; height: 26px; padding: 0 10px;
  font: inherit; font-size: 11.5px; line-height: 1; display: inline-flex; align-items: center; gap: 4px;
  border-radius: 9px; border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.9); color: var(--text);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}
.ref-preview .ref-paint:hover { border-color: var(--accent); color: var(--accent); }
.ref-preview .ref-maskview {
  position: absolute; inset: 0; margin: auto; max-width: 100%; max-height: 420px;
  opacity: 0.32; mix-blend-mode: screen; pointer-events: none; filter: blur(0.4px);
}

.mask-mask {
  position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center;
  background: rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  padding: 16px;
}
.mask-editor {
  width: min(920px, 100%); max-height: 92vh; overflow: auto;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.9));
  border: 1px solid rgba(15, 23, 42, 0.1); border-radius: 18px; padding: 14px;
  box-shadow: var(--shadow), var(--edge);
  backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
}
.mask-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.mask-head strong { font-size: 14px; }
.mask-head .muted { font-size: 12px; }
.mask-stage {
  display: flex; justify-content: center; border-radius: 13px; padding: 8px;
  background: #eef1f6; border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: inset 0 2px 10px rgba(15, 23, 42, 0.08);
}
.mask-wrap { position: relative; line-height: 0; border-radius: 9px; overflow: hidden; }
.mask-wrap canvas { display: block; max-width: 100%; }
.mask-wrap canvas[data-paint] { position: absolute; inset: 0; cursor: crosshair; touch-action: none; mix-blend-mode: screen; }
.mask-tools {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: 12.5px;
}
.mask-tools input[type="range"] { width: 120px; vertical-align: middle; accent-color: var(--accent); }
.mask-tools .grow { flex: 1; }
.mask-tools .btn.on { border-color: var(--accent); color: var(--accent); background: rgba(79, 70, 229, 0.1); }

.cost {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-radius: 12px; margin: 16px 0 12px; font-size: 13px; color: var(--muted);
  background: rgba(79, 70, 229, 0.05); border: 1px solid rgba(79, 70, 229, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.cost b { color: var(--text); font-size: 16px; }

/* ---------- gallery ---------- */
.gallery-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.gallery-head h2 { margin: 0; font-size: 18px; letter-spacing: -0.01em; }
.badge {
  font-size: 12px; color: var(--muted); border: 1px solid var(--line-strong);
  padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.85);
}

.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; align-items: start; }
.tile {
  position: relative; border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  box-shadow: var(--shadow-sm), var(--edge);
  backdrop-filter: var(--glass-soft);
  -webkit-backdrop-filter: var(--glass-soft);
  display: flex; flex-direction: column;
}
.tile.pending { min-height: 220px; }
.tile img, .tile video { width: 100%; height: auto; display: block; object-fit: cover; background: #eef1f6; }
.tile .meta {
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid rgba(15, 23, 42, 0.07);
  backdrop-filter: var(--glass-soft); -webkit-backdrop-filter: var(--glass-soft);
  font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px;
}
.tile .meta a.btn { text-decoration: none; }
.tile .state {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; font-size: 13px; color: var(--muted);
  background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.96), rgba(244, 246, 250, 0.92));
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid rgba(15, 23, 42, 0.12); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.pill {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.9);
}
.pill.ok { color: var(--ok); border-color: rgba(22, 163, 74, 0.35); background: rgba(22, 163, 74, 0.08); }
.pill.err { color: var(--err); border-color: rgba(220, 38, 38, 0.35); background: rgba(220, 38, 38, 0.07); }
.pill.warn { color: var(--warn); border-color: rgba(180, 83, 9, 0.35); background: rgba(180, 83, 9, 0.08); }

.empty {
  border: 1px dashed rgba(15, 23, 42, 0.18); border-radius: 14px; padding: 44px 20px;
  text-align: center; color: var(--dim); font-size: 14px;
  background: rgba(255, 255, 255, 0.6);
}

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.plan { padding: 24px; position: relative; }
.plan.hot {
  border-color: rgba(79, 70, 229, 0.4);
  box-shadow: 0 24px 60px rgba(79, 70, 229, 0.18), var(--edge);
  background: linear-gradient(160deg, rgba(79, 70, 229, 0.1), rgba(124, 58, 237, 0.06) 55%, rgba(255, 255, 255, 0.9));
}
.plan h3 { margin: 0 0 4px; font-size: 18px; }
.plan .price { font-size: 38px; font-weight: 700; letter-spacing: -0.03em; margin: 10px 0 2px; }
.plan .price small { font-size: 14px; color: var(--muted); font-weight: 500; }
.plan ul { list-style: none; padding: 0; margin: 18px 0; font-size: 13.5px; color: var(--muted); display: grid; gap: 9px; }
.plan li::before { content: "✓"; color: var(--ok); margin-right: 8px; }

.checkin { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 0; }
.day {
  flex: 1; min-width: 92px; text-align: center; padding: 12px 8px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  font-size: 12px; color: var(--muted);
}
.day b { display: block; font-size: 17px; color: var(--text); margin-bottom: 2px; }
.day.done { border-color: rgba(22, 163, 74, 0.35); background: rgba(22, 163, 74, 0.08); }
.day.today { border-color: rgba(79, 70, 229, 0.5); background: rgba(79, 70, 229, 0.08); }

/* ---------- auth modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 90; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(10px) saturate(120%); -webkit-backdrop-filter: blur(10px) saturate(120%);
}
.modal.open { display: flex; }
.modal-box { width: 100%; max-width: 400px; padding: 26px; }
.modal-box h2 { margin: 0 0 6px; font-size: 21px; letter-spacing: -0.02em; }
.modal-box p.hint { color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.toggle-line { text-align: center; font-size: 13px; color: var(--muted); margin-top: 14px; }
.toggle-line a { color: var(--accent); cursor: pointer; font-weight: 600; }
.err-line { color: var(--err); font-size: 13px; min-height: 18px; margin: 6px 0 0; }

/* ---------- toast ---------- */
.toast-host { position: fixed; right: 18px; bottom: 18px; z-index: 120; display: grid; gap: 10px; }
.toast {
  padding: 11px 15px; border-radius: 12px; font-size: 13.5px;
  background: rgba(255, 255, 255, 0.96); border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: var(--shadow), var(--edge);
  backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  animation: rise 0.18s ease;
}
.toast.err { border-color: rgba(220, 38, 38, 0.4); color: var(--err); background: #fff5f5; }
.toast.ok { border-color: rgba(22, 163, 74, 0.4); color: #15803d; background: #f4fdf7; }
@keyframes rise { from { transform: translateY(6px); opacity: 0; } }

.balance { font-variant-numeric: tabular-nums; font-weight: 700; }
.pill-credits {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--edge);
  backdrop-filter: var(--glass-soft); -webkit-backdrop-filter: var(--glass-soft);
  font-size: 13px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: linear-gradient(135deg, #4f46e5, #7c3aed); box-shadow: 0 0 8px rgba(79, 70, 229, 0.6); }
.foot {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  padding: 26px 0 40px; color: var(--dim); font-size: 12.5px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.7));
}

/* 精修弹窗 */
.refine-mask {
  position: fixed; inset: 0; z-index: 70; padding: 20px;
  background: rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(10px) saturate(120%); -webkit-backdrop-filter: blur(10px) saturate(120%);
  display: flex; align-items: center; justify-content: center;
}
.refine {
  width: min(760px, 100%); max-height: 88vh; overflow: auto;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.92));
  border: 1px solid rgba(15, 23, 42, 0.1); border-radius: 18px;
  padding: 16px; display: grid; grid-template-columns: 240px 1fr; gap: 16px;
  box-shadow: var(--shadow), var(--edge);
  backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
}
.refine img { width: 100%; display: block; border-radius: 11px; background: #eef1f6; }
.refine textarea,
.refine input {
  width: 100%; box-sizing: border-box; font: inherit; line-height: 1.5;
  padding: 10px 12px; border-radius: 11px;
  background: #fff; color: var(--text);
  border: 1px solid var(--line-strong); outline: none;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}
.refine textarea { min-height: 96px; resize: vertical; }
.refine textarea:focus,
.refine input:focus { border-color: rgba(79, 70, 229, 0.65); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.14); }
@media (max-width: 680px) { .refine { grid-template-columns: 1fr; } }

/* 不支持 backdrop-filter 的老浏览器：退回不透明底，别让文字糊在图上 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card, .tile, .toast, .modal-box, .refine, .mask-editor, .btn, .chip, .pill-credits {
    background: #ffffff;
  }
  .nav { background: #ffffff; }
}
