:root {
      --primary: #9333ea;
      --primary-hover: #7e22ce;
      --primary-light: #faf5ff;
      --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.5rem;
      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 ease;
    }
    .brand-badge:hover {
      background: #ffedd5;
      border-color: #fdba74;
    }
    .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);
    }
    .nav-btn.primary:hover { background: #c2410c; color: white; }

    .hero-sec {
      max-width: 1120px;
      margin: 2.5rem auto 1.5rem auto;
      padding: 0 1.25rem;
      text-align: center;
    }
    .hero-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 0.78rem;
      font-weight: 600;
      color: #475569;
      background: #f8fafc;
      padding: 3px 10px;
      border-radius: 20px;
      margin-bottom: 0.85rem;
      border: 1px solid rgba(0, 0, 0, 0.08);
    }
    .hero-title {
      font-size: 2.4rem;
      font-weight: 800;
      letter-spacing: -0.025em;
      color: #0f172a;
      line-height: 1.25;
      margin-bottom: 0.75rem;
    }
    .hero-sub {
      font-size: 1.05rem;
      color: var(--text-muted);
      max-width: 700px;
      margin: 0 auto;
      line-height: 1.6;
    }

    .app-box {
      max-width: 1120px;
      margin: 1.5rem auto 3rem auto;
      background: transparent;
      border: none;
      box-shadow: none;
      padding: 0 1.25rem;
    }

    /* Multi-Tool Suite Tabs */
    .suite-tabs-wrap {
      margin-bottom: 2rem;
      display: flex;
      justify-content: center;
      border-bottom: 1px solid rgba(0, 0, 0, 0.08);
      padding-bottom: 0.25rem;
    }
    .suite-tabs-nav {
      display: inline-flex;
      align-items: center;
      background: transparent;
      padding: 0;
      margin-bottom: -1px;
      gap: 2.2rem;
      border: none;
      box-shadow: none;
      max-width: 100%;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }
    .suite-tab-item {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 0.55rem 0.6rem;
      font-size: 0.92rem;
      font-weight: 500;
      color: #64748b;
      text-decoration: none;
      transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
      white-space: nowrap;
      border: none;
      border-bottom: 2px solid transparent;
      background: transparent;
      user-select: none;
    }
    .suite-tab-item svg {
      opacity: 0.65;
      transition: opacity 0.15s ease;
      color: currentColor;
    }
    .suite-tab-item:hover {
      color: #0f172a;
      background: transparent;
      border-color: rgba(0, 0, 0, 0.18);
    }
    .suite-tab-item:hover svg {
      opacity: 0.9;
    }
    .suite-tab-item.active {
      background: transparent;
      color: #0f172a;
      font-weight: 600;
      border: none;
      border-bottom: 2px solid #0f172a;
      box-shadow: none;
      border-radius: 0;
    }
    .suite-tab-item.active svg {
      color: #0f172a;
      opacity: 1;
    }

    @media (max-width: 768px) {
      .suite-tabs-wrap {
        width: 100%;
        margin-bottom: 1.25rem;
        border-bottom: none;
        padding: 0;
        justify-content: stretch;
      }
      .suite-tabs-nav {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px 10px;
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
        background: transparent;
        border: none;
        box-shadow: none;
      }
      .suite-tab-item {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 0.6rem 0.5rem;
        font-size: 0.85rem;
        font-weight: 500;
        color: #475569;
        background: #ffffff;
        border: 1px solid rgba(0, 0, 0, 0.08);
        border-radius: 8px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
        text-align: center;
        white-space: nowrap;
        text-decoration: none;
        box-sizing: border-box;
        transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
        user-select: none;
      }
      .suite-tab-item span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .suite-tab-item svg {
        flex-shrink: 0;
        opacity: 0.7;
        color: currentColor;
      }
      .suite-tab-item:hover,
      .suite-tab-item:focus {
        color: #0f172a;
        border-color: rgba(0, 0, 0, 0.2);
        text-decoration: none;
      }
      .suite-tab-item.active {
        color: #0f172a;
        font-weight: 700;
        background: #f8fafc;
        border: 1.5px solid #0f172a;
        box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
      }
      .suite-tab-item.active svg {
        color: #0f172a;
        opacity: 1;
      }
    }

    /* Minimalist Dropzone */
    .dropzone {
      border: 1.5px dashed #cbd5e1;
      border-radius: 18px;
      padding: 3rem 1.5rem;
      text-align: center;
      cursor: pointer;
      background: #ffffff;
      box-shadow: 0 4px 20px rgba(15, 23, 42, 0.03);
      transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
      position: relative;
    }
    .dropzone:hover { border-color: #0f172a; background: #fafafa; }
    .dropzone-icon-badge {
      width: 52px;
      height: 52px;
      margin: 0 auto 1.1rem;
      background: #f8fafc;
      border: 1px solid rgba(0, 0, 0, 0.06);
      border-radius: 14px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #475569;
      transition: transform 0.2s ease, border-color 0.2s ease;
    }
    .dropzone:hover .dropzone-icon-badge {
      transform: translateY(-2px);
      color: #0f172a;
      border-color: rgba(0, 0, 0, 0.12);
    }
    .dropzone-title {
      font-size: 1.15rem;
      font-weight: 700;
      color: #0f172a;
      margin-bottom: 1.2rem;
      letter-spacing: -0.01em;
    }
    .dropzone-cta-btn {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: #ffffff;
      color: #0f172a;
      border: 1px solid rgba(0, 0, 0, 0.12);
      padding: 0.7rem 1.6rem;
      border-radius: 10px;
      font-size: 0.92rem;
      font-weight: 600;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
      cursor: pointer;
      transition: all 0.15s ease;
      margin-bottom: 1rem;
    }
    .dropzone-cta-btn:hover {
      border-color: #0f172a;
      background: #f8fafc;
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }
    .dropzone-hints {
      display: flex;
      justify-content: center;
      gap: 0.6rem;
      flex-wrap: wrap;
    }
    .dropzone-badge {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      font-size: 0.76rem;
      color: #64748b;
      background: transparent;
      padding: 0;
      border: none;
      font-weight: 500;
    }
    @media (max-width: 768px) {
      .dropzone {
        padding: 2.4rem 1.2rem;
        border-radius: 16px;
      }
      .dropzone-icon-badge {
        width: 46px;
        height: 46px;
        margin-bottom: 0.8rem;
      }
      .dropzone-title {
        font-size: 1.05rem;
        margin-bottom: 0.85rem;
      }
      .dropzone-cta-btn {
        padding: 0.6rem 1.35rem;
        font-size: 0.88rem;
      }
    }

    .workspace-wrap {
      display: none;
      flex-direction: column;
      gap: 1.25rem;
    }

    .format-pills {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
      gap: 0.65rem;
      margin: 1.15rem 0;
    }
    .fmt-btn {
      padding: 0.75rem 0.85rem;
      font-size: 0.92rem;
      font-weight: 700;
      border-radius: 10px;
      border: 1px solid rgba(0, 0, 0, 0.08);
      background: #ffffff;
      color: #0f172a;
      cursor: pointer;
      transition: all 0.15s ease;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 3px;
      text-align: center;
    }
    .fmt-btn:hover { border-color: rgba(0, 0, 0, 0.2); background: #f8fafc; }
    .fmt-btn.active {
      border-color: #0f172a;
      background: #f8fafc;
      color: #0f172a;
    }

    .btn-action-group {
      display: flex;
      justify-content: center;
      gap: 0.85rem;
      margin-top: 1rem;
      flex-wrap: wrap;
    }
    .btn-lg {
      padding: 0.75rem 1.6rem;
      font-size: 0.95rem;
      font-weight: 600;
      border-radius: 8px;
      cursor: pointer;
      border: none;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      transition: all 0.15s ease;
    }
    .btn-download {
      background: #0f172a;
      color: white;
      border: 1px solid #0f172a;
      box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
    }
    .btn-download:hover { background: #1e293b; border-color: #1e293b; }
    .btn-outline {
      background: #ffffff;
      border: 1px solid rgba(0, 0, 0, 0.12);
      color: #0f172a;
    }

    .back-banner {
      background: var(--surface-subtle);
      border: 1px solid var(--border);
      border-radius: var(--radius-md, 8px);
      padding: 1.5rem;
      text-align: center;
      margin: 3rem 0;
    }
    .pdf-mode-btn {
      padding: 6px 14px;
      font-size: 0.82rem;
      font-weight: 600;
      border-radius: 8px;
      border: 1px solid rgba(0, 0, 0, 0.12);
      background: #ffffff;
      color: #334155;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      transition: all 0.15s ease;
    }
    .pdf-mode-btn:hover {
      background: #f8fafc;
      color: #0f172a;
    }
    .pdf-mode-btn.active {
      background: #0f172a;
      color: #ffffff;
      border-color: #0f172a;
      box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
    }
  
    /* 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;
    }

    /* Floating Toast Notification */
    #toast {
      position: fixed;
      top: 24px;
      bottom: auto !important;
      height: auto !important;
      max-height: fit-content !important;
      max-width: 90vw !important;
      white-space: nowrap !important;
      left: 50%;
      transform: translateX(-50%) translateY(-20px);
      background: rgba(15, 23, 42, 0.94);
      color: #ffffff;
      padding: 10px 24px;
      border-radius: 9999px;
      font-size: 0.9rem;
      font-weight: 700;
      box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.12);
      z-index: 9999999;
      pointer-events: none;
      opacity: 0;
      transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
      display: flex;
      align-items: center;
      gap: 8px;
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
    }
    #toast.show {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }

    /* Primary Uploaded Image Showcase / Hero Card */
    .convert-preview-hero {
      background: #ffffff;
      border: 1px solid #e2e8f0;
      border-radius: 14px;
      padding: 1rem;
      margin-bottom: 1.25rem;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    }
    .convert-preview-img-box {
      position: relative;
      max-height: 280px;
      min-height: 160px;
      overflow: hidden;
      border-radius: 10px;
      background: repeating-conic-gradient(#f1f5f9 0% 25%, #ffffff 0% 50%) 50% / 12px 12px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .convert-preview-img-box img {
      max-height: 280px;
      max-width: 100%;
      object-fit: contain;
      border-radius: 8px;
      display: block;
      margin: 0 auto;
    }
    .file-item-thumb {
      width: 44px;
      height: 44px;
      object-fit: cover;
      border-radius: 8px;
      border: 1px solid #e2e8f0;
      flex-shrink: 0;
      background: #f8fafc;
    }
    .file-item-icon-badge {
      width: 44px;
      height: 44px;
      border-radius: 8px;
      background: #f1f5f9;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.3rem;
      flex-shrink: 0;
    }
    .dropzone.is-hidden {
      display: none !important;
    }