  @font-face {
    font-family: "VJ Noto Sans SC";
    src:
      url("../../fonts/NotoSansSC-Variable.woff2") format("woff2"),
      url("../../fonts/NotoSansSC-Variable.ttf") format("truetype");
    font-style: normal;
    font-weight: 100 900;
    font-display: block;
  }
  @font-face {
    font-family: "VJ Noto Serif SC";
    src:
      url("../../fonts/NotoSerifSC-Variable.woff2") format("woff2"),
      url("../../fonts/NotoSerifSC-Variable.ttf") format("truetype");
    font-style: normal;
    font-weight: 200 900;
    font-display: block;
  }
  @font-face {
    font-family: "VJ Ma Shan Zheng";
    src:
      url("../../fonts/MaShanZheng-Regular.woff2") format("woff2"),
      url("../../fonts/MaShanZheng-Regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: block;
  }
  @font-face {
    font-family: "VJ LXGW 975 Yuan SC";
    src:
      url("../../fonts/LXGW975YuanSC-700W.woff2") format("woff2"),
      url("../../fonts/LXGW975YuanSC-700W.ttf") format("truetype");
    font-style: normal;
    font-weight: 700;
    font-display: block;
  }
  @font-face {
    font-family: "VJ Zhi Mang Xing";
    src:
      url("../../fonts/ZhiMangXing-Regular.woff2") format("woff2"),
      url("../../fonts/ZhiMangXing-Regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: block;
  }
  @font-face {
    font-family: "VJ Noto Sans Symbols 2";
    src:
      url("../../fonts/NotoSansSymbols2-Regular.woff2") format("woff2"),
      url("../../fonts/NotoSansSymbols2-Regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: block;
  }
  @font-face {
    font-family: "VJ Noto Emoji";
    src:
      url("../../fonts/NotoEmoji-Variable.woff2") format("woff2"),
      url("../../fonts/NotoEmoji-Variable.ttf") format("truetype");
    font-style: normal;
    font-weight: 300 700;
    font-display: block;
  }
  @font-face {
    font-family: "VJ Noto Sans KR";
    src:
      url("../../fonts/NotoSansKR-Variable.woff2") format("woff2"),
      url("../../fonts/NotoSansKR-Variable.ttf") format("truetype");
    font-style: normal;
    font-weight: 100 900;
    font-display: block;
  }
  :root {
    --bg-0: #05060a;
    --bg-1: #0a0b12;
    --ink: #f5f5f7;
    --ink-soft: #cfd1d6;
    --ink-dim: #8a8c93;
    --panel: rgba(22, 23, 31, 0.72);
    --panel-stroke: rgba(255, 255, 255, 0.08);
    --accent-1: #8ab4ff;
    --accent-2: #7fe3d8;
    --accent-3: #e898ff;
    --accent-warm: #ffcf8a;
    --ok: #7fe3c0;
    --danger: #ff8a9a;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, 0.6), 0 2px 0 rgba(255, 255, 255, 0.04) inset;
  }
  * { box-sizing: border-box; }
  [hidden] { display: none !important; }
  html { height: 100%; scrollbar-gutter: stable; }
  body { height: 100%; }
  body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
    color: var(--ink);
    background: var(--bg-0);
    overflow-x: hidden;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
  }
  .ambient {
    position: fixed; inset: 0; overflow: hidden; z-index: 0;
    background: #05060a;
  }
  .ambient-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .app { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; padding: 28px 40px 40px; }
  .site-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 28px;
    color: rgba(232, 234, 241, 0.46);
    font-size: 11px;
    line-height: 1.6;
    text-align: center;
  }
  .site-footer a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
  .site-footer a:hover,
  .site-footer a:focus-visible { color: rgba(232, 234, 241, 0.8); }
  .site-footer .public-security-record { display: inline-flex; align-items: center; gap: 4px; }
  .site-footer .public-security-record img { width: 13px; height: 14px; object-fit: contain; flex: 0 0 auto; }
  .topbar { position: relative; display: flex; align-items: center; justify-content: space-between; margin-bottom: 36px; }
  .brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: 0.08em; }
  .brand .dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
    box-shadow: 0 0 20px rgba(127,227,216,0.8);
  }
  .steps {
    /* 50vw keeps the visual center fixed even when the compose page adds a scrollbar. */
    position: absolute; left: calc(50vw - 40px); transform: translateX(-50%);
    display: flex; align-items: center; gap: 14px; white-space: nowrap;
    font-size: 13px; color: var(--ink-dim);
  }
  .step-pill { padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); }
  .step-pill.active { color: var(--ink); background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.12); }
  .step-line { width: 20px; height: 1px; background: rgba(255,255,255,0.1); }
  .account-actions {
    position: relative;
    /* Compensate for the compose page's vertical scrollbar so this group never shifts left. */
    left: calc(100vw - 100% - 80px);
    display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 220px;
  }
  .auth-trigger {
    appearance: none; border: 1px solid rgba(255,255,255,.13); color: var(--ink);
    background: rgba(255,255,255,.045); border-radius: 999px;
    height: 34px; min-width: 84px; padding: 0 16px;
    cursor: pointer; font: 600 13px/1 inherit; white-space: nowrap;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .2s ease, border-color .2s ease;
  }
  .auth-trigger:hover { background: rgba(255,255,255,.09); border-color: rgba(127,227,216,.3); }
  .auth-trigger.signed-in { color: var(--ink); font-size: 14px; font-weight: 700; }
  .billing-link {
    appearance: none; border: 0; background: transparent; color: var(--ink-dim);
    height: 34px; padding: 0 8px; cursor: pointer; font: 500 12px/1 inherit;
    display: inline-flex; align-items: center;
    transition: color .2s ease;
  }
  .billing-link:hover { color: var(--ink); }
  .credit-pill {
    appearance: none; border: 1px solid rgba(255,255,255,.13); color: var(--ink);
    background: rgba(255,255,255,.055); border-radius: 999px;
    height: 34px; min-width: 84px; padding: 0 16px;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    cursor: pointer; font: inherit;
    transition: background .2s ease, border-color .2s ease, transform .15s ease;
  }
  .credit-pill:hover { background: rgba(255,255,255,.1); border-color: rgba(127,227,216,.34); }
  .credit-pill:active { transform: translateY(1px); }
  .credit-symbol { color: var(--accent-2); font-size: 14px; line-height: 1; display: flex; align-items: center; }
  .credit-balance { font-size: 14px; font-weight: 700; min-width: 12px; text-align: center; line-height: 1; }

  .view { display: none; flex: 1; flex-direction: column; animation: fadeUp 0.5s ease both; }
  .view.active { display: flex; }
  #view-upload.active { justify-content: center; }
  @keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

  .hero {
    margin: 0 auto; text-align: center; width: min(980px, calc(100vw - 80px)); padding: 0 28px 48px;
    border-radius: var(--radius-lg);
    border: 1.5px solid transparent;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: border-color .2s ease, background .2s ease;
  }
  .hero.drag { border-color: rgba(127,227,216,0.6); background: rgba(127,227,216,0.05); }
  .hero h1 {
    font-size: clamp(40px, 7vw, 74px);
    margin: 0 0 74px; letter-spacing: 0; font-weight: 800;
    line-height: .96;
    text-shadow: 0 18px 58px rgba(0, 0, 0, .54);
    display: flex; justify-content: center; flex-wrap: wrap;
    width: 100%;
  }
  .hero h1 .ch {
    display: inline-block;
    background: none;
    -webkit-background-clip: initial; background-clip: initial; color: #fff;
    transform: translate3d(0,0,0);
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
    padding: 0 0.01em;
  }
  .hero p { color: rgba(255, 255, 255, .70); font-size: 15px; line-height: 1.8; margin: 52px auto 0; max-width: 920px; white-space: nowrap; transform: translateY(66px); }
  .upload-zone { margin: 0 auto 14px; display: flex; justify-content: center; width: 100%; }
  .upload-zone, .hero-hint { transform: translateY(22px); }
  .hero-hint { color: rgba(255,255,255,.62); font-size: 12px; margin-top: 0; }
  @media (max-width: 760px) {
    .hero { width: min(100%, calc(100vw - 32px)); padding-left: 16px; padding-right: 16px; }
    .hero p { white-space: normal; max-width: 560px; }
  }

  .btn {
    appearance: none;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.06);
    color: var(--ink);
    padding: 12px 22px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 14px;
    transition: transform .15s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
    display: inline-flex; align-items: center; gap: 8px;
    user-select: none; font-family: inherit;
  }
  .btn:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.22); }
  .btn:active { transform: translateY(1px); }
  .btn.primary {
    background: linear-gradient(135deg, #eef0ff 0%, #ffffff 42%, #f5ecff 100%);
    color: #111218; border-color: rgba(255,255,255,0.25);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .34), 0 0 34px rgba(103, 232, 249, .16); font-weight: 700;
  }
  .btn.primary:hover { box-shadow: 0 14px 36px -10px rgba(200,200,255,0.55); }
  .btn.sm { padding: 8px 14px; font-size: 13px; }
  .btn[disabled] { opacity: .5; cursor: not-allowed; }
  #btnPick {
    min-height: 54px;
    padding: 0 24px;
    color: rgba(255,255,255,.92);
    background:
      linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,.07)),
      rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.34);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.40),
      inset 0 -1px 0 rgba(255,255,255,.10),
      0 18px 52px rgba(0,0,0,.34),
      0 0 0 1px rgba(255,255,255,.06);
    backdrop-filter: blur(22px) saturate(1.45);
    -webkit-backdrop-filter: blur(22px) saturate(1.45);
  }
  #btnPick:hover {
    color: #fff;
    background:
      linear-gradient(180deg, rgba(255,255,255,.30), rgba(255,255,255,.10)),
      rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.48);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.52),
      inset 0 -1px 0 rgba(255,255,255,.14),
      0 22px 62px rgba(0,0,0,.40),
      0 0 34px rgba(225,0,255,.16);
  }

  .center-card {
    margin: auto; width: min(520px, 92vw);
    background: var(--panel); border: 1px solid var(--panel-stroke);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    box-shadow: var(--shadow-lg); padding: 22px;
  }
  .center-card .label { font-size: 12px; color: var(--ink-dim); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 14px; }
  .track-row {
    display: flex; align-items: center; gap: 14px; padding: 14px 16px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(127,227,216,0.08), rgba(138,180,255,0.08), rgba(232,152,255,0.08));
    border: 1px solid rgba(255,255,255,0.06);
  }
  .track-icon {
    width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); flex-shrink: 0;
  }
  .track-meta .name { font-weight: 600; font-size: 14px; }
  .track-meta .sub { color: var(--ink-dim); font-size: 12px; margin-top: 4px; }
  .track-actions { display: flex; gap: 8px; margin-top: 14px; align-items: center; }

  .lyrics-layout { display: flex; flex-direction: column; flex: 1; min-height: 0; max-width: 920px; width: 100%; margin: 0 auto; }
  .panel {
    background: var(--panel); border: 1px solid var(--panel-stroke); border-radius: var(--radius-lg);
    backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
    box-shadow: var(--shadow-lg); padding: 20px; display: flex; flex-direction: column; min-height: 480px;
  }
  .panel h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
  .page-title,
  .panel h3.page-title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
  }
  .panel .panel-sub { color: var(--ink-dim); font-size: 12px; margin-bottom: 14px; }

  .lyrics-editor { flex: 1; display: flex; flex-direction: column; min-height: 0; }
  body.lyrics-step-active { overflow: hidden; }
  body.lyrics-step-active .app { height: 100vh; min-height: 100vh; overflow: hidden; }
  body.lyrics-step-active .topbar { flex-shrink: 0; }
  body.lyrics-step-active #view-lyrics.active { flex: 1 1 auto; min-height: 0; overflow: hidden; }
  body.lyrics-step-active #view-lyrics .lyrics-layout,
  body.lyrics-step-active #view-lyrics .lyrics-editor { flex: 1 1 auto; min-height: 0; }
  #view-lyrics { min-height: 0; overflow: hidden; }
  .lyrics-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "title actions"
      "subtitle subtitle";
    align-items: start;
    margin-bottom: 10px;
    column-gap: 18px;
    row-gap: 4px;
    flex-shrink: 0;
  }
  .lyrics-toolbar-copy { display: contents; }
  .lyrics-toolbar-copy .page-title { grid-area: title; }
  .lyrics-toolbar-copy .panel-sub { grid-area: subtitle; margin-bottom: 10px; }
  .lyrics-toolbar-copy .panel-sub span { display: block; }
  .lyrics-toolbar-actions { grid-area: actions; flex-wrap: nowrap; justify-content: flex-end; margin-top: 6px; }
  .lyrics-export-picker { position: relative; }
  .lyrics-export-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 30;
    width: 210px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 8px;
    background: rgba(18,20,28,0.98);
    box-shadow: 0 16px 36px rgba(0,0,0,0.38);
  }
  .lyrics-export-menu[hidden] { display: none; }
  .lyrics-export-title { margin: 0 0 10px; color: var(--ink-soft); font-size: 12px; }
  .lyrics-export-options { display: grid; gap: 6px; }
  .lyrics-export-option {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 34px;
    padding: 0 9px;
    border-radius: 6px;
    color: var(--ink);
    cursor: pointer;
  }
  .lyrics-export-option:hover { background: rgba(255,255,255,0.06); }
  .lyrics-export-option input { width: 16px; height: 16px; accent-color: #7fe3d8; }
  .lyrics-export-confirm { width: 100%; justify-content: center; margin-top: 10px; }
  .lyrics-character-notice {
    display: none; align-items: center; gap: 8px; flex-shrink: 0;
    margin: 0 0 10px; padding: 9px 12px; border-radius: var(--radius-sm);
    color: #ffe08a; background: rgba(255, 205, 74, 0.08); border: 1px solid rgba(255, 205, 74, 0.24);
    font-size: 12px; line-height: 1.5;
  }
  .lyrics-character-notice.show { display: flex; }
  .lyrics-character-notice::before {
    content: ""; width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #ffd45a;
    box-shadow: 0 0 10px rgba(255, 212, 90, 0.5);
  }
  .lyrics-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-right: 4px; display: flex; flex-direction: column; gap: 6px; }
  .lyric-row {
    display: grid; grid-template-columns: 20px 80px 1fr auto; gap: 10px; align-items: center;
    padding: 10px 12px; border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05);
    transition: background .15s ease, border-color .15s ease, transform .15s ease, opacity .15s ease;
    cursor: default;
  }
  .lyric-row:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); }
  .lyric-row.current {
    background: linear-gradient(135deg, rgba(127,227,216,0.14), rgba(232,152,255,0.12));
    border-color: rgba(127,227,216,0.3);
  }
  .lyric-row.song-credit {
    background: rgba(127,227,216,0.055);
    border-color: rgba(127,227,216,0.16);
  }
  .lyric-row.song-credit .drag-handle { opacity: 0.35; cursor: default; }
  .lyric-row.song-credit .time-input[readonly] { opacity: 0.72; cursor: default; }
  .lyric-row.song-credit .row-del { visibility: hidden; pointer-events: none; }
  .lyric-row.has-unsupported-character {
    background: rgba(255, 205, 74, 0.07);
    border-color: rgba(255, 205, 74, 0.48);
    box-shadow: 0 0 0 1px rgba(255, 205, 74, 0.08) inset;
  }
  .lyric-row.has-unsupported-character .text-input {
    color: #ffe08a;
    border-color: rgba(255, 205, 74, 0.5);
  }
  .lyric-row.dragging { opacity: 0.5; }
  .lyric-row.drop-over { border-color: rgba(127,227,216,0.6); box-shadow: 0 0 0 1px rgba(127,227,216,0.3) inset; }
  .lyric-row.just-added { animation: lyricRowAdded 1.2s ease-out; }
  @keyframes lyricRowAdded {
    0% { border-color: rgba(127,227,216,0.9); box-shadow: 0 0 0 2px rgba(127,227,216,0.28) inset, 0 0 20px rgba(127,227,216,0.18); }
    100% { border-color: rgba(127,227,216,0.3); box-shadow: none; }
  }
  .drag-handle {
    color: var(--ink-dim); font-size: 12px; text-align: center; cursor: grab;
    user-select: none; letter-spacing: 2px; line-height: 1;
  }
  .drag-handle:active { cursor: grabbing; }
  .time-input, .text-input {
    background: transparent; color: var(--ink);
    border: 1px solid rgba(255,255,255,0.08); padding: 6px 8px; border-radius: 8px;
    font-size: 13px; width: 100%; font-family: inherit;
  }
  .time-input { text-align: center; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
  .time-input:focus, .text-input:focus {
    outline: none; border-color: rgba(127,227,216,0.4); background: rgba(255,255,255,0.03);
  }
  .row-del {
    appearance: none; background: transparent; border: none;
    color: var(--ink-dim); cursor: pointer; padding: 6px 10px;
    border-radius: 6px; font-size: 14px;
  }
  .row-del:hover { color: var(--danger); background: rgba(255,138,154,0.08); }

  .add-row {
    margin-top: 10px; text-align: center; color: var(--ink-dim); font-size: 13px;
    padding: 8px; border-radius: var(--radius-sm); cursor: pointer;
    border: 1px dashed rgba(255,255,255,0.1);
  }
  .add-row:hover { color: var(--ink); border-color: rgba(255,255,255,0.2); }

  .player-preview {
    margin-top: 18px; padding: 14px; border-radius: var(--radius-md);
    background: rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.06);
    position: sticky; top: 0; z-index: 10; flex-shrink: 0;
  }
  .player-controls { display: flex; align-items: center; gap: 12px; }
  .play-btn {
    width: 38px; height: 38px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.12);
    background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
    color: #0b0b12; cursor: pointer; display: grid; place-items: center;
    box-shadow: 0 8px 24px -8px rgba(127,227,216,0.5); flex-shrink: 0;
  }
  .play-btn:hover { filter: brightness(1.08); }
  .scrubber { flex: 1; height: 4px; border-radius: 999px; background: rgba(255,255,255,0.08); position: relative; cursor: pointer; }
  .scrubber .fill { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, var(--accent-2), var(--accent-3)); border-radius: 999px; width: 0%; }
  .time-text { font-size: 12px; color: var(--ink-dim); font-variant-numeric: tabular-nums; min-width: 84px; text-align: right; }

  .compose-layout { display: grid; grid-template-columns: 360px 1fr; gap: 24px; flex: 1; min-height: 0; }
  @media (max-width: 960px) { .compose-layout { grid-template-columns: 1fr; } }
  .loops-panel { min-height: 0; }
  .loops-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; overflow-y: auto; padding-right: 4px; max-height: 420px; }
  .loop-card {
    position: relative; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; cursor: pointer;
    border: 1px solid rgba(255,255,255,0.08);
    transition: transform .15s ease, border-color .15s ease, box-shadow .2s ease;
  }
  .loop-card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.18); box-shadow: 0 16px 40px -20px rgba(0,0,0,0.8); }
  .loop-card.active { border-color: rgba(127, 227, 216, 0.7); box-shadow: 0 0 0 2px rgba(127, 227, 216, 0.15), 0 16px 40px -20px rgba(0,0,0,0.8); }
  .loop-card .preview {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, var(--loop-c1, #2a3a6b), var(--loop-c2, #6b2a66));
    background-image: var(--loop-image, linear-gradient(135deg, var(--loop-c1, #2a3a6b), var(--loop-c2, #6b2a66)));
    background-size: cover;
    background-position: var(--loop-pos, center);
    overflow: hidden;
  }
  .loop-card .preview.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--loop-pos, center);
    display: block;
    position: relative;
    z-index: 0;
  }
  .loop-card .preview::before {
    content: ""; position: absolute; inset: -20%;
    z-index: 1;
    background: radial-gradient(circle at 30% 40%, rgba(255,255,255,0.35), transparent 40%),
                radial-gradient(circle at 70% 60%, rgba(255,255,255,0.2), transparent 50%);
    mix-blend-mode: screen; animation: pulse 4s ease-in-out infinite;
  }
  .loop-card .preview::after {
    content: ""; position: absolute; inset: -30%;
    z-index: 2;
    background: repeating-linear-gradient(var(--loop-angle, 45deg), rgba(255,255,255,0.05) 0 2px, transparent 2px 14px);
    animation: slide 6s linear infinite;
  }
  .loop-card .preview.image-preview::before {
    background:
      radial-gradient(circle at 34% 35%, rgba(255,255,255,0.18), transparent 42%),
      linear-gradient(180deg, rgba(0,0,0,0.06), rgba(0,0,0,0.34));
    mix-blend-mode: normal;
    animation: pulse 5s ease-in-out infinite;
  }
  .loop-card .preview.image-preview::after {
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,0.42));
    animation: none;
  }
  .loop-card .preview.video-preview {
    background: #05060a;
  }
  .loop-card .preview.video-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .loop-card .preview.video-preview::before {
    background: linear-gradient(180deg, rgba(0,0,0,0.04), rgba(0,0,0,0.32));
    mix-blend-mode: normal;
    animation: none;
  }
  .loop-card .preview.video-preview::after {
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,0.38));
    animation: none;
  }
  .loop-card .preview.generated-preview {
    background:
      linear-gradient(135deg, #10103a, #04060d 48%, #20102d);
  }
  .loop-card .preview.generated-preview::before {
    background:
      radial-gradient(circle, rgba(255, 64, 190, 0.78) 0, rgba(255, 64, 190, 0.24) 38%, transparent 66%),
      radial-gradient(circle, rgba(42, 208, 255, 0.76) 0, rgba(42, 208, 255, 0.22) 40%, transparent 68%),
      radial-gradient(circle, rgba(255,255,255,0.18) 0, transparent 58%);
    background-size: 58% 76%, 62% 80%, 72% 72%;
    background-position: 18% 60%, 82% 42%, 50% 52%;
    background-repeat: no-repeat;
    animation: neonOrbPreview 7s ease-in-out infinite alternate;
    mix-blend-mode: screen;
  }
  .loop-card .preview.generated-preview::after {
    inset: -20%;
    background: radial-gradient(ellipse at 50% 52%, rgba(255,255,255,0.16), transparent 52%);
    animation: neonWavePreview 4s ease-in-out infinite alternate;
  }
  @keyframes pulse { 0%,100% { opacity: .6; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
  @keyframes slide { from { transform: translate(0,0); } to { transform: translate(-40px, -40px); } }
  @keyframes neonOrbPreview {
    0% { background-position: 18% 60%, 82% 42%, 50% 52%; opacity: .78; }
    50% { background-position: 24% 55%, 76% 48%, 51% 50%; opacity: .88; }
    100% { background-position: 20% 52%, 80% 39%, 50% 52%; opacity: .92; }
  }
  @keyframes neonWavePreview { from { transform: translateY(-5%) scaleX(0.96); opacity: .42; } to { transform: translateY(5%) scaleX(1.04); opacity: .66; } }
  .loop-card .preview.generated-preview.stars-preview {
    background: #000000;
  }
  .loop-card .preview.generated-preview.stars-preview::before {
    background:
      radial-gradient(2px 2px at 5% 15%, rgba(255,255,255,0.9), transparent),
      radial-gradient(1px 1px at 15% 25%, rgba(255,255,255,0.6), transparent),
      radial-gradient(2px 2px at 25% 10%, rgba(255,255,255,0.8), transparent),
      radial-gradient(1px 1px at 35% 30%, rgba(255,255,255,0.5), transparent),
      radial-gradient(2px 2px at 45% 18%, rgba(255,255,255,0.75), transparent),
      radial-gradient(1px 1px at 55% 35%, rgba(255,255,255,0.55), transparent),
      radial-gradient(2px 2px at 65% 12%, rgba(255,255,255,0.85), transparent),
      radial-gradient(1px 1px at 75% 28%, rgba(255,255,255,0.65), transparent),
      radial-gradient(2px 2px at 85% 20%, rgba(255,255,255,0.7), transparent),
      radial-gradient(1px 1px at 95% 32%, rgba(255,255,255,0.5), transparent),
      radial-gradient(2px 2px at 10% 55%, rgba(255,255,255,0.7), transparent),
      radial-gradient(1px 1px at 20% 65%, rgba(255,255,255,0.5), transparent),
      radial-gradient(2px 2px at 30% 58%, rgba(255,255,255,0.8), transparent),
      radial-gradient(1px 1px at 40% 68%, rgba(255,255,255,0.6), transparent),
      radial-gradient(2px 2px at 50% 55%, rgba(255,255,255,0.75), transparent),
      radial-gradient(1px 1px at 60% 70%, rgba(255,255,255,0.55), transparent),
      radial-gradient(2px 2px at 70% 62%, rgba(255,255,255,0.65), transparent),
      radial-gradient(1px 1px at 80% 75%, rgba(255,255,255,0.5), transparent),
      radial-gradient(2px 2px at 90% 68%, rgba(255,255,255,0.6), transparent),
      radial-gradient(2px 2px at 5% 85%, rgba(255,255,255,0.8), transparent),
      radial-gradient(1px 1px at 15% 92%, rgba(255,255,255,0.6), transparent),
      radial-gradient(2px 2px at 25% 88%, rgba(255,255,255,0.7), transparent),
      radial-gradient(1px 1px at 35% 95%, rgba(255,255,255,0.5), transparent),
      radial-gradient(2px 2px at 45% 82%, rgba(255,255,255,0.75), transparent),
      radial-gradient(1px 1px at 55% 92%, rgba(255,255,255,0.55), transparent),
      radial-gradient(2px 2px at 65% 88%, rgba(255,255,255,0.65), transparent),
      radial-gradient(1px 1px at 75% 95%, rgba(255,255,255,0.5), transparent),
      radial-gradient(2px 2px at 85% 82%, rgba(255,255,255,0.6), transparent),
      radial-gradient(1px 1px at 95% 90%, rgba(255,255,255,0.55), transparent);
    background-size: 100% 100%;
    animation: starsPreviewTwinkleLarge 3s ease-in-out infinite;
    mix-blend-mode: screen;
  }
  .loop-card .preview.generated-preview.stars-preview::after {
    background:
      radial-gradient(1px 1px at 8% 22%, rgba(180,210,255,0.7), transparent),
      radial-gradient(1px 1px at 18% 38%, rgba(200,230,255,0.5), transparent),
      radial-gradient(1px 1px at 28% 28%, rgba(180,210,255,0.6), transparent),
      radial-gradient(1px 1px at 38% 42%, rgba(200,230,255,0.4), transparent),
      radial-gradient(1px 1px at 48% 35%, rgba(180,210,255,0.55), transparent),
      radial-gradient(1px 1px at 58% 48%, rgba(200,230,255,0.45), transparent),
      radial-gradient(1px 1px at 68% 32%, rgba(180,210,255,0.5), transparent),
      radial-gradient(1px 1px at 78% 45%, rgba(200,230,255,0.4), transparent),
      radial-gradient(1px 1px at 88% 38%, rgba(180,210,255,0.45), transparent),
      radial-gradient(1px 1px at 12% 65%, rgba(200,230,255,0.6), transparent),
      radial-gradient(1px 1px at 22% 78%, rgba(180,210,255,0.4), transparent),
      radial-gradient(1px 1px at 32% 72%, rgba(200,230,255,0.55), transparent),
      radial-gradient(1px 1px at 42% 82%, rgba(180,210,255,0.45), transparent),
      radial-gradient(1px 1px at 52% 75%, rgba(200,230,255,0.5), transparent),
      radial-gradient(1px 1px at 62% 85%, rgba(180,210,255,0.4), transparent),
      radial-gradient(1px 1px at 72% 78%, rgba(200,230,255,0.45), transparent),
      radial-gradient(1px 1px at 82% 88%, rgba(180,210,255,0.5), transparent);
    background-size: 100% 100%;
    animation: starsPreviewTwinkleSmall 2.5s ease-in-out infinite;
    mix-blend-mode: screen;
  }
  @keyframes starsPreviewTwinkleLarge {
    0%, 100% { opacity: 0.4; }
    25% { opacity: 0.9; }
    50% { opacity: 0.3; }
    75% { opacity: 0.7; }
  }
  @keyframes starsPreviewTwinkleSmall {
    0%, 100% { opacity: 0.5; }
    33% { opacity: 0.8; }
    66% { opacity: 0.3; }
  }
  .loop-card .label {
    position: absolute; left: 10px; bottom: 10px;
    font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
    padding: 4px 8px; background: rgba(0,0,0,0.45); border-radius: 999px;
    backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,0.12);
  }
  .loop-card .check {
    position: absolute; right: 8px; top: 8px; width: 22px; height: 22px; border-radius: 50%;
    background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.2);
    display: grid; place-items: center; font-size: 12px; opacity: 0; transition: opacity .15s ease;
  }
  .loop-card.active .check { opacity: 1; }

  /* 问题7：预览框始终保持 16:9，内部 stage 根据选中比例 letterbox 显示 */
  .stage-wrapper {
    position: relative;
    border-radius: 0 0 0 0; overflow: hidden;
    border-top: 1px solid rgba(255,255,255,0.08);
    background: #0a0b12;
    aspect-ratio: 16 / 9;
    display: grid;
    place-items: center;
  }
  .stage {
    position: relative;
    border-radius: 8px; overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
    width: 100%;
    height: 100%;
    display: grid; place-items: center;
    container-type: size;
    transition: none;
  }
  /* 非 16:9 比例时：在 16:9 wrapper 内按实际比例 letterbox 显示 */
  .stage[data-ratio="9/16"] { aspect-ratio: 9 / 16; width: auto; height: 100%; }
  .stage[data-ratio="1/1"]  { aspect-ratio: 1 / 1;  width: auto; height: 100%; }
  .stage .bg {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, #2a3a6b, #6b2a66);
    background-size: cover;
    background-position: center;
    transition: background 0.6s ease;
  }
  .stage .stage-motion-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    display: none;
    pointer-events: none;
  }
  .stage.canvas-motion-active .stage-motion-canvas { display: block; }
  .stage.canvas-motion-active .bg,
  .stage.canvas-motion-active .background-dimmer { visibility: hidden; }
  .stage .background-dimmer {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: rgba(10,12,16,0);
    transition: background-color .2s ease;
  }
  .stage.preset-dimmed .background-dimmer {
    background: rgba(10,12,16,var(--preset-dim-alpha, 0.16));
  }
  .stage .bg::before, .stage .bg::after {
    content: ""; position: absolute; inset: -10%;
    background: radial-gradient(circle at 30% 40%, rgba(255,255,255,0.35), transparent 45%),
                radial-gradient(circle at 70% 60%, rgba(255,255,255,0.22), transparent 55%);
    mix-blend-mode: screen; animation: pulse 5s ease-in-out infinite;
  }
  .stage .bg::after { background: repeating-linear-gradient(45deg, rgba(255,255,255,0.06) 0 2px, transparent 2px 16px); animation: slide 8s linear infinite; }
  .stage .bg.image-loop {
    background-position: center, var(--loop-pos-a, 50% 50%);
    background-size: cover, cover;
    animation: none;
  }
  .stage .bg.image-loop::before {
    background: linear-gradient(180deg, rgba(0,0,0,var(--loop-overlay-top, 0.10)), rgba(0,0,0,var(--loop-overlay-bottom, 0.30)));
    mix-blend-mode: normal;
    animation: none;
  }
  .stage .bg.image-loop::after {
    inset: 0;
    background: radial-gradient(circle at 50% 50%, transparent 48%, rgba(0,0,0,0.32));
    animation: none;
  }
  .stage .bg.motion-coast::before {
    inset: 0;
    background: radial-gradient(ellipse at 50% 74%, rgba(255,235,180,0.22), transparent 48%);
    mix-blend-mode: screen;
    animation: coastWater 3.4s ease-in-out infinite;
  }
  .stage .bg.motion-coast::after {
    inset: -12% -18% 0;
    background:
      radial-gradient(ellipse at 28% 24%, rgba(255,255,255,0.20), transparent 24%),
      radial-gradient(ellipse at 64% 20%, rgba(255,230,230,0.16), transparent 28%);
    filter: blur(8px);
    animation: cloudDrift 12s ease-in-out infinite alternate;
  }
  .stage .bg.motion-smoke::before {
    inset: -22%;
    background:
      radial-gradient(ellipse at 30% 64%, rgba(255,255,255,0.28), transparent 34%),
      radial-gradient(ellipse at 58% 36%, rgba(255,255,255,0.24), transparent 35%),
      radial-gradient(ellipse at 78% 58%, rgba(255,255,255,0.20), transparent 32%);
    filter: blur(18px);
    mix-blend-mode: screen;
    animation: smokeCurl 7s ease-in-out infinite alternate;
  }
  .stage .bg.motion-smoke::after {
    inset: -8%;
    background: radial-gradient(ellipse at 50% 50%, transparent 36%, rgba(0,0,0,0.38));
  }
  .stage .bg.motion-film::before {
    inset: 0;
    background:
      radial-gradient(circle at 20% 30%, rgba(0,0,0,0.08) 0 1px, transparent 2px),
      radial-gradient(circle at 70% 60%, rgba(255,255,255,0.12) 0 1px, transparent 2px),
      repeating-radial-gradient(circle at 50% 50%, rgba(0,0,0,0.05) 0 1px, transparent 1px 5px);
    background-size: 17px 17px, 23px 23px, 31px 31px;
    opacity: .58;
    animation: filmNoise .45s steps(2, end) infinite;
  }
  .stage .bg.motion-film::after {
    inset: -6% 8%;
    background: repeating-linear-gradient(90deg, transparent 0 28px, rgba(90,52,20,0.18) 29px 30px, transparent 31px 72px);
    animation: filmScratch 3.4s steps(4, end) infinite;
  }
  .stage .bg.motion-rock::before {
    display: none;
  }
  .stage .bg.motion-rock::after {
    inset: -8%;
    background:
      linear-gradient(116deg, transparent 35%, rgba(255,255,255,0.78) 36%, transparent 38%),
      linear-gradient(132deg, transparent 53%, rgba(230,0,24,0.68) 54%, transparent 57%),
      radial-gradient(circle at 28% 62%, rgba(255,0,24,0.42), transparent 30%);
    mix-blend-mode: screen;
    animation: rockPulse 1.8s ease-in-out infinite;
  }
  .stage .bg.motion-ink::before {
    inset: -20%;
    background:
      radial-gradient(ellipse at 34% 42%, rgba(65,65,65,0.22), transparent 36%),
      radial-gradient(ellipse at 58% 48%, rgba(100,100,100,0.16), transparent 44%);
    filter: blur(16px);
    animation: inkCloud 10s ease-in-out infinite alternate;
  }
  .stage .bg.motion-ink::after {
    inset: -12%;
    background:
      radial-gradient(ellipse at 40% 52%, rgba(255,255,255,0.30), transparent 46%),
      radial-gradient(ellipse at 62% 44%, rgba(255,255,255,0.18), transparent 38%);
    filter: blur(10px);
    animation: inkMist 8s ease-in-out infinite alternate;
  }
  .stage .bg.generated-loop {
    background:
      linear-gradient(135deg, #10103a, #04060d 48%, #20102d);
  }
  .stage .bg.generated-loop::before {
    inset: -10%;
    background: radial-gradient(ellipse at 50% 52%, rgba(255,255,255,0.12), transparent 52%);
    filter: blur(10px);
    mix-blend-mode: screen;
    animation: neonWave 8s ease-in-out infinite alternate;
  }
  .stage .bg.generated-loop::after {
    inset: 0;
    background:
      radial-gradient(ellipse at 50% 52%, rgba(255,255,255,0.10), transparent 42%),
      radial-gradient(circle at 50% 50%, transparent 42%, rgba(0,0,0,0.38));
    animation: neonWave 6s ease-in-out infinite alternate;
  }
  .stage .neon-orb,
  .stage .neon-soft-wave {
    display: none;
    position: absolute;
    pointer-events: none;
    z-index: 1;
    mix-blend-mode: screen;
  }
  .stage.neon-active .neon-orb,
  .stage.neon-active .neon-soft-wave { display: block; }
  .stage .neon-orb.pink {
    width: 62%;
    height: 80%;
    left: -8%;
    top: 20%;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255,64,190,0.74) 0, rgba(255,64,190,0.25) 38%, transparent 68%);
    filter: blur(18px);
    animation: neonPinkOrb 14s ease-in-out infinite;
  }
  .stage .neon-orb.blue {
    width: 66%;
    height: 84%;
    right: -10%;
    top: 8%;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(42,208,255,0.72) 0, rgba(42,208,255,0.23) 40%, transparent 70%);
    filter: blur(18px);
    animation: neonBlueOrb 15s ease-in-out infinite;
  }
  .stage .neon-soft-wave {
    inset: -8%;
    background: radial-gradient(ellipse at 50% 54%, rgba(255,255,255,0.11), transparent 46%);
    filter: blur(8px);
    animation: neonWave 8s ease-in-out infinite alternate;
  }
  @keyframes coastWater { 0%,100% { transform: translateY(0) scale(1); opacity: .42; } 50% { transform: translateY(1.8%) scale(1.04); opacity: .68; } }
  @keyframes cloudDrift { from { transform: translateX(-7%) translateY(0); opacity: .58; } to { transform: translateX(8%) translateY(4%); opacity: .82; } }
  @keyframes smokeCurl { from { transform: translate(-12%, 6%) rotate(-4deg) scale(1); opacity: .46; } to { transform: translate(12%, -6%) rotate(5deg) scale(1.16); opacity: .78; } }
  @keyframes filmNoise { from { transform: translate(0,0); opacity: .42; } to { transform: translate(12px, -10px); opacity: .72; } }
  @keyframes filmScratch { from { transform: translateX(-3%); opacity: .26; } to { transform: translateX(4%); opacity: .50; } }
  @keyframes rockPulse { 0%,100% { transform: translate(0,0); opacity: .34; } 50% { transform: translate(.35%, -.3%); opacity: .62; } }
  @keyframes inkCloud { from { transform: translateX(-14%) translateY(3%) scale(1); opacity: .54; } to { transform: translateX(14%) translateY(-3%) scale(1.16); opacity: .82; } }
  @keyframes inkMist { from { transform: translateX(8%) translateY(-2%); opacity: .38; } to { transform: translateX(-10%) translateY(3%); opacity: .70; } }
  @keyframes neonPinkOrb {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: .78; }
    33% { transform: translate(12%, -5%) scale(1.04); opacity: .92; }
    66% { transform: translate(7%, 8%) scale(1.02); opacity: .84; }
  }
  @keyframes neonBlueOrb {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: .76; }
    34% { transform: translate(-12%, 5%) scale(1.03); opacity: .90; }
    68% { transform: translate(-7%, -8%) scale(1.04); opacity: .82; }
  }
  @keyframes neonWave { from { transform: translateY(-4%) scaleX(.96); opacity: .42; } to { transform: translateY(5%) scaleX(1.05); opacity: .68; } }
  .stage .star-layer {
    display: none;
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
  }
  .stage.stars-active .star-layer { display: block; }
  .stage .star-layer::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
      radial-gradient(3px 3px at 5% 10%, rgba(255,255,255,0.9), transparent),
      radial-gradient(2px 2px at 12% 25%, rgba(255,255,255,0.7), transparent),
      radial-gradient(3px 3px at 25% 8%, rgba(255,255,255,0.8), transparent),
      radial-gradient(2px 2px at 38% 22%, rgba(255,255,255,0.6), transparent),
      radial-gradient(3px 3px at 52% 15%, rgba(255,255,255,0.75), transparent),
      radial-gradient(2px 2px at 65% 28%, rgba(255,255,255,0.55), transparent),
      radial-gradient(3px 3px at 78% 12%, rgba(255,255,255,0.85), transparent),
      radial-gradient(2px 2px at 90% 20%, rgba(255,255,255,0.65), transparent),
      radial-gradient(3px 3px at 8% 45%, rgba(255,255,255,0.7), transparent),
      radial-gradient(2px 2px at 20% 55%, rgba(255,255,255,0.5), transparent),
      radial-gradient(3px 3px at 35% 48%, rgba(255,255,255,0.8), transparent),
      radial-gradient(2px 2px at 50% 52%, rgba(255,255,255,0.6), transparent),
      radial-gradient(3px 3px at 65% 45%, rgba(255,255,255,0.75), transparent),
      radial-gradient(2px 2px at 80% 58%, rgba(255,255,255,0.55), transparent),
      radial-gradient(3px 3px at 92% 48%, rgba(255,255,255,0.65), transparent),
      radial-gradient(3px 3px at 10% 72%, rgba(255,255,255,0.8), transparent),
      radial-gradient(2px 2px at 22% 82%, rgba(255,255,255,0.6), transparent),
      radial-gradient(3px 3px at 38% 75%, rgba(255,255,255,0.7), transparent),
      radial-gradient(2px 2px at 52% 85%, rgba(255,255,255,0.5), transparent),
      radial-gradient(3px 3px at 68% 78%, rgba(255,255,255,0.75), transparent),
      radial-gradient(2px 2px at 82% 88%, rgba(255,255,255,0.55), transparent),
      radial-gradient(3px 3px at 95% 75%, rgba(255,255,255,0.65), transparent);
    background-size: 100% 100%;
    animation: starsTwinkleLarge 3s ease-in-out infinite;
  }
  .stage .star-layer::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
      radial-gradient(1px 1px at 3% 18%, rgba(255,255,255,0.6), transparent),
      radial-gradient(1px 1px at 7% 35%, rgba(255,255,255,0.4), transparent),
      radial-gradient(1px 1px at 15% 12%, rgba(255,255,255,0.5), transparent),
      radial-gradient(1px 1px at 20% 42%, rgba(255,255,255,0.35), transparent),
      radial-gradient(1px 1px at 28% 18%, rgba(255,255,255,0.55), transparent),
      radial-gradient(1px 1px at 35% 32%, rgba(255,255,255,0.45), transparent),
      radial-gradient(1px 1px at 42% 15%, rgba(255,255,255,0.6), transparent),
      radial-gradient(1px 1px at 50% 38%, rgba(255,255,255,0.4), transparent),
      radial-gradient(1px 1px at 58% 22%, rgba(255,255,255,0.5), transparent),
      radial-gradient(1px 1px at 65% 35%, rgba(255,255,255,0.35), transparent),
      radial-gradient(1px 1px at 72% 18%, rgba(255,255,255,0.55), transparent),
      radial-gradient(1px 1px at 80% 42%, rgba(255,255,255,0.45), transparent),
      radial-gradient(1px 1px at 88% 15%, rgba(255,255,255,0.6), transparent),
      radial-gradient(1px 1px at 95% 32%, rgba(255,255,255,0.4), transparent),
      radial-gradient(1px 1px at 2% 60%, rgba(255,255,255,0.5), transparent),
      radial-gradient(1px 1px at 10% 75%, rgba(255,255,255,0.35), transparent),
      radial-gradient(1px 1px at 18% 55%, rgba(255,255,255,0.55), transparent),
      radial-gradient(1px 1px at 25% 70%, rgba(255,255,255,0.45), transparent),
      radial-gradient(1px 1px at 33% 58%, rgba(255,255,255,0.6), transparent),
      radial-gradient(1px 1px at 40% 72%, rgba(255,255,255,0.4), transparent),
      radial-gradient(1px 1px at 48% 62%, rgba(255,255,255,0.5), transparent),
      radial-gradient(1px 1px at 55% 78%, rgba(255,255,255,0.35), transparent),
      radial-gradient(1px 1px at 63% 65%, rgba(255,255,255,0.55), transparent),
      radial-gradient(1px 1px at 70% 75%, rgba(255,255,255,0.45), transparent),
      radial-gradient(1px 1px at 78% 60%, rgba(255,255,255,0.6), transparent),
      radial-gradient(1px 1px at 85% 72%, rgba(255,255,255,0.4), transparent),
      radial-gradient(1px 1px at 92% 65%, rgba(255,255,255,0.5), transparent),
      radial-gradient(1px 1px at 5% 90%, rgba(255,255,255,0.55), transparent),
      radial-gradient(1px 1px at 15% 88%, rgba(255,255,255,0.45), transparent),
      radial-gradient(1px 1px at 25% 92%, rgba(255,255,255,0.6), transparent),
      radial-gradient(1px 1px at 35% 85%, rgba(255,255,255,0.4), transparent),
      radial-gradient(1px 1px at 45% 90%, rgba(255,255,255,0.5), transparent),
      radial-gradient(1px 1px at 55% 88%, rgba(255,255,255,0.35), transparent),
      radial-gradient(1px 1px at 65% 92%, rgba(255,255,255,0.55), transparent),
      radial-gradient(1px 1px at 75% 85%, rgba(255,255,255,0.45), transparent),
      radial-gradient(1px 1px at 85% 90%, rgba(255,255,255,0.6), transparent),
      radial-gradient(1px 1px at 95% 88%, rgba(255,255,255,0.4), transparent);
    background-size: 100% 100%;
    animation: starsTwinkleSmall 2.5s ease-in-out infinite;
  }
  .stage .star-layer .stars-blue {
    position: absolute;
    inset: 0;
    background-image:
      radial-gradient(2px 2px at 6% 28%, rgba(180,210,255,0.7), transparent),
      radial-gradient(2px 2px at 18% 48%, rgba(200,230,255,0.5), transparent),
      radial-gradient(2px 2px at 32% 38%, rgba(180,210,255,0.6), transparent),
      radial-gradient(2px 2px at 48% 58%, rgba(200,230,255,0.4), transparent),
      radial-gradient(2px 2px at 62% 42%, rgba(180,210,255,0.55), transparent),
      radial-gradient(2px 2px at 78% 52%, rgba(200,230,255,0.45), transparent),
      radial-gradient(2px 2px at 92% 38%, rgba(180,210,255,0.5), transparent),
      radial-gradient(2px 2px at 10% 78%, rgba(200,230,255,0.6), transparent),
      radial-gradient(2px 2px at 25% 88%, rgba(180,210,255,0.4), transparent),
      radial-gradient(2px 2px at 40% 72%, rgba(200,230,255,0.55), transparent),
      radial-gradient(2px 2px at 55% 82%, rgba(180,210,255,0.45), transparent),
      radial-gradient(2px 2px at 70% 75%, rgba(200,230,255,0.5), transparent),
      radial-gradient(2px 2px at 85% 85%, rgba(180,210,255,0.4), transparent),
      radial-gradient(1px 1px at 12% 15%, rgba(220,240,255,0.5), transparent),
      radial-gradient(1px 1px at 28% 22%, rgba(200,220,255,0.35), transparent),
      radial-gradient(1px 1px at 42% 18%, rgba(220,240,255,0.45), transparent),
      radial-gradient(1px 1px at 58% 25%, rgba(200,220,255,0.4), transparent),
      radial-gradient(1px 1px at 72% 12%, rgba(220,240,255,0.5), transparent),
      radial-gradient(1px 1px at 88% 20%, rgba(200,220,255,0.35), transparent);
    background-size: 100% 100%;
    animation: starsTwinkleBlue 4s ease-in-out infinite;
  }
  @keyframes starsTwinkleLarge {
    0%, 100% { opacity: 0.4; }
    25% { opacity: 0.9; }
    50% { opacity: 0.3; }
    75% { opacity: 0.7; }
  }
  @keyframes starsTwinkleSmall {
    0%, 100% { opacity: 0.5; }
    33% { opacity: 0.8; }
    66% { opacity: 0.3; }
  }
  @keyframes starsTwinkleBlue {
    0%, 100% { opacity: 0.4; }
    20% { opacity: 0.8; }
    40% { opacity: 0.3; }
    60% { opacity: 0.7; }
    80% { opacity: 0.4; }
  }
  /* ============ 5 种字幕风格专用样式 ============ */
  .subtitle {
    position: absolute; left: 8%; right: 8%; bottom: 15%; text-align: center;
    --subtitle-font-scale: 1;
    font-weight: 700; font-size: calc(7cqmin * var(--subtitle-font-scale)); letter-spacing: 0.04em;
    color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,0.6), 0 0 40px rgba(0,0,0,0.4);
    min-height: 1.4em; pointer-events: none;
    z-index: 3;
  }
  .stage[data-ratio="1/1"] .subtitle { --subtitle-font-scale: 0.97; }
  .stage[data-ratio="9/16"] .subtitle { --subtitle-font-scale: 0.98; }

  /* effect-0 国风竖排：宋体 · 竖排居中 · 背景大字（毛笔字体，发光晕染） */
  /* 问题1/2：主文字 font-family 与 Canvas 完全一致 */
  .subtitle.effect-0 {
    top: 50%; bottom: auto; transform: translateY(-50%);
    font-family: "VJ Noto Serif SC", "VJ Noto Sans SC", "VJ Noto Sans KR", "VJ Noto Sans Symbols 2", "VJ Noto Emoji", serif;
    font-weight: 500; letter-spacing: 0.1em;
    line-height: 1.18;
    font-size: calc(5.5cqmin * var(--subtitle-font-scale));
    color: #fff;
  }
  /* 背景大字字体：宋体，与 Canvas brushFont 完全一致 */
  .subtitle.effect-0 .big-bg-chars {
    position: absolute; inset: 0;
    font-size: calc(28cqmin * var(--subtitle-font-scale)); font-weight: 700;
    pointer-events: none; z-index: -1;
    font-family: "VJ Noto Serif SC", "VJ Noto Sans SC", "VJ Noto Sans KR", "VJ Noto Sans Symbols 2", "VJ Noto Emoji", serif;
  }
  /* 背景大字：冷白填充 + 白色光晕 */
  /* 给 span 设置固定的 1em 宽高，确保不同字符的大字位置一致（不随字形变化） */
  /* 第一个字左上角对齐 (left:10%, top:10%)，第二个字右下角对齐 (right:8%, bottom:12%) */
  .subtitle.effect-0 .big-bg-chars span {
    position: absolute;
    width: 1em;
    height: 1em;
    color: rgba(255, 255, 255, 0.24);
    text-shadow:
      0 0 8px rgba(255, 255, 255, 0.48),
      0 0 24px rgba(225, 245, 255, 0.36),
      0 0 60px rgba(190, 225, 255, 0.24);
  }
  /* span:nth-child(1): 左上角在 left:10% top:10%，字从该点向右下绘制 */
  .subtitle.effect-0 .big-bg-chars span:nth-child(1) {
    left: 10%; top: 10%; opacity: 0.85;
  }
  /* span:nth-child(2): 右下角在 right:8% bottom:12%，字从该点向左上延伸 */
  .subtitle.effect-0 .big-bg-chars span:nth-child(2) {
    right: 8%; bottom: 12%;
    text-align: right;
    line-height: 1;
    opacity: 0.75;
  }
  /* 单列：竖排 flex，字间距保持一致 */
  .subtitle.effect-0 .vchars {
    display: flex; justify-content: center; align-items: flex-start; gap: 10px;
  }
  .subtitle.effect-0 .vcol {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
  }
  .subtitle.effect-0 .vcol span {
    font-size: calc(5.5cqmin * var(--subtitle-font-scale));
    font-weight: 500;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7), 0 0 12px rgba(255,230,180,0.2);
  }
  /* 双列：两列靠近居中，右列向下偏移，形成错落感 */
  .subtitle.effect-0.two-col .vcol-offset { margin-top: 12cqmin; }
  .subtitle.effect-0.two-col .vchars { gap: 3cqmin; }

  /* effect-1 三行滚动：黑体 · 灰色描边 · 上方居中 · 3 行 */
  /* 字体族与 Canvas 完全一致。 */
  .subtitle.effect-1 {
    top: 13%;
    bottom: auto;
    font-family: "VJ Noto Sans SC", "VJ Noto Sans KR", "VJ Noto Sans Symbols 2", "VJ Noto Emoji", sans-serif;
    font-weight: 700; line-height: 1.3;
    display: flex; flex-direction: column; align-items: center; gap: 0;
  }
  .subtitle.effect-1 .line {
    font-size: calc(5.5cqmin * var(--subtitle-font-scale));
    color: #fff;
    -webkit-text-stroke: 0.5px rgba(120,120,130,0.9);
    text-shadow: 0 1px 0 rgba(100,100,110,0.8), 0 2px 10px rgba(0,0,0,0.55);
    opacity: 0.56;
    line-height: 1.3;
  }
  .subtitle.effect-1 .line.active {
    font-size: calc(6.3cqmin * var(--subtitle-font-scale));
    opacity: 1;
    -webkit-text-stroke: 0.5px rgba(140,140,150,0.7);
    text-shadow: 0 2px 0 rgba(90,90,100,0.6), 0 4px 14px rgba(0,0,0,0.7);
  }
  /* effect-2 整屏倾斜：微软雅黑 · 向左倾斜 · 绿色高亮当前行 */
  /* 问题5：横向扩充，right从40%改为20%，可放下约15个汉字再断行 */
  .subtitle.effect-2 {
    font-family: "VJ Noto Sans SC", "VJ Noto Sans KR", "VJ Noto Sans Symbols 2", "VJ Noto Emoji", sans-serif;
    text-align: left; left: 6%; right: 20%; top: 22%; bottom: 22%;
    display: flex; flex-direction: column; justify-content: center; gap: 16px;
    transform: rotate(-2deg);
    transform-origin: 50% 50%;
    font-weight: 400; line-height: 1.3;
  }
  .subtitle.effect-2 .line {
    font-size: calc(3.8cqmin * var(--subtitle-font-scale));
    color: rgba(245,245,250,0.76);
    text-shadow: 0 2px 12px rgba(0,0,0,0.45);
    /* 中文不主动在字间断开：只有整句超过容器宽度时，才在右侧红色框处断到下一行 */
    word-break: keep-all;
    overflow-wrap: anywhere;
    white-space: normal;
  }
  .subtitle.effect-2 .line.active {
    font-size: calc(6.2cqmin * var(--subtitle-font-scale)); font-weight: 700;
    background: linear-gradient(180deg, #e8fff4, #42d4a4 60%, #2ebf8e);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    text-shadow: 0 0 20px rgba(66,212,164,0.55);
  }
  /* effect-3 黄色宋体 · 经典复古：黄色填充 + 橘色阴影（无描边） */
  .subtitle.effect-3 {
    font-family: "VJ Noto Serif SC", "VJ Noto Sans SC", "VJ Noto Sans KR", "VJ Noto Sans Symbols 2", "VJ Noto Emoji", serif;
    font-weight: 700;
  }
  .subtitle.effect-3 .line {
    color: #ffd44a;
    /* 纯橘色阴影：文字看起来有立体感，不是描边 */
    text-shadow:
      0.045em 0.055em 0 rgba(190, 72, 18, 0.96),
      0.075em 0.085em 0.025em rgba(120, 40, 10, 0.68);
    font-size: calc(7cqmin * var(--subtitle-font-scale));
    letter-spacing: 0.05em;
    word-break: break-all;
    overflow-wrap: break-word;
  }

  /* effect-4 发光圆体：圆体 · 白色 · 纯白光晕 · 字号适中 */
  /* 问题2/3/7：字体族与 Canvas 完全一致，位置居中（bottom:auto 覆盖基础样式的 bottom:15%） */
  .subtitle.effect-4 {
    font-family: "VJ LXGW 975 Yuan SC", "VJ Noto Sans SC", "VJ Noto Sans KR", "VJ Noto Sans Symbols 2", "VJ Noto Emoji", sans-serif;
    font-weight: 700;
    top: 45%;
    bottom: auto;
    transform: translateY(-50%);
  }
  .subtitle.effect-4 .line {
    color: #fff;
    text-shadow:
      0 0 0.8cqmin rgba(255,255,255,0.95),
      0 0 2.2cqmin rgba(255,255,255,0.80),
      0 0 4.8cqmin rgba(255,255,255,0.55),
      0 0 8cqmin rgba(255,240,210,0.40),
      0 0.4cqmin 1cqmin rgba(0,0,0,0.5);
    font-size: calc(7cqmin * var(--subtitle-font-scale));
    letter-spacing: 0.06em;
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
  }
  .subtitle-render {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    transform-origin: 50% 50%;
    will-change: transform, opacity;
  }
  .subtitle-render canvas {
    display: block;
    width: 100%;
    height: 100%;
  }
  .subtitle-render .subtitle {
    position: absolute !important;
    inset: 0 !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0;
    text-align: initial;
    letter-spacing: 0;
    transform: none;
  }
  .stage-overlay-top {
    position: absolute; top: 14px; left: 14px; display: flex; align-items: center; gap: 10px;
    padding: 6px 12px; border-radius: 999px; background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.1); font-size: 12px; color: var(--ink-soft);
    backdrop-filter: blur(8px); z-index: 2;
  }
  .red-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff5a5a; box-shadow: 0 0 10px #ff5a5a; animation: blink 1.2s infinite; }
  @keyframes blink { 50% { opacity: .4; } }

  .compose-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; gap: 10px; flex-wrap: wrap; }
  .chip-group { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
  .chip {
    padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04); cursor: pointer; font-size: 13px; color: var(--ink-soft);
    display: inline-flex; align-items: center; justify-content: center; text-align: center;
    line-height: 1;
  }
  .chip.active {
    background: linear-gradient(135deg, rgba(127,227,216,0.18), rgba(232,152,255,0.18));
    color: var(--ink); border-color: rgba(127,227,216,0.4);
  }
  .bg-upload-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 26px;
  }
  .bg-upload-info {
    flex: 1;
    min-width: 160px;
    text-align: right;
    margin-bottom: 0 !important;
  }
  .ratio-bar {
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
  }
  .ratio-row {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
  }
  .ratio-title {
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
    text-align: center;
  }
  .ratio-options {
    justify-content: center;
    margin-top: 0;
    gap: 12px;
  }
  .ratio-options .chip {
    min-width: 68px;
    justify-content: center;
    padding: 9px 18px;
    font-size: 14px;
  }

  .export-overlay { position: fixed; inset: 0; background: rgba(5,6,10,0.6); backdrop-filter: blur(12px); display: none; align-items: center; justify-content: center; z-index: 50; }
  .export-overlay.show { display: flex; }
  .export-card {
    width: min(460px, 92vw); background: var(--panel); border: 1px solid var(--panel-stroke);
    border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-lg);
  }
  .export-card h3 { margin: 0 0 12px; }
  .export-card .sub { color: var(--ink-dim); font-size: 13px; }
  .export-card .progress-wrap {
    position: relative; height: 10px; background: rgba(255,255,255,0.06);
    border-radius: 999px; overflow: hidden; margin-top: 8px;
  }
  .export-card .progress-bar {
    height: 100%; width: 0%; background: linear-gradient(90deg, #7fe3d8, #8ab4ff);
    border-radius: 999px; transition: width 0.25s ease;
  }
  .export-card .progress-meta {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 12px; font-size: 13px; color: var(--ink-soft);
  }
  .export-card .progress-meta .pct { color: var(--ink); font-weight: 600; font-size: 14px; }
  /* 冷笑话与时间之间加一条明显的浅灰色分割线 + 固定高度防止第二句显示时导出框变大 */
  .export-card .export-tip {
    margin-top: 28px;
    padding-top: 20px;
    padding-bottom: 10px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 13px;
    line-height: 1.8;
    color: var(--ink-soft);
    animation: fadeJoke 0.4s ease;
  }
  .export-card .export-tip .tip-line { display: block; }
  .export-card .export-tip .tip-line:first-child { color: var(--ink); font-size: 14px; font-weight: 600; }
  .export-card .export-tip .tip-line:nth-child(2) { margin-top: 6px; color: var(--accent-3); font-weight: 500; }
  .export-card .export-tip .tip-line:nth-child(3) { margin-top: 8px; color: var(--ink-dim); font-size: 12px; }
  .export-card .joke-area {
    margin-top: 12px;
    padding-top: 12px;
    padding-bottom: 10px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 13px;
    line-height: 1.8;
    color: var(--ink-soft);
    transition: opacity 0.35s ease;
    height: 80px;
    box-sizing: border-box;
    overflow: hidden;
  }
  .export-card .joke-area .line { display: block; animation: fadeJoke 0.4s ease; }
  .export-card .joke-area .line:first-child { color: var(--ink); font-size: 14px; font-weight: 600; }
  .export-card .joke-area .line + .line { margin-top: 6px; color: var(--accent-3); font-weight: 600; }
  @keyframes fadeJoke {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .recharge-overlay {
    position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center;
    padding: 24px; background: rgba(3,4,8,.72); backdrop-filter: blur(16px);
  }
  .recharge-overlay.show { display: flex; }
  .recharge-card {
    width: min(520px, calc(100vw - 48px)); max-height: calc(100vh - 48px); overflow-y: auto;
    border-radius: 24px; padding: 24px;
    background: linear-gradient(160deg, rgba(26,28,38,.98), rgba(12,13,20,.98));
    border: 1px solid rgba(255,255,255,.12); box-shadow: 0 32px 90px rgba(0,0,0,.55);
  }
  .recharge-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
  .recharge-head h3 { margin: 0; font-size: 20px; }
  .recharge-head p { margin: 6px 0 0; color: var(--ink-dim); font-size: 13px; }
  .icon-btn {
    appearance: none; width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
    border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.05);
    color: var(--ink-soft); font-size: 20px; line-height: 1;
  }
  .recharge-quantity-label { margin-top: 26px; color: var(--ink-soft); font-size: 13px; }
  .quantity-control {
    margin-top: 10px; display: grid; grid-template-columns: 46px 1fr 46px; gap: 10px; align-items: center;
  }
  .quantity-control button {
    width: 46px; height: 46px; border-radius: 15px; border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.055); color: var(--ink); font-size: 22px; cursor: pointer;
  }
  .quantity-control input {
    width: 100%; height: 46px; box-sizing: border-box; border-radius: 15px; text-align: center;
    border: 1px solid rgba(127,227,216,.22); outline: none; color: var(--ink);
    background: rgba(127,227,216,.055); font: 700 20px/1 inherit;
    appearance: textfield; -moz-appearance: textfield;
  }
  .quantity-control input::-webkit-inner-spin-button,
  .quantity-control input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
  .price-panel {
    margin-top: 20px; padding: 18px; border-radius: 18px; background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.075);
  }
  .discount-badge {
    display: none; width: fit-content; padding: 5px 9px; border-radius: 999px;
    color: #07110f; background: var(--accent-2); font-size: 12px; font-weight: 800;
  }
  .discount-badge.show { display: inline-flex; }
  .price-line { margin-top: 12px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
  .current-price { font-size: 28px; line-height: 1; font-weight: 800; color: #fff; }
  .current-price small { color: var(--accent-2); font-size: 13px; font-weight: 700; }
  .original-price { color: var(--ink-dim); font-size: 13px; text-decoration: line-through; }
  .arrival-row {
    display: flex; align-items: center; justify-content: space-between; margin-top: 18px;
    padding-top: 16px; border-top: 1px solid rgba(255,255,255,.075);
  }
  .arrival-label { color: var(--ink-dim); font-size: 13px; }
  .arrival-value { font-size: 22px; font-weight: 800; }
  .arrival-value span { color: var(--accent-2); }
  .recharge-limit { margin-top: 12px; color: var(--ink-dim); font-size: 12px; }
  .recharge-message { min-height: 20px; margin-top: 12px; color: var(--accent-warm); font-size: 12px; }
  .recharge-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
  .wallet-tabs {
    display: flex; gap: 4px; margin-top: 22px; padding: 4px; border-radius: 12px;
    background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.065);
  }
  .wallet-tab {
    appearance: none; flex: 1; min-height: 34px; border: 0; border-radius: 9px;
    color: var(--ink-dim); background: transparent; cursor: pointer; font: 600 12px/1 inherit;
  }
  .wallet-tab.active { color: var(--ink); background: rgba(255,255,255,.09); }
  .wallet-view[hidden] { display: none; }
  .wallet-section { animation: fadeUp .24s ease both; }
  .wallet-caption {
    margin-top: 14px; color: var(--ink-dim); font-size: 12px; line-height: 1.65;
  }
  .checkout-summary {
    margin-top: 24px; padding: 18px; border-radius: 18px;
    background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.075);
  }
  .checkout-product { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; }
  .checkout-product-icon {
    width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center;
    border-radius: 13px; color: #06100e; font-size: 22px; font-weight: 900;
    background: linear-gradient(135deg, var(--accent-2), #d7fff8);
    box-shadow: 0 10px 28px rgba(127,227,216,.16);
  }
  .checkout-product-name { font-size: 14px; font-weight: 700; }
  .checkout-product-sub { margin-top: 4px; color: var(--ink-dim); font-size: 12px; }
  .checkout-row {
    display: flex; align-items: center; justify-content: space-between; gap: 18px;
    padding: 10px 0; border-top: 1px solid rgba(255,255,255,.065);
    color: var(--ink-soft); font-size: 13px;
  }
  .checkout-row strong { color: var(--ink); font-size: 14px; }
  .checkout-row.muted-row { color: var(--ink-dim); }
  .checkout-row.muted-row strong { color: var(--ink-dim); text-decoration: line-through; font-weight: 500; }
  .checkout-row.discount-row strong { color: var(--accent-2); }
  .checkout-discount-detail {
    display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap;
  }
  .checkout-promotion-meta {
    padding: 3px 7px; border-radius: 999px; color: #07110f; background: var(--accent-2);
    font-size: 11px; font-weight: 800; line-height: 1.35;
  }
  .checkout-row.total-row { margin-top: 4px; padding-top: 16px; }
  .checkout-row.total-row strong { font-size: 24px; }
  .payment-method-title { margin-top: 22px; color: var(--ink-soft); font-size: 13px; }
  .payment-method {
    margin-top: 10px; display: flex; align-items: center; gap: 12px; padding: 14px 16px;
    border-radius: 16px; background: rgba(22,119,255,.075); border: 1px solid rgba(73,150,255,.26);
  }
  .alipay-mark {
    width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px;
    background: #1677ff; color: white; font-size: 20px; font-weight: 800;
  }
  .payment-method-copy { flex: 1; }
  .payment-method-name { font-size: 14px; font-weight: 700; }
  .payment-method-sub { margin-top: 3px; color: var(--ink-dim); font-size: 11px; }
  .payment-method-check {
    width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%;
    color: #07110f; background: var(--accent-2); font-size: 12px; font-weight: 900;
  }
  .payment-safe-note {
    display: flex; align-items: flex-start; gap: 8px; margin-top: 14px;
    color: var(--ink-dim); font-size: 11px; line-height: 1.6;
  }
  .payment-safe-note::before { content: "◇"; color: var(--accent-2); }
  .order-list { display: grid; gap: 10px; margin-top: 18px; }
  .order-item {
    padding: 14px 15px; border-radius: 15px; background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.07);
  }
  .order-item-main, .order-item-meta {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
  }
  .order-item-main { font-size: 13px; font-weight: 700; }
  .order-item-meta { margin-top: 7px; color: var(--ink-dim); font-size: 11px; }
  .order-status {
    padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 700;
    color: var(--accent-warm); background: rgba(255,207,138,.09);
  }
  .order-status.paid { color: var(--ok); background: rgba(127,227,192,.09); }
  .order-status.failed { color: var(--danger); background: rgba(255,138,154,.09); }
  .order-empty {
    margin-top: 18px; padding: 34px 16px; text-align: center; border-radius: 16px;
    color: var(--ink-dim); background: rgba(255,255,255,.03); border: 1px dashed rgba(255,255,255,.09);
    font-size: 13px; line-height: 1.7;
  }
  .payment-status { padding: 28px 8px 10px; text-align: center; }
  .payment-status-icon {
    width: 64px; height: 64px; margin: 0 auto 18px; display: grid; place-items: center;
    border-radius: 50%; font-size: 27px; color: var(--accent-warm);
    background: rgba(255,207,138,.09); border: 1px solid rgba(255,207,138,.2);
  }
  .payment-status.success .payment-status-icon {
    color: #07110f; background: var(--ok); border-color: var(--ok);
  }
  .payment-status.error .payment-status-icon {
    color: var(--danger); background: rgba(255,138,154,.09); border-color: rgba(255,138,154,.2);
  }
  .payment-status h4 { margin: 0; font-size: 20px; }
  .payment-status p {
    max-width: 380px; margin: 10px auto 0; color: var(--ink-dim);
    font-size: 13px; line-height: 1.7;
  }
  .payment-status .recharge-actions { justify-content: center; margin-top: 24px; }
  .info-tip {
    position: relative; appearance: none; width: 19px; height: 19px; padding: 0;
    display: inline-grid; place-items: center; border-radius: 50%; cursor: help;
    color: var(--ink-dim); background: rgba(255,255,255,.055);
    border: 1px solid rgba(255,255,255,.12); font: 700 11px/1 inherit;
  }
  .info-tip:hover, .info-tip:focus-visible { color: var(--ink); border-color: rgba(127,227,216,.35); }
  .info-bubble {
    position: absolute; z-index: 120; right: -8px; bottom: calc(100% + 10px);
    width: 278px; padding: 12px 13px; border-radius: 12px; pointer-events: none;
    color: var(--ink-soft); background: rgba(16,18,26,.98);
    border: 1px solid rgba(255,255,255,.12); box-shadow: 0 18px 45px rgba(0,0,0,.42);
    font-size: 12px; font-weight: 400; line-height: 1.65; text-align: left;
    opacity: 0; transform: translateY(4px); transition: opacity .18s ease, transform .18s ease;
  }
  .info-tip:hover .info-bubble, .info-tip:focus-visible .info-bubble {
    opacity: 1; transform: translateY(0);
  }
  .recognition-cost {
    display: flex; align-items: center; justify-content: flex-end; gap: 7px;
    margin-top: 12px; color: var(--ink-dim); font-size: 12px;
  }
  .recognition-cost strong { color: var(--accent-2); }
  .billing-overlay {
    position: fixed; inset: 0; z-index: 85; display: none; align-items: center; justify-content: center;
    padding: 24px; background: rgba(3,4,8,.74); backdrop-filter: blur(16px);
  }
  .billing-overlay.show { display: flex; }
  .billing-card {
    width: min(720px, calc(100vw - 48px)); max-height: calc(100vh - 48px); overflow-y: auto;
    padding: 26px; border-radius: 24px;
    background: linear-gradient(160deg, rgba(26,28,38,.99), rgba(12,13,20,.99));
    border: 1px solid rgba(255,255,255,.12); box-shadow: 0 32px 90px rgba(0,0,0,.55);
  }
  .billing-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
  .billing-head h3 { margin: 0; font-size: 22px; }
  .billing-head p { margin: 7px 0 0; color: var(--ink-dim); font-size: 13px; }
  .billing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
  .billing-rule {
    min-height: 190px; padding: 18px; border-radius: 18px;
    background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.075);
  }
  .billing-rule-kicker { color: var(--accent-2); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
  .billing-rule h4 { margin: 10px 0 12px; font-size: 16px; }
  .billing-rule-line {
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
    padding: 8px 0; color: var(--ink-dim); font-size: 12px;
    border-top: 1px solid rgba(255,255,255,.06);
  }
  .billing-rule-line strong { color: var(--ink); font-size: 13px; }
  .billing-footnote {
    margin-top: 16px; padding: 13px 15px; border-radius: 14px;
    color: var(--ink-soft); background: rgba(127,227,216,.055);
    border: 1px solid rgba(127,227,216,.13); font-size: 12px; line-height: 1.7;
  }
  @media (max-width: 760px) {
    .billing-link { display: none; }
    .account-actions { min-width: auto; }
    .billing-grid { grid-template-columns: 1fr; }
  }
  .duration-notice {
    display: none; margin-top: 14px; padding: 12px 14px; border-radius: 14px;
    color: #ffd9df; background: rgba(255,138,154,.09); border: 1px solid rgba(255,138,154,.22);
    font-size: 13px; line-height: 1.65;
  }
  .duration-notice.show { display: block; }

  .auth-card { width: min(460px, calc(100vw - 48px)); }
  .auth-form { display: grid; gap: 16px; }
  .auth-field { display: grid; gap: 8px; }
  .auth-field label { color: var(--ink-soft); font-size: 12px; }
  .auth-input {
    width: 100%; height: 48px; border-radius: 14px; padding: 0 15px;
    border: 1px solid rgba(255,255,255,.12); outline: none;
    background: rgba(255,255,255,.055); color: var(--ink); font: 500 15px/1 inherit;
  }
  .auth-input:focus { border-color: rgba(127,227,216,.5); box-shadow: 0 0 0 3px rgba(127,227,216,.08); }
  .auth-code-row { display: grid; grid-template-columns: 1fr 132px; gap: 10px; }
  .auth-code-button {
    height: 48px; border-radius: 14px; padding: 0 12px; border: 1px solid rgba(127,227,216,.25);
    background: rgba(127,227,216,.08); color: var(--accent-2); cursor: pointer; font: 650 12px/1 inherit;
  }
  .auth-code-button:disabled { cursor: default; opacity: .55; }
  .auth-consent { display: flex; align-items: flex-start; gap: 9px; color: var(--ink-dim); font-size: 11px; line-height: 1.65; }
  .auth-consent input { margin-top: 3px; accent-color: var(--accent-2); }
  .auth-consent strong { color: var(--ink-soft); font-weight: 600; }
  .auth-consent a { color: var(--accent-2); text-decoration: underline; pointer-events: auto; cursor: pointer; }
  .auth-consent a:hover { opacity: .85; }
  .auth-message { min-height: 19px; color: var(--accent-warm); font-size: 12px; line-height: 1.55; }
  .auth-message.error { color: var(--danger); }
  .auth-note { color: var(--ink-dim); font-size: 11px; line-height: 1.7; }
  .auth-account {
    padding: 18px; border-radius: 18px; background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.075);
  }
  .auth-account-label { color: var(--ink-dim); font-size: 11px; }
  .auth-account-phone { margin-top: 8px; color: var(--ink); font-size: 20px; font-weight: 750; }
  .auth-account-balance { margin-top: 16px; color: var(--ink-soft); font-size: 12px; }

  .deletion-notice {
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(255, 80, 80, 0.08);
    border: 1px solid rgba(255, 80, 80, 0.3);
    border-radius: 10px;
    font-size: 12px;
    color: var(--danger, #ff5050);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .deletion-notice strong { color: var(--danger, #ff5050); }
  .btn.danger { border-color: var(--danger, #ff5050); color: var(--danger, #ff5050); }

  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 999px; }
  ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); }

  .row { display: flex; align-items: center; gap: 10px; }
  .spacer { flex: 1; }
  .muted { color: var(--ink-dim); }
