
    * { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      --accent: #6366f1;
      --accent-glow: rgba(99, 102, 241, 0.35);
      --bg-card: rgba(18, 19, 28, 0.5);
      --border-soft: rgba(255, 255, 255, 0.08);
      --border-strong: rgba(255, 255, 255, 0.14);
      --text-dim: #b8bccb;
      --text-dim2: #8a8fa3;
    }

    html, body { height: 100%; }

    body {
      background: #fff;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
      font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", sans-serif;
      padding: 32px 16px 60px;
      overflow-x: hidden;
      position: relative;
      color: #1f2232;
      -webkit-font-smoothing: antialiased;
      -webkit-tap-highlight-color: transparent;
    }

    
    .bg-media {
      position: fixed;
      inset: 0;
      width: 100vw;
      height: 100vh;
      object-fit: cover;
      pointer-events: none;
      z-index: 0;
    }
    
    .video-mask {
      position: fixed;
      inset: 0;
      z-index: -1;
      pointer-events: none;
      background: linear-gradient(180deg, rgba(10,11,18,0.2) 0%, rgba(10,11,18,0.42) 100%);
    }
    .noise-overlay {
      position: fixed;
      inset: 0;
      z-index: 0;
      pointer-events: none;
      opacity: 0.02;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    }

    button, input, [role="button"] {
      -webkit-tap-highlight-color: transparent;
      outline: none;
    }
    button:focus,
    button:focus-visible,
    input:focus,
    input:focus-visible {
      outline: none;
    }

    .page-title {
      position: relative;
      z-index: 1;
      font-size: 13px;
      letter-spacing: 6px;
      color: #45465e;
      text-transform: uppercase;
      margin-bottom: 22px;
      font-weight: 500;
      display: flex;
      align-items: center;
      gap: 10px;
      text-shadow: none;
    }
    .page-title::before,
    .page-title::after {
      content: '';
      width: 28px;
      height: 1px;
      background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
    }

    .global-account {
      position: relative;
      z-index: 2;
      width: min(92vw, 560px);
      margin: 0 auto 18px;
      padding: 14px 16px 13px;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 18px;
      background: #212334;
      backdrop-filter: blur(18px) saturate(150%);
      -webkit-backdrop-filter: blur(18px) saturate(150%);
      box-shadow: 0 10px 30px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.08);
    }
    .global-account-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 9px;
    }
    .global-mode-btn {
      border: 1px solid rgba(255,255,255,0.15);
      border-radius: 999px;
      padding: 5px 11px;
      color: #c8ccdb;
      background: rgba(255,255,255,0.08);
      font-size: 11px;
      cursor: pointer;
      transition: .25s ease;
    }
    .global-mode-btn.is-on {
      color: #fff;
      border-color: rgba(123,111,255,.8);
      background: linear-gradient(135deg,#6366f1,#8b5cf6);
      box-shadow: 0 3px 12px rgba(99,102,241,.4);
    }
    .global-account-title {
      color: #f3f4ff;
      font-size: 13px;
      font-weight: 650;
      letter-spacing: 1px;
      text-shadow: 0 1px 8px rgba(0,0,0,0.5);
    }
    .global-account-input {
      display: block;
      width: 100%;
      height: 42px;
      padding: 0 14px;
      border: 1px solid rgba(255,255,255,0.14);
      border-radius: 12px;
      background: rgba(7,8,15,0.55);
      color: #fff;
      font-size: 17px;
      letter-spacing: 2px;
      text-align: center;
      outline: none;
      font-variant-numeric: tabular-nums;
      transition: border-color .25s, box-shadow .25s, background .25s;
    }
    .global-account-input::placeholder { color: #8a8fa3; letter-spacing: 1px; }
    .global-account-input:focus {
      border-color: rgba(126,113,255,0.9);
      background: rgba(9,10,20,0.8);
      box-shadow: 0 0 0 3px rgba(99,102,241,0.2), 0 6px 22px rgba(99,102,241,0.25);
    }
    .input-row label, .input-row .input-wrap { display: none; }
    .export-options {
      position: relative;
      z-index: 2;
      width: min(92vw, 560px);
      margin: 0 auto 18px;
      display: flex;
      justify-content: center;
    }
    .export-switch {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      padding: 9px 14px;
      border: 1px solid rgba(255,255,255,.14);
      border-radius: 999px;
      color: #c8ccdb;
      background: rgba(22,24,38,0.62);
      backdrop-filter: blur(16px) saturate(150%);
      -webkit-backdrop-filter: blur(16px) saturate(150%);
      font-size: 12px;
      cursor: pointer;
      user-select: none;
      box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 8px 22px rgba(0,0,0,.22);
    }
    .export-switch input { position: absolute; opacity: 0; pointer-events: none; }
    .export-switch::before {
      content: '';
      width: 34px;
      height: 20px;
      border-radius: 999px;
      background: #4a4d63;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.1);
      transition: .25s ease;
    }
    .export-switch::after {
      content: '';
      position: absolute;
      width: 16px;
      height: 16px;
      margin-left: 2px;
      border-radius: 50%;
      background: #e8eaf2;
      transition: transform .25s ease, background .25s ease;
    }
    .export-switch:has(input:checked) { color: #fff; border-color: rgba(123,111,255,.6); }
    .export-switch:has(input:checked)::before { background: linear-gradient(135deg,#6366f1,#8b5cf6); }
    .export-switch:has(input:checked)::after { transform: translateX(14px); background: #fff; }

    .tabs-wrap {
      position: relative;
      z-index: 1;
      background: #212334;
      backdrop-filter: blur(18px) saturate(150%);
      -webkit-backdrop-filter: blur(18px) saturate(150%);
      border: 1px solid var(--border-soft);
      border-radius: 40px;
      padding: 5px;
      margin-bottom: 26px;
      max-width: 96vw;
      box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    }

    .tabs {
      display: flex;
      gap: 2px;
      position: relative;
      overflow-x: auto;
      scrollbar-width: none;
    }
    .tabs::-webkit-scrollbar { display: none; }

    .tab-btn {
      position: relative;
      z-index: 2;
      background: transparent;
      border: none;
      color: var(--text-dim);
      padding: 9px 16px;
      border-radius: 32px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      transition: color 0.3s ease;
      white-space: nowrap;
      flex-shrink: 0;
      letter-spacing: 0.2px;
      outline: none;
      -webkit-tap-highlight-color: transparent;
      user-select: none;
      text-shadow: 0 1px 6px rgba(0,0,0,0.4);
    }

    .tab-btn:hover { color: #e8eaf2; }
    .tab-btn.active { color: #fff; }

    .tab-indicator {
      position: absolute;
      top: 5px;
      left: 0;
      height: calc(100% - 10px);
      background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
      border-radius: 32px;
      z-index: 1;
      transition: transform 0.35s cubic-bezier(0.34, 1.3, 0.64, 1), width 0.35s cubic-bezier(0.34, 1.3, 0.64, 1);
      box-shadow:
        0 4px 18px var(--accent-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
      pointer-events: none;
    }

    .stage {
      position: relative;
      z-index: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      width: 100%;
    }

    .panel {
      display: none;
      flex-direction: column;
      align-items: center;
      width: 100%;
    }
    .panel.active {
      display: flex;
    }
    
    .panel.active .card {
      animation: panelIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    }
    @keyframes panelIn {
      from {
        opacity: 0;
        transform: translateY(12px);
        backdrop-filter: blur(0px) saturate(100%);
        -webkit-backdrop-filter: blur(0px) saturate(100%);
      }
      to {
        opacity: 1;
        transform: translateY(0);
        backdrop-filter: blur(14px) saturate(150%);
        -webkit-backdrop-filter: blur(14px) saturate(150%);
      }
    }

    
    .card {
      position: relative;
      background: #212334;
      backdrop-filter: blur(14px) saturate(150%);
      -webkit-backdrop-filter: blur(14px) saturate(150%);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 22px;
      padding: 70px 24px 24px;
      display: flex;
      flex-direction: column;
      align-items: center;
      width: min(92vw, 560px);
      max-width: 560px;
      overflow: hidden;
      box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }

    .card::before {
      content: '';
      position: absolute;
      top: 0; left: 20%; right: 20%;
      height: 1px;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
      pointer-events: none;
      z-index: 2;
    }

    .card::after {
      content: '';
      position: absolute;
      top: -40%;
      left: 50%;
      transform: translateX(-50%);
      width: 300px;
      height: 300px;
      background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 65%);
      pointer-events: none;
      z-index: 0;
    }

    @media (min-width: 480px) {
      .card { padding: 80px 32px 28px; border-radius: 24px; }
    }
    @media (min-width: 720px) {
      .card { padding: 90px 48px 34px; border-radius: 26px; }
    }

    .badge-viewport {
      position: relative;
      z-index: 1;
      width: 100%;
      height: 150px;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: visible;
      margin-bottom: 22px;
      touch-action: manipulation;
    }

    @media (min-width: 480px) {
      .badge-viewport { height: 160px; }
    }
    @media (min-width: 720px) {
      .badge-viewport { height: 180px; }
    }

    .badge-stage {
      position: absolute;
      top: 50%;
      left: 50%;
      transform-origin: center center;
      transform: translate(-50%, -50%) scale(1);
      will-change: transform;
      white-space: nowrap;
    }

    #lianghaoCanvas {
      display: block;
      position: relative;
      z-index: 1;
    }

    .icon-top-overlay {
      position: absolute;
      pointer-events: none;
      z-index: 2;
    }

    .crown-overlay {
      position: absolute;
      pointer-events: none;
      z-index: 9999;
      transform-origin: bottom right;
      will-change: transform;
    }

    .divider {
      position: relative;
      z-index: 1;
      width: 100%;
      height: 1px;
      background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
      margin: 4px 0 20px;
    }

    .input-row {
      position: relative;
      z-index: 1;
      display: flex;
      align-items: center;
      gap: 10px;
      width: 100%;
      max-width: 340px;
    }

    .input-row label {
      font-size: 12px;
      color: var(--text-dim2);
      letter-spacing: 2px;
      white-space: nowrap;
      text-transform: uppercase;
      font-weight: 500;
    }

    .input-wrap {
      position: relative;
      flex: 1;
      min-width: 0;
    }

    .input-row input {
      width: 100%;
      padding: 10px 14px;
      border-radius: 10px;
      border: 1px solid var(--border-soft);
      background: rgba(10, 11, 18, 0.6);
      color: #fff;
      font-size: 15px;
      letter-spacing: 2px;
      outline: none;
      text-align: center;
      transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
      font-variant-numeric: tabular-nums;
      -webkit-tap-highlight-color: transparent;
    }

    .input-row input:hover {
      border-color: rgba(255, 255, 255, 0.16);
    }

    .input-row input:focus {
      border-color: var(--accent);
      background: rgba(10, 11, 18, 0.85);
      box-shadow:
        0 0 0 3px rgba(99, 102, 241, 0.18),
        0 4px 20px rgba(99, 102, 241, 0.3);
    }

    .download-btn {
      flex-shrink: 0;
      width: 40px;
      height: 40px;
      border-radius: 10px;
      border: 1px solid var(--border-soft);
      background: rgba(10, 11, 18, 0.6);
      color: var(--text-dim);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.25s ease;
      -webkit-tap-highlight-color: transparent;
      outline: none;
      padding: 0;
    }

    .download-btn:hover {
      color: #fff;
      border-color: rgba(99, 102, 241, 0.6);
      background: rgba(99, 102, 241, 0.18);
      box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    }

    .download-btn:active {
      transform: scale(0.94);
    }

    .download-btn:disabled {
      opacity: 0.5;
      cursor: wait;
    }

    .download-btn svg {
      width: 18px;
      height: 18px;
      stroke: currentColor;
      fill: none;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .download-btn.success {
      color: #4ade80;
      border-color: rgba(74, 222, 128, 0.5);
      background: rgba(74, 222, 128, 0.14);
    }

    .download-btn.recording {
      color: #fbbf24;
      border-color: rgba(251, 191, 36, 0.5);
      background: rgba(251, 191, 36, 0.14);
      animation: pulseBtn 1s ease-in-out infinite;
    }

    @keyframes pulseBtn {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.6; }
    }

    .status {
      position: relative;
      z-index: 1;
      margin-top: 18px;
      font-size: 11px;
      color: #46495c;
      letter-spacing: 2px;
      min-height: 14px;
      transition: opacity 0.6s;
      text-transform: uppercase;
      text-shadow: 0 1px 6px rgba(0,0,0,0.5);
    }

    .toast {
      position: fixed;
      bottom: 80px;
      left: 50%;
      transform: translateX(-50%) translateY(20px);
      background: rgba(30, 32, 44, 0.95);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border: 1px solid rgba(255, 255, 255, 0.1);
      color: #fff;
      padding: 12px 22px;
      border-radius: 12px;
      font-size: 13px;
      letter-spacing: 0.5px;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s, transform 0.3s;
      z-index: 99999;
      box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
      white-space: nowrap;
    }

    .toast.show {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }

    @media (max-width: 360px) {
      .tab-btn { padding: 8px 12px; font-size: 12px; }
      .input-row label { font-size: 11px; letter-spacing: 1px; }
      .download-btn { width: 36px; height: 36px; }
      .input-row { max-width: 300px; gap: 8px; }
    }

    
    .tip-modal {
      position: fixed;
      inset: 0;
      z-index: 100000;
      display: none;
      align-items: center;
      justify-content: center;
      background: rgba(0, 0, 0, 0.68);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      padding: 20px;
    }
    .tip-modal.show {
      display: flex;
      animation: tipFadeIn 0.25s ease;
    }
    @keyframes tipFadeIn {
      from { opacity: 0; }
      to   { opacity: 1; }
    }

    .tip-panel {
      position: relative;
      width: 100%;
      max-width: 380px;
      padding: 28px 22px 22px;
      border-radius: 24px;
      
      background: rgba(23, 24, 34, 0.62);
      backdrop-filter: blur(14px) saturate(150%);
      -webkit-backdrop-filter: blur(14px) saturate(150%);
      border: 1px solid rgba(244, 63, 94, 0.28);
      box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(244, 63, 94, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
      text-align: center;
      animation: tipSlideUp 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    }
    @keyframes tipSlideUp {
      from { opacity: 0; transform: translateY(16px) scale(0.96); }
      to   { opacity: 1; transform: translateY(0) scale(1); }
    }

    .tip-title {
      font-size: 18px;
      font-weight: 700;
      color: #fff;
      letter-spacing: 1px;
      margin-bottom: 6px;
    }
    .tip-desc {
      font-size: 13px;
      color: #9aa0a6;
      margin-bottom: 20px;
      letter-spacing: 0.3px;
    }

    .tip-qr-wrap {
      display: flex;
      gap: 14px;
      justify-content: center;
      margin-bottom: 20px;
    }
    .tip-qr-item {
      flex: 1;
      max-width: 150px;
      padding: 10px 10px 8px;
      border-radius: 16px;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.08);
      transition: border-color 0.3s, background 0.3s, transform 0.25s;
    }
    .tip-qr-item:hover {
      border-color: rgba(244, 63, 94, 0.45);
      background: rgba(244, 63, 94, 0.08);
      transform: translateY(-2px);
    }
    .tip-qr-item img {
      display: block;
      width: 100%;
      aspect-ratio: 1 / 1;
      object-fit: contain;
      border-radius: 10px;
      background: #fff;
    }
    .tip-qr-label {
      margin-top: 8px;
      font-size: 12px;
      color: #c7c9d8;
      letter-spacing: 1px;
    }

    .tip-close {
      width: 100%;
      padding: 12px 0;
      border: none;
      border-radius: 12px;
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid rgba(255, 255, 255, 0.08);
      color: #b0b4c8;
      font-size: 14px;
      font-weight: 550;
      letter-spacing: 0.5px;
      cursor: pointer;
      transition: all 0.2s ease;
      -webkit-tap-highlight-color: transparent;
    }
    .tip-close:hover {
      background: rgba(255, 255, 255, 0.1);
      color: #fff;
    }
    .tip-close:active { transform: scale(0.97); }

    
    .loading-overlay {
      position: fixed;
      inset: 0;
      z-index: 99999;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      background: rgba(6, 7, 12, 0.66);
      backdrop-filter: blur(16px) saturate(120%);
      -webkit-backdrop-filter: blur(16px) saturate(120%);
      -webkit-tap-highlight-color: transparent;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity 0.34s ease, visibility 0.34s ease;
    }
    .loading-overlay.show {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
      transition: none;
    }
    .loading-spinner {
      width: 46px;
      height: 46px;
      border-radius: 50%;
      border: 3px solid rgba(255, 255, 255, 0.14);
      border-top-color: #8b5cf6;
      animation: loadingSpin 0.9s linear infinite;
    }
    @keyframes loadingSpin { to { transform: rotate(360deg); } }
    .loading-text {
      margin-top: 18px;
      font-size: 13px;
      color: #c8ccdb;
      letter-spacing: 1.5px;
      text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
    }

    
    #convModal.show { animation: tipFadeIn 0.34s ease; }
    .conv-panel { animation: convPanelIn 0.44s cubic-bezier(0.22, 1, 0.36, 1); }
    @keyframes convPanelIn {
      from { opacity: 0; transform: translateY(16px) scale(0.965); }
      to   { opacity: 1; transform: translateY(0) scale(1); }
    }

    
    .conv-panel { max-width: 360px; }
    .conv-preview-wrap {
      margin: 4px 0 10px;
      border-radius: 14px;
      
      background: rgba(255, 255, 255, 0.055);
      border: 1px solid rgba(255, 255, 255, 0.10);
      padding: 8px;
      max-height: 30vh;
      overflow: auto;
      display: flex;
      align-items: center;
      justify-content: center;
      -webkit-overflow-scrolling: touch;
    }
    .conv-preview {
      display: block;
      max-width: 100%;
      height: auto;
      -webkit-touch-callout: default;
      -webkit-user-select: auto;
      user-select: auto;
    }
    .conv-hint {
      font-size: 12px;
      color: #9aa0a6;
      text-align: center;
      letter-spacing: 0.3px;
      margin-bottom: 10px;
    }
    .conv-note {
      font-size: 12px;
      color: #c7c9d8;
      text-align: center;
      line-height: 1.7;
      margin-bottom: 14px;
    }
    .conv-link {
      display: block;
      width: 100%;
      box-sizing: border-box;
      padding: 12px 0;
      margin-bottom: 10px;
      border-radius: 12px;
      background: linear-gradient(135deg, #6366f1, #8b5cf6);
      color: #fff;
      font-size: 14px;
      font-weight: 600;
      letter-spacing: 0.5px;
      text-align: center;
      text-decoration: none;
      box-shadow: 0 8px 22px -6px rgba(99, 102, 241, 0.6);
      -webkit-tap-highlight-color: transparent;
    }
    .conv-link:active { transform: scale(0.97); }
    .conv-save {
      width: 100%;
      padding: 12px 0;
      margin-bottom: 10px;
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 12px;
      background: rgba(255, 255, 255, 0.06);
      color: #d5d8e5;
      font-size: 14px;
      font-weight: 500;
      letter-spacing: 0.5px;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
    }
    .conv-save:active { transform: scale(0.97); }

    
    @media (max-width: 360px) {
      .tip-panel { padding: 22px 16px 18px; }
    }

    /* White page with solid dark controls, so labels remain legible. */
    .conv-link {
      border: 0;
      cursor: pointer;
      font-family: inherit;
    }
    .conv-link:disabled {
      cursor: wait;
      opacity: .72;
    }
    [hidden] { display: none !important; }
    :is(button, input):focus-visible {
      outline: 2px solid #8b5cf6;
      outline-offset: 3px;
    }
