/* ==========================================================================
   OPENX 遨游 — studio.css
   AI 创作台 / 会员中心 / 登录注册 / 演示素材占位系统
   ========================================================================== */

/* ============================ DEMO MEDIA ============================ */
.demo {
  --d1: #6E5BFF;
  --d2: #00D8B4;
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: #10121D;
  aspect-ratio: 3 / 4;
  isolation: isolate;
}
.demo[data-ratio="1:1"] { aspect-ratio: 1 / 1; }
.demo[data-ratio="4:3"] { aspect-ratio: 4 / 3; }
.demo[data-ratio="16:9"] { aspect-ratio: 16 / 9; }
.demo[data-ratio="9:16"] { aspect-ratio: 9 / 16; }
.demo[data-ratio="3:2"] { aspect-ratio: 3 / 2; }

.demo img,
.demo video {
  position: absolute; inset: 0; z-index: 2;
  width: 100%; height: 100%; object-fit: cover;
}

.demo-ph {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 16px;
  color: #fff;
  background:
    radial-gradient(120% 90% at 12% 8%, var(--d1), transparent 62%),
    radial-gradient(110% 80% at 88% 22%, var(--d2), transparent 60%),
    linear-gradient(170deg, #141728, #080910 82%);
}
.demo-ph::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: radial-gradient(80% 80% at 50% 40%, #000, transparent 76%);
  -webkit-mask-image: radial-gradient(80% 80% at 50% 40%, #000, transparent 76%);
}
.demo-glyph {
  position: absolute; left: 50%; top: 46%;
  transform: translate(-50%, -50%);
  width: 42px; height: 42px;
  color: rgba(255,255,255,.5);
  filter: drop-shadow(0 6px 20px rgba(0,0,0,.4));
}
.demo-glyph svg { width: 100%; height: 100%; }
.demo-prompt {
  position: relative;
  font-size: .72rem; line-height: 1.55;
  color: rgba(255,255,255,.62);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.demo-badge {
  position: absolute; top: 12px; left: 12px; z-index: 3;
  height: 22px; padding: 0 9px;
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: 6px;
  background: rgba(255,255,255,.14);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
  font-size: .66rem; font-weight: 700; letter-spacing: .06em; color: #fff;
}
.demo-badge.live { background: rgba(255,107,74,.9); }
.demo-play {
  position: absolute; z-index: 4; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.9);
  box-shadow: 0 14px 34px -10px rgba(0,0,0,.6);
  color: var(--ink);
  transition: transform .3s var(--ease), background .3s;
}
.demo-play svg { width: 16px; height: 16px; margin-left: 2px; }
.demo:hover .demo-play { transform: translate(-50%, -50%) scale(1.09); background: #fff; }
.demo-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 10px;
}
.demo-meta b { font-size: .84rem; font-weight: 650; letter-spacing: -.01em; }
.demo-meta span { font-size: .72rem; color: var(--text-3); }

.demo-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.demo-grid.g3 { grid-template-columns: repeat(3, 1fr); }
.demo-grid.g2 { grid-template-columns: repeat(2, 1fr); }

/* ============================ ARTWORK ============================
   程序化生成的作品图：四种构图（柔光/几何/字体/氛围）+ 品牌标识。
   纯 CSS 绘制，无外部图片，按哈希取变体，同屏不重复。
   ================================================================= */
.art {
  --a1: #6E5BFF;
  --a2: #00D8B4;
  --a3: #FF6B4A;
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: #0B0C15;
  color: #fff;
  aspect-ratio: 3 / 4;
  isolation: isolate;
  container-type: inline-size;
  transition: transform .5s var(--ease, cubic-bezier(.22,.61,.36,1));
}
.art[data-ratio="1:1"] { aspect-ratio: 1 / 1; }
.art[data-ratio="4:3"] { aspect-ratio: 4 / 3; }
.art[data-ratio="16:9"] { aspect-ratio: 16 / 9; }
.art[data-ratio="9:16"] { aspect-ratio: 9 / 16; }
.art[data-ratio="3:2"] { aspect-ratio: 3 / 2; }

.art__bg { position: absolute; inset: 0; }

/* 颗粒质感：让画面不像纯 CSS 渐变 */
.art__grain {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  opacity: .5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
  background-size: 140px 140px;
}

/* 真实素材：文件存在就盖住程序化作品图，不存在则被移除（露出底图） */
.art__media {
  position: absolute; inset: 0; z-index: 2;
  width: 100%; height: 100%; object-fit: cover;
}
.art .demo-play { z-index: 3; }

/* 角标 + 说明 */
.art__tag {
  position: absolute; top: 12px; left: 12px; z-index: 5;
  display: inline-flex; align-items: center; height: 21px; padding: 0 9px;
  border-radius: 99px;
  background: rgba(10,11,20,.42);
  border: 1px solid rgba(255,255,255,.26);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-size: clamp(8.5px, 2.5cqw, 9.8px); font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  white-space: nowrap;
}
.art__cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  padding: 26px 14px 13px;
  background: linear-gradient(180deg, transparent, rgba(6,7,13,.72));
}
.art__cap p {
  margin: 0; font-size: clamp(9px, 4.2cqw, 11.5px); line-height: 1.5; letter-spacing: .01em;
  color: rgba(255,255,255,.86);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- 变体 1：柔光网格 ---------- */
.art--mesh .art__bg {
  background:
    radial-gradient(58% 52% at 22% 16%, var(--a1) 0%, transparent 68%),
    radial-gradient(52% 48% at 84% 26%, var(--a2) 0%, transparent 66%),
    radial-gradient(72% 58% at 52% 96%, var(--a3) 0%, transparent 70%),
    linear-gradient(168deg, #121423, #06070C 86%);
  filter: saturate(1.12);
}
/* 第二层：暗角 + 斜向光带，避免看起来只是一团渐变 */
.art--mesh .art__veil {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(118deg, transparent 42%, rgba(255,255,255,.11) 50%, transparent 58%),
    radial-gradient(96% 84% at 50% 46%, transparent 40%, rgba(4,5,11,.6) 100%);
}
.art--mesh .art__blob {
  position: absolute; z-index: 2; aspect-ratio: 1; border-radius: 50%;
  left: var(--bx, 62%); top: var(--by, 8%);
  width: var(--bs, 44%);
  background: radial-gradient(circle at 36% 32%, rgba(255,255,255,.72), transparent 66%);
  filter: blur(16px); opacity: .46;
}

/* ---------- 变体 2：几何构成 ---------- */
.art--geo .art__bg {
  background: linear-gradient(148deg, var(--a1) 0%, var(--a2) 100%);
}
.art--geo .art__disc {
  position: absolute; z-index: 2;
  left: var(--gx, 50%); top: var(--gy, 44%);
  width: var(--gs, 62%); aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255,255,255,.55);
  background: radial-gradient(circle at 40% 34%, rgba(255,255,255,.3), transparent 62%);
  mix-blend-mode: soft-light;
}
.art--geo .art__band {
  position: absolute; z-index: 2; left: -12%;
  bottom: var(--gb, 30%);
  width: 124%; height: var(--gh, 13%);
  background: rgba(10,11,20,.5);
  transform: rotate(var(--ga, -9deg));
  mix-blend-mode: multiply;
}
.art--geo .art__rule {
  position: absolute; z-index: 2; left: 12%; right: 12%; top: var(--gr, 20%); height: 1px;
  background: rgba(255,255,255,.5);
}

/* ---------- 变体 3：字体排版 ---------- */
.art--type .art__bg {
  background:
    radial-gradient(90% 70% at 88% 6%, rgba(255,255,255,.1), transparent 60%),
    linear-gradient(162deg, #14161F 0%, #07080E 100%);
}
.art--type .art__big {
  position: absolute; z-index: 2; left: 6%; top: 50%;
  transform: translateY(-52%);
  font-size: 40cqw; line-height: .82; font-weight: 850; letter-spacing: -.07em;
  color: var(--a1);
  text-shadow: 0 0 40px color-mix(in srgb, var(--a1) 55%, transparent);
}
.art--type .art__kicker {
  position: absolute; z-index: 3; left: 8%; top: 17%;
  font-size: 3.6cqw; font-weight: 750; letter-spacing: .26em;
  color: rgba(255,255,255,.5); text-transform: uppercase;
}
.art--type .art__rule {
  position: absolute; z-index: 3; left: 8%; right: 8%; top: 24%; height: 1px;
  background: rgba(255,255,255,.18);
}

/* ---------- 变体 4：氛围场景 ---------- */
.art--scene .art__bg {
  background: linear-gradient(178deg, var(--a2) 0%, var(--a1) 40%, #0A0B12 96%);
}
.art--scene .art__sun {
  position: absolute; z-index: 2; left: 50%; top: 38%;
  width: 30%; aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.92), rgba(255,255,255,.18) 52%, transparent 70%);
  filter: blur(2px);
}
.art--scene .art__horizon {
  position: absolute; z-index: 2; left: 0; right: 0; top: 52%; height: 1px;
  background: rgba(255,255,255,.32);
  box-shadow: 0 0 26px 8px rgba(255,255,255,.14);
}
.art--scene .art__ground {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 46%;
  background: linear-gradient(180deg, transparent, rgba(4,5,10,.86));
}

/* ---------- 变体 5：品牌标识（LOGO） ---------- */
.art--mark .art__bg {
  background:
    radial-gradient(70% 60% at 50% 34%, #FFFDF8, #EFEBE1 100%);
}
.art--mark .art__plate {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7%; color: #14161F;
}
.art--mark .art__mark {
  display: grid; place-items: center;
  width: 44%; aspect-ratio: 1;
}
.art--mark .art__mark svg { width: 100%; height: 100%; }
.art--mark .art__name {
  font-size: clamp(11px, 4.6cqw, 15px); font-weight: 750; letter-spacing: .16em; line-height: 1;
}
.art--mark .art__tag {
  background: rgba(255,255,255,.72); border-color: rgba(11,12,21,.14); color: #3A3C46;
}

/* 悬停：轻微推近，像真图 */
.demo-grid .art, .hero-tiles .art { will-change: transform; }
.demo-grid .art:hover { transform: translateY(-4px) scale(1.012); }

/* 层序统一：构图元素在最底 → 颗粒 → 真实素材 → 角标/说明 */
.art .art__bg, .art .art__blob, .art .art__veil,
.art .art__disc, .art .art__band, .art .art__rule,
.art .art__big, .art .art__kicker,
.art .art__sun, .art .art__horizon, .art .art__ground,
.art .art__plate { z-index: 0; }

/* ============================ PAGE HEAD (light) ============================ */
.pg-head {
  padding: calc(var(--nav-h) + 52px) 0 44px;
  background:
    radial-gradient(60% 100% at 15% 0%, rgba(110,91,255,.09), transparent 62%),
    radial-gradient(50% 100% at 85% 0%, rgba(0,216,180,.09), transparent 60%),
    var(--paper-1);
  border-bottom: 1px solid var(--line-2);
}
.pg-head h1 {
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  line-height: 1.14; letter-spacing: -.034em; font-weight: 820;
  margin-top: 14px;
}
.pg-head .lead { margin-top: 14px; max-width: 640px; }

/* ============================ MODE TABS ============================ */
.mode-tabs {
  position: sticky; top: var(--nav-h); z-index: 45;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line-2);
}
.mode-tabs .container-wide { display: flex; gap: 8px; overflow-x: auto; padding-top: 12px; padding-bottom: 12px; }
.mode-tabs::-webkit-scrollbar { height: 0; }
/* 窄屏下标签放不下，右边缘渐隐提示可横向滑动 */
@media (max-width: 1100px) {
  .mode-tabs { position: relative; }
  .mode-tabs::after {
    content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 56px;
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.96));
    pointer-events: none; z-index: 2;
  }
}
.mode-tab {
  display: flex; align-items: center; gap: 9px;
  height: 44px; padding: 0 16px 0 12px;
  border-radius: 12px;
  font-size: .88rem; font-weight: 620; color: var(--text-2);
  white-space: nowrap;
  transition: all .22s var(--ease-io);
}
.mode-tab i {
  width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--paper-2); color: var(--text-2);
  transition: all .22s;
}
.mode-tab i svg { width: 15px; height: 15px; }
.mode-tab:hover { background: var(--paper-1); color: var(--text); }
.mode-tab[aria-selected="true"] {
  background: var(--ink); color: #fff;
  box-shadow: 0 10px 26px -14px rgba(11,12,21,.8);
}
.mode-tab[aria-selected="true"] i { background: var(--grad-brand); color: #fff; }

/* ============================ WORKBENCH ============================ */
.wb {
  display: grid;
  grid-template-columns: 400px 1fr;
  height: clamp(560px, calc(100vh - 220px), 880px);
  gap: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--sh-2);
  border: 1px solid var(--line-2);
}
.wb-panel {
  padding: 22px 22px 26px;
  border-right: 1px solid var(--line-2);
  background: #fff;
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.wb-panel h3 {
  font-size: .95rem; font-weight: 720; letter-spacing: -.01em;
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap;
}
.wb-panel h3 svg { width: 17px; height: 17px; flex: none; }
.wb-panel h3 > .tag { margin-left: auto; flex: none; }
.wb-stage {
  padding: 22px;
  background:
    radial-gradient(70% 60% at 50% 0%, rgba(110,91,255,.05), transparent 70%),
    var(--paper-1);
  min-height: 0;
  overflow-y: auto;
  display: flex; flex-direction: column;
}

.f-label {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .78rem; font-weight: 680; color: var(--text-2);
  margin: 20px 0 8px;
}
.f-label em { font-style: normal; font-weight: 500; color: var(--text-3); font-size: .72rem; }

.textarea {
  width: 100%; min-height: 108px; resize: vertical;
  padding: 12px 13px; border-radius: 12px;
  border: 1.5px solid var(--line); background: #fff;
  font-size: .875rem; line-height: 1.6;
  transition: border-color .2s, box-shadow .2s;
}
.textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(110,91,255,.12); }
.textarea::placeholder { color: #AEB2C4; }

.select {
  width: 100%; height: 42px; padding: 0 12px;
  border-radius: 10px; border: 1.5px solid var(--line);
  background: #fff; font-size: .85rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23878CA3' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.select:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(110,91,255,.12); }

.ratio-row, .style-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.ratio-btn {
  height: 34px; padding: 0 12px; border-radius: 9px;
  font-size: .78rem; font-weight: 620; color: var(--text-2);
  background: var(--paper-1);
  box-shadow: inset 0 0 0 1.5px transparent;
  transition: all .2s;
}
.ratio-btn:hover { background: var(--paper-2); }
.ratio-btn[aria-pressed="true"] {
  background: var(--brand-soft); color: var(--brand-deep);
  box-shadow: inset 0 0 0 1.5px rgba(110,91,255,.45);
}
.style-chip {
  height: 32px; padding: 0 12px; border-radius: 99px;
  font-size: .78rem; font-weight: 600; color: var(--text-2);
  box-shadow: inset 0 0 0 1.5px var(--line);
  transition: all .2s;
}
.style-chip:hover { box-shadow: inset 0 0 0 1.5px #CDD1E4; color: var(--text); }
.style-chip[aria-pressed="true"] {
  background: var(--ink); color: #fff; box-shadow: none;
}

.prompt-sugs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.prompt-sug {
  font-size: .72rem; padding: 5px 10px; border-radius: 99px;
  background: var(--paper-1); color: var(--text-2);
  transition: all .2s;
}
.prompt-sug:hover { background: var(--brand-soft); color: var(--brand-deep); }

.upload {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: 12px;
  border: 1.5px dashed var(--line);
  background: var(--paper-1);
  cursor: pointer; transition: all .22s;
}
.upload:hover { border-color: rgba(110,91,255,.5); background: var(--brand-soft); }
.upload .thumb {
  width: 46px; height: 46px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: #fff; color: var(--text-3);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}
.upload .thumb img { width: 100%; height: 100%; object-fit: cover; }
.upload .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.upload .thumb .up-file {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; line-height: 1.15;
}
.upload .thumb .up-file b { font-size: .62rem; font-weight: 750; color: var(--text); }
.upload .thumb .up-file em { font-size: .55rem; font-style: normal; color: var(--text-3); }
.upload b { display: block; font-size: .8rem; font-weight: 650; }
.upload span { font-size: .72rem; color: var(--text-3); }

.cost-bar {
  margin-top: 22px; padding: 13px 14px;
  border-radius: 12px; background: var(--paper-1);
  display: flex; align-items: center; gap: 10px;
  font-size: .78rem; color: var(--text-2);
}
.cost-bar b { color: var(--text); font-weight: 750; }
.cost-bar .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--line); }
.cost-bar a { margin-left: auto; font-weight: 650; color: var(--brand); }

.wb-actions { margin-top: 16px; display: flex; flex-direction: column; gap: 9px; }
.wb-note { margin-top: 12px; font-size: .72rem; color: var(--text-3); line-height: 1.6; }

/* Stage */
.stage-top {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.stage-top .title { font-size: .9rem; font-weight: 700; }
.stage-top .spacer { flex: 1; }
.mini-chip {
  height: 28px; padding: 0 11px; border-radius: 99px;
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap; flex: none;
  font-size: .72rem; font-weight: 650; color: var(--text-2);
  background: #fff; box-shadow: inset 0 0 0 1px var(--line);
}
.mini-chip.live { color: #C0391B; background: var(--accent-soft); box-shadow: none; }
.mini-chip svg { width: 13px; height: 13px; flex: none; }
.mini-chip.live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: blink 1.6s infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}
.result-slot {
  position: relative;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line-2);
  overflow: hidden;
  min-height: 210px;
  display: grid; place-items: center;
  color: var(--text-3);
}
.result-slot .ph {
  text-align: center; padding: 20px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.result-slot .ph svg { width: 24px; height: 24px; opacity: .5; }
.result-slot .ph span { font-size: .76rem; }
.result-slot.filled { box-shadow: none; }

.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 60px 20px; text-align: center;
  color: var(--text-3); flex: 1;
}
.empty-state .ico {
  width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center;
  background: #fff; box-shadow: var(--sh-1); color: var(--brand);
}
.empty-state .ico svg { width: 24px; height: 24px; }
.empty-state b { color: var(--text); font-size: .95rem; }
.empty-state p { font-size: .82rem; max-width: 320px; line-height: 1.7; }

.skeleton {
  position: relative; overflow: hidden;
  background: linear-gradient(100deg, #EFF1F8 30%, #F8F9FD 50%, #EFF1F8 70%);
  background-size: 220% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -60% 0; } }

/* mode gallery */
.gal-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-top: 56px;
}

/* ============================ MEMBER ============================ */
.mem-grid {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 22px; align-items: start;
}
.balance-card {
  position: relative; overflow: hidden;
  border-radius: var(--r-xl);
  padding: 32px 34px;
  color: #fff;
  background: var(--ink);
  isolation: isolate;
}
.balance-card::before {
  content: ""; position: absolute; inset: -50% -20% auto -20%; height: 200%;
  background: var(--grad-aurora); z-index: -1;
}
.balance-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(rgba(255,255,255,.1) 1px, transparent 1px);
  background-size: 20px 20px;
  mask-image: radial-gradient(70% 70% at 80% 20%, #000, transparent 70%);
  -webkit-mask-image: radial-gradient(70% 70% at 80% 20%, #000, transparent 70%);
}
.bal-label { font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.bal-amount {
  margin-top: 12px; display: flex; align-items: baseline; gap: 8px;
}
.bal-amount b { font-size: 3.1rem; font-weight: 850; letter-spacing: -.05em; line-height: 1; }
.bal-amount span { font-size: .9rem; color: rgba(255,255,255,.6); }
.bal-sub {
  margin-top: 20px; padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex; gap: 30px; flex-wrap: wrap;
  font-size: .78rem; color: rgba(255,255,255,.55);
}
.bal-sub b { display: block; color: #fff; font-size: .95rem; font-weight: 700; margin-top: 3px; }
.bal-actions { margin-top: 26px; display: flex; gap: 10px; flex-wrap: wrap; }

.plan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.plan {
  position: relative; text-align: left;
  padding: 20px 18px 18px;
  border-radius: var(--r-md);
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--line);
  transition: all .28s var(--ease);
}
.plan:hover { box-shadow: inset 0 0 0 1.5px rgba(110,91,255,.5), var(--sh-2); transform: translateY(-3px); }
.plan.hot { box-shadow: inset 0 0 0 1.5px var(--brand); background: linear-gradient(180deg, #FBFAFF, #fff); }
.plan .pn { font-size: .78rem; font-weight: 700; color: var(--text-2); letter-spacing: .06em; }
.plan .pp { margin-top: 10px; display: flex; align-items: baseline; gap: 4px; }
.plan .pp b { font-size: 1.85rem; font-weight: 850; letter-spacing: -.04em; }
.plan .pp i { font-style: normal; font-size: .9rem; font-weight: 700; }
.plan .pc { margin-top: 6px; font-size: .78rem; color: var(--text-3); }
.plan .pgift { margin-top: 12px; font-size: .74rem; font-weight: 650; color: var(--accent); }
.plan .pflag {
  position: absolute; top: -9px; right: 12px;
  height: 20px; padding: 0 9px; border-radius: 99px;
  background: var(--grad-brand); color: #fff;
  font-size: .64rem; font-weight: 750; display: grid; place-items: center;
}

.rec-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.rec-table th {
  text-align: left; font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-3);
  padding: 0 12px 12px; border-bottom: 1px solid var(--line);
}
.rec-table td { padding: 14px 12px; border-bottom: 1px solid var(--line-2); color: var(--text-2); }
.rec-table tr:last-child td { border-bottom: 0; }
.rec-table .amt-in { color: #0E9F6E; font-weight: 700; }
.rec-table .amt-out { color: var(--text); font-weight: 650; }
.rec-type {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: 6px; font-size: .7rem; font-weight: 650;
  background: var(--paper-2); color: var(--text-2);
}
.rec-type.in { background: var(--cyan-soft); color: #00795F; }

.panel {
  background: #fff; border-radius: var(--r-lg);
  padding: 24px; box-shadow: var(--sh-1);
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 18px;
}
.panel-head h3 { font-size: 1rem; font-weight: 720; letter-spacing: -.01em; }

/* ============================ AUTH ============================ */
.auth-wrap {
  min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr;
  background: #fff;
}
.auth-side {
  position: relative; overflow: hidden;
  background: var(--ink); color: #fff;
  padding: 54px 56px;
  display: flex; flex-direction: column; justify-content: space-between;
  isolation: isolate;
}
.auth-side::before {
  content: ""; position: absolute; inset: -30% -20% auto -20%; height: 150%;
  background: var(--grad-aurora); z-index: -1;
}
.auth-side::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(70% 60% at 40% 30%, #000, transparent 78%);
  -webkit-mask-image: radial-gradient(70% 60% at 40% 30%, #000, transparent 78%);
}
.auth-side .h2 { max-width: 420px; }
.auth-points { display: grid; gap: 16px; margin-top: 34px; }
.auth-point { display: flex; gap: 13px; align-items: flex-start; }
.auth-point i {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: rgba(255,255,255,.1);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.auth-point i svg { width: 15px; height: 15px; color: #B9AEFF; }
.auth-point b { display: block; font-size: .92rem; font-weight: 650; }
.auth-point p { font-size: .82rem; color: rgba(255,255,255,.55); margin-top: 2px; line-height: 1.6; }

.auth-main {
  display: grid; place-items: center;
  padding: 48px 32px;
  background: var(--paper-1);
}
.auth-card {
  width: 100%; max-width: 400px;
  background: #fff; border-radius: var(--r-xl);
  padding: 34px 32px 30px;
  box-shadow: var(--sh-2);
}
.auth-tabs {
  display: flex; gap: 4px; padding: 4px;
  border-radius: 12px; background: var(--paper-1);
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1; height: 36px; border-radius: 9px;
  font-size: .86rem; font-weight: 650; color: var(--text-2);
  transition: all .22s;
}
.auth-tab[aria-selected="true"] {
  background: #fff; color: var(--text); box-shadow: var(--sh-1);
}
.auth-err {
  margin-top: 14px; padding: 10px 12px; border-radius: 10px;
  background: var(--accent-soft); color: #B33A1B;
  font-size: .8rem; line-height: 1.55;
  display: none;
}
.auth-err.show { display: block; }

/* ============================ MISC ============================ */
.notice {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 13px 15px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand-deep);
  font-size: .8rem; line-height: 1.6;
}
.notice svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.notice.warn { background: var(--accent-soft); color: #B33A1B; }
.notice.neutral { background: var(--paper-1); color: var(--text-2); }

.user-pill {
  display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 6px 0 12px; border-radius: 99px;
  background: var(--paper-1);
  font-size: .84rem; font-weight: 620;
}
.user-pill .av {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--grad-brand); color: #fff;
  font-size: .72rem; font-weight: 750;
}

@media (max-width: 1080px) {
  .wb { grid-template-columns: 1fr; }
  .wb-panel { max-height: none; border-right: 0; border-bottom: 1px solid var(--line-2); }
  .mem-grid { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: repeat(2, 1fr); }
  .demo-grid { grid-template-columns: repeat(3, 1fr); }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}
@media (max-width: 720px) {
  .demo-grid, .demo-grid.g3 { grid-template-columns: repeat(2, 1fr); }
  .result-grid { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr 1fr; }
  .balance-card { padding: 24px 22px; }
  .bal-amount b { font-size: 2.4rem; }
  .mode-tab { height: 40px; padding: 0 12px 0 9px; font-size: .82rem; }
  .mode-tab i { width: 22px; height: 22px; }
  .rec-table th:nth-child(3), .rec-table td:nth-child(3) { display: none; }
}

/* ============================ RESULT / COPY ============================ */
.result-grid.one { grid-template-columns: 1fr; max-width: 340px; }
.result-grid.one[data-r="16:9"] { max-width: 600px; }
.result-grid.one[data-r="9:16"] { max-width: 260px; }
.result-slot.skeleton { min-height: 0; aspect-ratio: 3 / 4; border-radius: 14px; }
.result-slot.skeleton[data-ratio="1:1"]  { aspect-ratio: 1 / 1; }
.result-slot.skeleton[data-ratio="4:3"]  { aspect-ratio: 4 / 3; }
.result-slot.skeleton[data-ratio="16:9"] { aspect-ratio: 16 / 9; }
.result-slot.skeleton[data-ratio="9:16"] { aspect-ratio: 9 / 16; }

.result-slot.filled {
  min-height: 0; display: block; position: relative;
  border-radius: 14px; overflow: hidden;
  box-shadow: var(--sh-1);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.result-slot.filled:hover { transform: translateY(-4px); box-shadow: var(--sh-3); }
.result-slot.filled .demo { border-radius: 14px; }

/* 真实成片（接入推理服务后）：按比例撑开，图片/视频铺满 */
.result-slot.filled.has-media { aspect-ratio: 3 / 4; }
.result-slot.filled.has-media[data-ratio="1:1"]  { aspect-ratio: 1 / 1; }
.result-slot.filled.has-media[data-ratio="4:3"]  { aspect-ratio: 4 / 3; }
.result-slot.filled.has-media[data-ratio="16:9"] { aspect-ratio: 16 / 9; }
.result-slot.filled.has-media[data-ratio="9:16"] { aspect-ratio: 9 / 16; }
.result-media {
  display: block; width: 100%; height: 100%;
  object-fit: cover; background: var(--ink-050, #0B0C15);
}
/* 成品图可以点开放大（灯箱），给个明确的可点提示 */
img.result-media { cursor: zoom-in; }

/* ---------------- 示例卡：可点 / 视频播放态 ---------------- */
.demo { cursor: zoom-in; }
.demo:has(video) { cursor: pointer; }
.demo.playing { cursor: pointer; }
.demo.playing .demo-play { opacity: 0; pointer-events: none; transform: translate(-50%, -50%) scale(.8); }
.demo video { display: block; }
.demo .art__media { cursor: zoom-in; }

/* 海报：底图由 Flux 生成（不含文字），标题用真实字体叠上去，
   避免模型把中文画成乱码 */
.result-poster { position: relative; width: 100%; height: 100%; }
.result-poster .result-media { position: absolute; inset: 0; }
.result-poster-cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  display: flex; flex-direction: column; gap: .55em;
  padding: 34% 8% 15%;
  background: linear-gradient(to top,
    rgba(8,8,11,.86) 0%,
    rgba(8,8,11,.62) 32%,
    rgba(8,8,11,.22) 66%,
    rgba(8,8,11,0) 100%);
  color: #fff; pointer-events: none;
}
.result-poster-cap .rp-kicker {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: clamp(.5rem, 1.5vw, .62rem);
  letter-spacing: .18em; text-transform: uppercase;
  opacity: .72;
}
.result-poster-cap .rp-title {
  font-size: clamp(.92rem, 2.6vw, 1.5rem);
  line-height: 1.18; font-weight: 700; letter-spacing: -.015em;
  word-break: break-word;
}
/* LOGO：标志放白底卡片，品牌名用真实字体排，避免模型写字标写歪 */
.result-logo {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4%; padding: 10%;
  background: #fff;
}
.result-logo .rl-mark {
  width: 74%; max-height: 62%; object-fit: contain;
  mix-blend-mode: multiply;   /* 把近白的底融掉，只剩墨色标记 */
}
.result-logo .rl-name {
  font-size: clamp(.82rem, 2.3vw, 1.15rem);
  font-weight: 700; letter-spacing: .14em;
  color: #14161F; text-align: center; line-height: 1.3;
  word-break: break-word;
}
.result-logo .rl-sub {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: clamp(.5rem, 1.4vw, .58rem);
  letter-spacing: .22em; color: #9A9AA3; text-transform: uppercase;
}
.result-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 26px 12px 10px;
  background: linear-gradient(transparent, rgba(6,7,14,.72));
  color: #fff; font-size: .68rem; opacity: 0;
  transition: opacity .3s;
}
.result-slot.filled:hover .result-bar { opacity: 1; }
.icon-btn {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(6px);
  color: #fff;
  transition: background .2s;
}
.icon-btn:hover { background: rgba(255,255,255,.34); }
.icon-btn svg { width: 14px; height: 14px; }

.copy-results { display: grid; gap: 14px; }
.copy-card {
  background: #fff; border-radius: 14px;
  padding: 18px 20px 20px;
  box-shadow: var(--sh-1);
}
.copy-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
}
.copy-card-head .tag { height: 22px; min-width: 22px; padding: 0 7px; justify-content: center; }
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 11px; border-radius: 8px;
  font-size: .74rem; font-weight: 620; color: var(--text-2);
  background: var(--paper-1);
  transition: all .2s;
}
.copy-btn:hover { background: var(--brand-soft); color: var(--brand-deep); }
.copy-btn svg { width: 13px; height: 13px; }
.copy-body {
  margin: 0; white-space: pre-wrap; word-break: break-word;
  font-family: var(--font); font-size: .87rem; line-height: 1.85;
  color: var(--text);
}

.demo-card { min-width: 0; }

/* ============================ QUICK GRID ============================ */
.quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.quick {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 12px; border-radius: 10px;
  background: var(--paper-1);
  font-size: .82rem; font-weight: 620; color: var(--text);
  transition: background .2s, transform .2s;
}
.quick:hover { background: var(--brand-soft); transform: translateX(2px); }
.quick i {
  width: 24px; height: 24px; border-radius: 7px; flex: none;
  display: grid; place-items: center;
  background: #fff; box-shadow: inset 0 0 0 1px var(--line);
  color: var(--brand-deep);
}
.quick i svg { width: 13px; height: 13px; }
.quick span { margin-left: auto; font-size: .7rem; font-weight: 500; color: var(--text-3); }
.quick:last-child:nth-child(odd) { grid-column: span 2; }

/* 订单弹窗 */
.order-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-2);
  font-size: .86rem;
}
.order-row span { color: var(--text-3); }
.order-row b { font-weight: 700; }
.order-no {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 10px;
  background: var(--paper-1);
  font-family: var(--font-mono); font-size: .9rem; font-weight: 700;
  letter-spacing: .04em;
}
.order-no button { margin-left: auto; }

/* ---------------- 我的订单 ---------------- */
.ord-item {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--line-2);
}
.ord-item:last-child { border-bottom: 0; }
.ord-main { flex: 1; min-width: 0; }
.ord-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ord-no {
  font-family: var(--font-mono); font-size: .86rem; font-weight: 700;
  letter-spacing: .03em; color: var(--text);
}
.ord-tag {
  font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  border: 1px solid transparent; white-space: nowrap;
}
/* 颜色写死不用 var(--hot)/var(--ok)：那两个变量只在 home-v2.css 和后台里定义，
   会员页没加载 home-v2.css，取不到值会变成继承色（黑），三档就分不出来了。 */
.ord-tag.pending { color: #E8462A; border-color: #F2C9BE; background: #FDF3F0; }
.ord-tag.claimed { color: #B26A00; border-color: #F0D9A8; background: #FFF8E8; }
.ord-tag.paid { color: #12855C; border-color: #BFE0D1; background: #F1FAF6; }
.ord-meta {
  margin-top: 4px; font-size: .78rem; color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ord-act { display: flex; gap: 8px; flex: none; }

/* 手机上两个按钮横排会挤掉订单号，改成上下两行 */
@media (max-width: 560px) {
  .ord-item { align-items: flex-start; gap: 10px; flex-direction: column; }
  .ord-act { width: 100%; }
  .ord-act .btn { flex: 1; }
  /* 只有一个「复制」时别拉满整行 —— 那会把一行轻操作做成主按钮的视觉重量 */
  .ord-act .btn:only-child { flex: 0 0 auto; margin-left: auto; }
  .ord-meta { white-space: normal; line-height: 1.5; }
}

/* 付款区：客户此刻只关心「付多少、付给谁」。
   金额用大字压在收款码上面，扫一眼就知道；收款码缺失时退化成文字块，
   不留一个裂图。 */
.pay-amount {
  display: flex; align-items: baseline; gap: 8px;
  margin-top: 16px; padding: 12px 14px; border-radius: 12px;
  background: var(--brand-soft);
}
.pay-amount span { font-size: .78rem; color: var(--text-3); }
.pay-amount b { font-size: 1.5rem; font-weight: 900; letter-spacing: -.02em; color: var(--brand-deep); }

.pay-qr {
  margin-top: 12px; display: grid; place-items: center;
  min-height: 168px; padding: 12px;
  border: 1px dashed var(--line); border-radius: 12px; background: #fff;
}
.pay-qr img { width: 168px; height: 168px; object-fit: contain; display: block; }
/* [hidden] 只是 UA 样式里的 display:none，上面那条 display:block 会把它盖掉，
   结果缺图时既显示占位块、又显示一个裂图。必须显式写回来。 */
.pay-qr img[hidden] { display: none; }
.pay-qr-ph { text-align: center; display: grid; gap: 6px; }
/* 同上：有 display 声明的元素，[hidden] 都不生效 */
.pay-qr-ph[hidden] { display: none; }
.pay-qr-ph b { font-size: .86rem; color: var(--text-2); }
.pay-qr-ph span { font-size: .76rem; color: var(--text-3); line-height: 1.6; }
.pay-qr-ph span b { color: var(--text); }

/* 手机上弹窗本来就高，收款码再占 168px 就把「我已付款」挤到折叠线下 ——
   那正是客户要点的那个按钮。压到 128px，整单在一屏内看得完。 */
@media (max-width: 560px) {
  .pay-qr { min-height: 128px; padding: 10px; }
  .pay-qr img { width: 128px; height: 128px; }
  .pay-amount { margin-top: 12px; padding: 10px 12px; }
  .pay-amount b { font-size: 1.3rem; }
}

/* 结果区底部：换个方向再试 */
.try-block {
  margin-top: auto; padding-top: 28px;
}
.try-block > b {
  display: block; font-size: .78rem; font-weight: 700;
  color: var(--text-2); margin-bottom: 10px;
}
.try-chip {
  font-size: .76rem; padding: 7px 12px; border-radius: 99px;
  background: #fff; color: var(--text-2);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: all .2s;
  text-align: left;
}
.try-chip:hover { color: var(--brand-deep); box-shadow: inset 0 0 0 1.5px rgba(110,91,255,.5); }
