:root {
      --primary: #ea580c;
      --primary-hover: #c2410c;
      --surface: #ffffff;
      --bg: #f8fafc;
      --text: #0f172a;
      --text-muted: #64748b;
      --border: #e2e8f0;
      --radius-lg: 16px;
      --radius-md: 10px;
      --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08);
    }
    * { box-sizing: border-box; margin: 0; padding: 0; }
    body {
      font-family: sans-serif;
      background: var(--bg);
      color: var(--text);
      line-height: 1.5;
    }
    header {
      background: var(--surface);
      border-bottom: 1px solid var(--border);
      position: sticky;
      top: 0;
      z-index: 100;
      padding: 0.75rem 1.75rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .brand {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      text-decoration: none;
      color: inherit;
    }
    .brand-icon {
      width: 36px;
      height: 36px;
      background: #ea580c;
      color: white;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 800;
      font-size: 1.1rem;
      box-shadow: 0 2px 8px rgba(234, 88, 12, 0.25);
    }
    .brand-title { font-weight: 800; font-size: 1.15rem; color: #0f172a; }
    .brand-badge {
      font-size: 0.75rem;
      background: #fff7ed;
      color: #ea580c;
      font-weight: 700;
      padding: 2px 8px;
      border-radius: 6px;
      border: 1px solid #fed7aa;
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      transition: all 0.15s;
    }
    .nav-links { display: flex; align-items: center; gap: 0.85rem; }
    .nav-btn {
      text-decoration: none;
      color: var(--text-muted);
      font-size: 0.88rem;
      font-weight: 600;
      padding: 0.45rem 0.85rem;
      border-radius: 6px;
      transition: all 0.15s ease;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }
    .nav-btn:hover { color: #ea580c; background: #fff7ed; }
    .nav-btn.active { color: #ea580c; font-weight: 700; }
    .nav-btn.primary {
      background: #ea580c;
      color: white;
      font-weight: 700;
      box-shadow: 0 2px 8px rgba(234, 88, 12, 0.3);
    }

    .hero-sec {
      max-width: 1080px;
      margin: 1.25rem auto 0.85rem auto;
      padding: 0 1.25rem;
      text-align: center;
    }
    .hero-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 0.8rem;
      font-weight: 700;
      color: #c2410c;
      background: #fff7ed;
      padding: 3px 11px;
      border-radius: 20px;
      margin-bottom: 0.5rem;
      border: 1px solid #fed7aa;
    }
    .hero-title {
      font-size: 1.85rem;
      font-weight: 800;
      letter-spacing: -0.025em;
      margin-bottom: 0.35rem;
    }
    .hero-sub {
      font-size: 0.95rem;
      color: var(--text-muted);
      max-width: 650px;
      margin: 0 auto;
    }

    .container {
      max-width: 1050px;
      margin: 0 auto 2.5rem auto;
      padding: 0 1.25rem;
    }
    .main-card {
      background: var(--surface);
      border-radius: var(--radius-lg);
      border: 1px solid var(--border);
      box-shadow: var(--shadow-lg);
      padding: 1.25rem 1.4rem;
    }

    .dropzone {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 0.85rem;
      border: 2px dashed #fed7aa;
      background: #fffaf5;
      border-radius: var(--radius-md);
      padding: 2.75rem 1.5rem;
      text-align: center;
      cursor: pointer;
      transition: all 0.2s;
      position: relative;
    }
    .dropzone:hover { border-color: #ea580c; background: #fff7ed; }
    .dropzone svg.dropzone-icon {
      display: block;
      margin: 0 auto;
      pointer-events: none;
    }
    .dropzone-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      background: #ea580c;
      color: #ffffff;
      font-weight: 700;
      font-size: 1.02rem;
      padding: 0.65rem 1.6rem;
      border-radius: 10px;
      margin: 0;
      box-shadow: 0 4px 12px rgba(234, 88, 12, 0.25);
      pointer-events: none;
      transition: all 0.18s ease;
    }
    .dropzone:hover .dropzone-btn {
      background: #c2410c;
      transform: translateY(-1px);
    }
    .dropzone input[type="file"] {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      opacity: 0;
      cursor: pointer;
      z-index: 10;
    }

    /* Direct Full Result Display Card */
    .result-display-wrap {
      max-width: 600px;
      max-height: 75vh;
      margin: 1.25rem auto;
      border-radius: 14px;
      overflow: hidden;
      box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.12);
      border: 1px solid #e2e8f0;
      background: #0f172a;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .result-display-img {
      max-width: 100%;
      max-height: 75vh;
      width: auto;
      height: auto;
      object-fit: contain;
      display: block;
      margin: 0 auto;
    }

    .scale-pills {
      display: flex;
      justify-content: center;
      gap: 1rem;
      margin: 1.25rem 0;
    }
    .scale-btn {
      padding: 0.65rem 1.5rem;
      border-radius: 8px;
      border: 1.5px solid var(--border);
      background: white;
      font-weight: 700;
      font-size: 0.92rem;
      cursor: pointer;
      color: #334155;
      transition: all 0.15s;
    }
    .scale-btn:hover { border-color: #ea580c; }
    .scale-btn.active {
      border-color: #ea580c;
      background: #fff7ed;
      color: #c2410c;
      box-shadow: 0 2px 6px rgba(234, 88, 12, 0.2);
    }

    .btn-action {
      padding: 0.75rem 1.6rem;
      font-size: 0.95rem;
      font-weight: 700;
      border-radius: 8px;
      cursor: pointer;
      border: none;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      transition: all 0.15s;
    }
    .btn-primary { background: #ea580c; color: white; }
    .btn-primary:hover { background: #c2410c; }
    .btn-outline { background: white; border: 1px solid var(--border); color: #334155; }
    .btn-outline:hover { background: #f1f5f9; }

    .back-banner {
      background: linear-gradient(135deg, #fff7ed, #eff6ff);
      border: 1px solid #fed7aa;
      border-radius: var(--radius-md);
      padding: 1.5rem;
      text-align: center;
      margin: 2.5rem 0;
    }
  
    /* Header Actions & Country Selector */
    .header-actions {
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }
    .select-pill {
      padding: 0.42rem 0.75rem;
      border: 1px solid var(--border, #cbd5e1);
      border-radius: 9999px;
      background: var(--surface, #ffffff);
      font-size: 0.82rem;
      font-weight: 700;
      color: var(--text, #0f172a);
      outline: none;
      cursor: pointer;
      box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    }
    .country-selector {
      min-width: 82px;
    }

    /* === Step 1 & 2 Workflow Enhancements === */
    .step-guide-title {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 0.95rem;
      font-weight: 800;
      color: #1e293b;
      margin-bottom: 0.75rem;
    }
    .step-num {
      width: 22px;
      height: 22px;
      border-radius: 50%;
      background: #ea580c;
      color: white;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 0.75rem;
      font-weight: 800;
    }

    /* ==========================================================================
       Direct 2-Mode Action Buttons Directly Under Stage
       ========================================================================== */
    .upscale-action-row {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 1rem;
      margin-top: 1rem;
    }

    @media (max-width: 768px) {
      .upscale-action-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
      }
    }

    .btn-upscale-mode {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 0.85rem 1.15rem;
      border-radius: 12px;
      border: 2px solid #e2e8f0;
      background: #ffffff;
      cursor: pointer;
      text-align: left;
      transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;
      user-select: none;
      box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
      outline: none;
      width: 100%;
    }

    .btn-upscale-mode:hover {
      transform: translateY(-2px);
    }

    .btn-upscale-mode:active {
      transform: translateY(0) scale(0.99);
    }

    .btn-mode-portrait {
      border-color: #fed7aa;
      background: linear-gradient(135deg, #ffffff 0%, #fffaf5 100%);
    }

    .btn-mode-portrait:hover {
      border-color: #ea580c;
      background: linear-gradient(135deg, #fffaf5 0%, #fff7ed 100%);
      box-shadow: 0 8px 24px rgba(234, 88, 12, 0.16);
    }

    .btn-mode-general {
      border-color: #e2e8f0;
      background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    }

    .btn-mode-general:hover {
      border-color: #3b82f6;
      background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
      box-shadow: 0 8px 24px rgba(59, 130, 246, 0.14);
    }

    .mode-btn-icon-box {
      width: 48px;
      height: 48px;
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.6rem;
      flex-shrink: 0;
      transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .btn-mode-portrait .mode-btn-icon-box {
      background: #ffedd5;
      border: 1px solid #fed7aa;
    }

    .btn-mode-general .mode-btn-icon-box {
      background: #dbeafe;
      border: 1px solid #bfdbfe;
    }

    .btn-upscale-mode:hover .mode-btn-icon-box {
      transform: scale(1.1);
    }

    .mode-btn-body {
      flex: 1;
      min-width: 0;
    }

    .mode-btn-header {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 4px;
      flex-wrap: wrap;
    }

    .mode-btn-title {
      font-size: 1.05rem;
      font-weight: 800;
      color: #0f172a;
      letter-spacing: -0.01em;
    }

    .mode-btn-badge {
      font-size: 0.72rem;
      font-weight: 700;
      padding: 2px 8px;
      border-radius: 999px;
      white-space: nowrap;
    }

    .badge-orange {
      background: #ea580c;
      color: #ffffff;
      box-shadow: 0 2px 6px rgba(234, 88, 12, 0.25);
    }

    .badge-blue {
      background: #2563eb;
      color: #ffffff;
      box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
    }

    .mode-btn-desc {
      font-size: 0.82rem;
      color: #64748b;
      margin: 0;
      line-height: 1.4;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .mode-btn-action-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 8px 14px;
      border-radius: 999px;
      font-size: 0.82rem;
      font-weight: 700;
      flex-shrink: 0;
      transition: all 0.2s ease;
    }

    .btn-mode-portrait .mode-btn-action-pill {
      background: #ea580c;
      color: #ffffff;
      box-shadow: 0 2px 8px rgba(234, 88, 12, 0.25);
    }

    .btn-mode-portrait:hover .mode-btn-action-pill {
      background: #c2410c;
      box-shadow: 0 4px 12px rgba(234, 88, 12, 0.35);
    }

    .btn-mode-general .mode-btn-action-pill {
      background: #0f172a;
      color: #ffffff;
      box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
    }

    .btn-mode-general:hover .mode-btn-action-pill {
      background: #1e293b;
      box-shadow: 0 4px 12px rgba(15, 23, 42, 0.3);
    }

    /* Mode Selection Cards */
    .mode-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 1rem;
    }
    .mode-item {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 1.1rem 1.25rem;
      background: #ffffff;
      border: 2px solid #e2e8f0;
      border-radius: 12px;
      cursor: pointer;
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;
      user-select: none;
    }
    .mode-item:hover {
      border-color: #fdba74;
      background: #fffaf5;
      transform: translateY(-1px);
    }
    .mode-item.active {
      border-color: #ea580c;
      background: #fff7ed;
      box-shadow: 0 4px 14px rgba(234, 88, 12, 0.15);
    }
    .mode-icon-box {
      width: 46px;
      height: 46px;
      border-radius: 10px;
      background: #f1f5f9;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.5rem;
      flex-shrink: 0;
      transition: all 0.2s;
    }
    .mode-item.active .mode-icon-box {
      background: #ffedd5;
    }
    .mode-text-box {
      flex: 1;
    }
    .mode-title-row {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 4px;
    }
    .mode-main-title {
      font-weight: 800;
      font-size: 1.02rem;
      color: #0f172a;
    }
    .mode-badge-rec {
      font-size: 0.72rem;
      font-weight: 700;
      padding: 2px 7px;
      border-radius: 9999px;
      background: #ea580c;
      color: white;
    }
    .mode-badge-sub {
      font-size: 0.72rem;
      font-weight: 700;
      padding: 2px 7px;
      border-radius: 9999px;
      background: #e2e8f0;
      color: #475569;
    }
    .mode-sub-desc {
      font-size: 0.82rem;
      color: #64748b;
      line-height: 1.4;
    }
    .mode-check-mark {
      width: 22px;
      height: 22px;
      border-radius: 50%;
      border: 2px solid #cbd5e1;
      color: transparent;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.75rem;
      font-weight: 900;
      flex-shrink: 0;
      transition: all 0.2s;
    }
    .mode-item.active .mode-check-mark {
      border-color: #ea580c;
      background: #ea580c;
      color: white;
    }

    /* Loading Spinner */
    .loading-spinner {
      width: 48px;
      height: 48px;
      border: 4px solid #fed7aa;
      border-top-color: #ea580c;
      border-radius: 50%;
      margin: 0 auto;
      animation: spin 0.8s linear infinite;
    }
    @keyframes spin {
      to { transform: rotate(360deg); }
    }

    /* Result Status Bar */
    .result-status-bar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 0.5rem;
      padding: 0.85rem 1.25rem;
      background: #ecfdf5;
      border: 1px solid #a7f3d0;
      border-radius: 10px;
    }

    /* ==========================================================================
       PC Interactive Upscale Demo Comparison Showcase
       ========================================================================== */
    .pc-showcase-box {
      margin-bottom: 2rem;
      background: #f8fafc;
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 1.25rem;
    }

    .showcase-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 0.5rem;
      padding: 0 0.25rem;
    }

    .showcase-badge-wrap {
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }

    .showcase-badge {
      display: inline-flex;
      align-items: center;
      background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
      color: #ffffff;
      font-size: 0.75rem;
      font-weight: 800;
      padding: 3px 10px;
      border-radius: 999px;
      box-shadow: 0 2px 6px rgba(234, 88, 12, 0.25);
    }

    .showcase-title {
      font-size: 0.95rem;
      font-weight: 700;
      color: #0f172a;
    }

    .showcase-hint {
      font-size: 0.8rem;
      color: var(--text-muted);
      font-weight: 600;
    }

    .pc-upscale-stage {
      width: 100%;
    }

    .m-split-container {
      position: relative;
      width: 100%;
      max-width: 960px;
      margin: 0 auto;
      aspect-ratio: 16 / 9;
      min-height: 400px;
      max-height: 540px;
      border-radius: 16px;
      overflow: hidden;
      background: #0b1120;
      border: 1px solid #e2e8f0;
      box-shadow: 0 12px 32px -6px rgba(15, 23, 42, 0.15), 0 0 0 1px rgba(15, 23, 42, 0.05);
      user-select: none;
      -webkit-user-select: none;
      touch-action: none;
      transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
      container-type: inline-size;
    }

    /* Minimalist In-Canvas Floating Upload (Clean PhotoGov Style, Same as Cutout) */
    .canvas-floating-upload {
      position: absolute;
      bottom: 24px;
      left: 50%;
      transform: translateX(-50%);
      z-index: 25;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      pointer-events: auto;
      user-select: none;
      transition: opacity 0.25s ease, transform 0.25s ease;
    }
    .btn-cutout-minimal,
    .canvas-floating-upload .btn-cutout-main {
      position: relative;
      overflow: hidden;
      width: auto;
      min-width: 180px;
      padding: 10px 24px;
      border-radius: 999px;
      border: 1px solid rgba(255, 255, 255, 0.6);
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      background: #ffffff;
      color: #0f172a;
      font-size: 0.92rem;
      font-weight: 700;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
      transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .btn-cutout-minimal:hover,
    .canvas-floating-upload .btn-cutout-main:hover {
      background: #ffffff;
      border-color: #ea580c;
      color: #ea580c;
      box-shadow: 0 6px 22px rgba(234, 88, 12, 0.4);
      transform: translateY(-2px) scale(1.02);
    }
    .btn-cutout-minimal:active,
    .canvas-floating-upload .btn-cutout-main:active {
      transform: translateY(0) scale(0.98);
    }
    .btn-upload-svg {
      width: 16px;
      height: 16px;
      stroke: #ea580c;
      flex-shrink: 0;
    }
    .canvas-floating-upload .upload-specs-hint {
      font-size: 0.72rem;
      font-weight: 600;
      color: rgba(255, 255, 255, 0.95);
      text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
      letter-spacing: 0.03em;
    }
    .canvas-floating-upload.dragover .btn-cutout-minimal {
      background: #fff7ed;
      border-color: #ea580c;
      transform: scale(1.04);
    }

    .m-split-container.is-zoomed-2x {
      transform: scale(1.4);
      z-index: 40;
    }

    .m-split-img {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center 20%;
      pointer-events: none;
      user-select: none;
      display: block;
    }

    /* The clipped overlay showing Original / Before */
    .m-split-clip {
      position: absolute;
      top: 0;
      left: 0;
      height: 100%;
      overflow: hidden;
      z-index: 2;
      border-right: 2px solid rgba(255, 255, 255, 0.9);
      pointer-events: none;
    }

    /* 关键：clip 内部的图片宽度必须与整个容器 100% 相同，保证左右五官像素级对齐 */
    .m-split-clip .m-split-img {
      width: 100cqw;
      height: 100%;
      object-fit: cover;
      object-position: center 20%;
      max-width: none;
    }

    /* Interactive Divider Bar & Knob */
    .m-split-handle {
      position: absolute;
      top: 0;
      bottom: 0;
      width: 44px;
      margin-left: -22px;
      z-index: 10;
      cursor: ew-resize;
      display: flex;
      align-items: center;
      justify-content: center;
      pointer-events: auto;
      touch-action: none;
    }

    .m-split-line {
      position: absolute;
      top: 0;
      bottom: 0;
      width: 2px;
      background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, #ffffff 50%, rgba(255,255,255,0.4) 100%);
      box-shadow: 0 0 8px rgba(0, 0, 0, 0.45);
    }

    .m-split-knob {
      position: relative;
      z-index: 2;
      width: 38px;
      height: 38px;
      border-radius: 50%;
      background: #ffffff;
      color: #0f172a;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), 0 0 0 2px rgba(255, 255, 255, 0.4);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 1px;
      transition: transform 0.15s ease, box-shadow 0.15s ease;
    }

    .m-split-handle:hover .m-split-knob,
    .m-split-handle:active .m-split-knob {
      transform: scale(1.12);
      box-shadow: 0 6px 20px rgba(234, 88, 12, 0.45), 0 0 0 4px rgba(234, 88, 12, 0.25);
    }

    /* Floating Compare Badges */
    .m-badge-floating {
      position: absolute;
      top: 14px;
      z-index: 15;
      padding: 5px 12px;
      border-radius: 999px;
      font-size: 0.75rem;
      font-weight: 800;
      letter-spacing: 0.2px;
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      pointer-events: none;
    }

    .m-badge-before {
      left: 14px;
      background: rgba(15, 23, 42, 0.75);
      color: #f1f5f9;
      border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .m-badge-after {
      right: 14px;
      background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
      color: #ffffff;
      border: 1px solid rgba(255, 255, 255, 0.25);
      box-shadow: 0 2px 8px rgba(234, 88, 12, 0.35);
    }

    /* Stage Bottom Action Pills */
    .m-stage-float-actions {
      position: absolute;
      bottom: 14px;
      right: 14px;
      z-index: 15;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .m-float-btn {
      background: rgba(15, 23, 42, 0.75);
      border: 1px solid rgba(255, 255, 255, 0.2);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      color: #f8fafc;
      border-radius: 999px;
      padding: 6px 13px;
      font-size: 0.78rem;
      font-weight: 700;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      cursor: pointer;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
      transition: all 0.15s ease;
      user-select: none;
    }

    .m-float-btn:hover {
      background: rgba(30, 41, 59, 0.9);
      color: #ffffff;
    }

    .m-float-btn:active,
    .m-float-btn.active {
      background: #ea580c;
      color: #ffffff;
      border-color: #ea580c;
      transform: scale(0.96);
    }

    /* ==========================================================================
       Mode Selection Modal (Shared Mobile & PC)
       ========================================================================== */
    .m-mode-modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(15, 23, 42, 0.65);
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
      z-index: 99999;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 1.25rem;
      transition: opacity 0.22s ease;
    }

    .m-mode-modal-sheet {
      width: 100%;
      max-width: 500px;
      background: #ffffff;
      border-radius: 20px;
      padding: 1.5rem 1.5rem 1.25rem 1.5rem;
      box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
      border: 1px solid #e2e8f0;
      animation: mSheetScaleIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    @keyframes mSheetScaleIn {
      from { transform: scale(0.94); opacity: 0; }
      to { transform: scale(1); opacity: 1; }
    }

    .m-sheet-drag-handle {
      display: none;
    }

    .m-sheet-header {
      text-align: center;
      margin-bottom: 1.25rem;
    }

    .m-sheet-title {
      font-size: 1.2rem;
      font-weight: 800;
      color: #0f172a;
      margin: 0 0 0.35rem 0;
    }

    .m-sheet-subtitle {
      font-size: 0.85rem;
      color: #64748b;
      margin: 0;
    }

    .m-sheet-options {
      display: flex;
      flex-direction: column;
      gap: 12px;
      margin-bottom: 1.25rem;
    }

    .m-sheet-card {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 1rem 1.1rem;
      border-radius: 14px;
      border: 2px solid #e2e8f0;
      background: #f8fafc;
      cursor: pointer;
      transition: all 0.18s ease;
      user-select: none;
    }

    .m-sheet-card:hover {
      border-color: #ea580c;
      background: #fffaf5;
      transform: translateY(-2px);
      box-shadow: 0 6px 18px rgba(234, 88, 12, 0.12);
    }

    .m-sheet-card:active {
      transform: scale(0.99);
    }

    .m-sheet-card-icon {
      width: 46px;
      height: 46px;
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.5rem;
      flex-shrink: 0;
    }

    .m-sheet-card-icon.icon-portrait {
      background: #ffedd5;
      border: 1px solid #fed7aa;
    }

    .m-sheet-card-icon.icon-general {
      background: #dbeafe;
      border: 1px solid #bfdbfe;
    }

    .m-sheet-card-content {
      flex: 1;
      min-width: 0;
    }

    .m-sheet-card-title-row {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 4px;
    }

    .m-sheet-card-name {
      font-size: 1rem;
      font-weight: 700;
      color: #0f172a;
    }

    .m-sheet-card-badge {
      font-size: 0.7rem;
      font-weight: 700;
      padding: 2px 7px;
      border-radius: 6px;
    }

    .badge-portrait {
      background: #ffedd5;
      color: #c2410c;
    }

    .badge-general {
      background: #dbeafe;
      color: #1d4ed8;
    }

    .m-sheet-card-desc {
      font-size: 0.8rem;
      color: #64748b;
      margin: 0;
      line-height: 1.4;
    }

    .m-sheet-card-arrow {
      color: #94a3b8;
      flex-shrink: 0;
    }

    .m-sheet-btn-cancel {
      width: 100%;
      padding: 0.75rem;
      border-radius: 10px;
      background: #f1f5f9;
      border: 1px solid #e2e8f0;
      color: #64748b;
      font-size: 0.9rem;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.15s ease;
    }

    .m-sheet-btn-cancel:hover {
      background: #e2e8f0;
      color: #0f172a;
    }

    /* =========================================================================
       Result Display Stage & Web-Level Watermark Badge (Pure UI Overlay)
       ========================================================================= */
    .result-display-wrap {
      position: relative;
      width: 100%;
      max-width: 660px;
      margin: 0 auto;
      border-radius: 14px;
      overflow: hidden;
      background: #0f172a;
      border: 1px solid #e2e8f0;
      box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.12);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .result-display-img {
      width: 100%;
      max-height: 480px;
      object-fit: contain;
      display: block;
    }

    /* Web-level overlay watermark: pure white text, no background, slightly larger */
    .result-watermark-badge {
      position: absolute;
      bottom: 14px;
      right: 18px;
      color: rgba(255, 255, 255, 0.92);
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
      font-size: 1rem;
      font-weight: 700;
      letter-spacing: 0.6px;
      text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 2px 6px rgba(0, 0, 0, 0.5);
      pointer-events: none;
      user-select: none;
      z-index: 10;
    }