    :root {
      --ypg-blue: #0b63e5;
      --ypg-blue-dark: #0957cb;
      --ypg-navy: #0b1526;
      --ypg-header-gradient: linear-gradient(180deg, #0b63e5 0%, #0957cb 100%);
      --ypg-bg: #f8fafc;
      --ypg-card: #ffffff;
      --ypg-text-dark: #0f172a;
      --ypg-text-muted: #64748b;
      --ypg-border: #e2e8f0;
      --ypg-border-light: #eef2f6;
      --ypg-green: #0d9f67;
      --ypg-green-bg: #e6f9f0;
      --ypg-offer-bg: #eff6ff;
      --ypg-offer-border: #dbeafe;
      --ypg-danger: #ef4444;
      --ypg-input-border: #cbd5e1;
      --ypg-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    }

    /* High contrast: set by the checkout script when the device asks for more
       contrast (prefers-contrast: more). Text reaches 7:1 on its background and
       card/input borders 3:1. The --ypg-hc-* names exist only here; elsewhere
       each var() falls back to its original colour. The merchant colour is
       darkened to 7:1 in applyDynamicTheme, since it is set inline. */
    :root[data-theme="checkout-hc"] {
      --ypg-blue: #0846a6;
      --ypg-blue-dark: #062f70;
      --ypg-text-muted: #334155;
      --ypg-border: #7c8a9e;
      --ypg-border-light: #7c8a9e;
      --ypg-input-border: #64748b;
      --ypg-green: #065f46;
      --ypg-danger: #7f1d1d;
      --ypg-hc-text-body: #334155;
      --ypg-hc-text-faint: #334155;
      --ypg-hc-success: #14532d;
      --ypg-hc-danger: #7f1d1d;
      --ypg-hc-warning: #78350f;
      --ypg-hc-info: #1e3a8a;
      --ypg-hc-divider: #7c8a9e;
      --ypg-hc-avatar: #0f766e;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      font-family: var(--ypg-font);
      -webkit-tap-highlight-color: transparent;
    }

    [hidden],
    #paymentGatewayInterface[hidden],
    #preGatewayAuthView[hidden] {
      display: none !important;
    }

    html,
    body {
      touch-action: pan-y;
      -webkit-overflow-scrolling: touch;
      height: 100%;
      height: 100dvh;
      margin: 0;
      padding: 0;
    }

    body {
      background-color: #0b0f19;
      color: var(--ypg-text-dark);
      min-height: 100vh;
      min-height: 100dvh;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0;
      margin: 0;
      overflow-x: hidden;
      font-size: 14px;
    }

    body.is-embedded {
      background: transparent;
      padding: 0;
      margin: 0;
      width: 100%;
      height: 100%;
      height: 100dvh;
      min-height: 100%;
      overflow: hidden;
    }

    /* --- YOUPI PG CARD / DRAWER CONTAINER --- */
    .ypg-wrapper {
      width: 100%;
      max-width: 440px;
      min-height: 100vh;
      background: #ffffff;
      display: flex;
      flex-direction: column;
      box-shadow: 0 25px 65px rgba(0, 0, 0, 0.45);
      position: relative;
      overflow: hidden;
    }

    @media (min-width: 601px) {
      body:not(.is-embedded) {
        padding: 24px;
      }

      body:not(.is-embedded) .ypg-wrapper {
        min-height: 640px;
        max-height: 92vh;
        border-radius: 16px;
      }

      body.is-embedded .ypg-wrapper {
        min-height: 100vh;
        height: 100%;
        max-width: 100%;
        border-radius: 0;
      }
    }

    @media (max-width: 600px) {
      .ypg-wrapper {
        max-width: 100vw;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
      }
    }

    /* --- MOBILE TOP DRAG HANDLE --- */
    .ypg-drag-handle-bar {
      display: none;
      width: 36px;
      height: 4px;
      background: rgba(255, 255, 255, 0.45);
      border-radius: 9999px;
      margin: 8px auto 6px auto;
    }

    @media (max-width: 600px) {
      .ypg-drag-handle-bar {
        display: block;
      }
    }

    /* --- 1. INITIAL LOADING SPLASH SCREEN (YOUPI PG EMBLEM) --- */
    .ypg-splash-screen {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: #f4f5f7;
      z-index: 100;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      transition: opacity 0.4s ease, visibility 0.4s ease;
    }

    .ypg-splash-screen.fade-out {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
    }

    .ypg-splash-center {
      position: relative;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      margin-bottom: 70px;
    }

    .ypg-shield-orbit-box {
      position: relative;
      width: 110px;
      height: 110px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .ypg-shield-icon-svg {
      width: 82px;
      height: 94px;
      filter: drop-shadow(0 8px 18px rgba(11, 99, 229, 0.3));
      animation: ypgPulseShield 2s infinite ease-in-out;
    }

    @keyframes ypgPulseShield {

      0%,
      100% {
        transform: scale(1);
      }

      50% {
        transform: scale(1.04);
      }
    }

    .ypg-orbit-dot {
      position: absolute;
      width: 12px;
      height: 12px;
      background: #0b63e5;
      border: 2px solid #ffffff;
      border-radius: 50%;
      top: 8px;
      left: 20px;
      box-shadow: 0 0 8px rgba(11, 99, 229, 0.6);
      animation: ypgOrbitAnimation 1.5s infinite linear;
    }

    @keyframes ypgOrbitAnimation {
      0% {
        transform: rotate(0deg) translateX(46px) rotate(0deg);
      }

      100% {
        transform: rotate(360deg) translateX(46px) rotate(-360deg);
      }
    }

    .ypg-splash-footer {
      position: absolute;
      bottom: 24px;
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 13px;
      font-weight: 700;
      color: var(--ypg-text-muted);
    }

    /* --- 2. AUTHENTIC YOUPI PG HEADER --- */
    .ypg-header {
      background: var(--ypg-header-gradient);
      color: #ffffff;
      position: relative;
      display: flex;
      flex-direction: column;
      flex-shrink: 0;
    }

    .ypg-header-main-row {
      padding: 12px 16px 10px 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    body.is-embedded .ypg-header-main-row {
      padding-right: 56px;
      /* Avoid collision with parent modal close button at top-right 14px */
    }

    .ypg-header-left-group {
      display: flex;
      align-items: center;
      gap: 12px;
      flex: 1;
      overflow: hidden;
    }

    .ypg-btn-back {
      background: none;
      border: none;
      color: #ffffff;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 4px;
      border-radius: 6px;
      transition: background 0.15s;
    }

    .ypg-btn-back:hover {
      background: rgba(255, 255, 255, 0.15);
    }

    /* Teal Merchant Avatar with Initial */
    .ypg-merchant-avatar {
      width: 38px;
      height: 38px;
      border-radius: 10px;
      background: var(--ypg-hc-avatar, #14b8a6);
      border: 1.5px solid rgba(255, 255, 255, 0.85);
      color: #ffffff;
      font-size: 19px;
      font-weight: 800;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
      flex-shrink: 0;
      overflow: hidden;
    }

    .ypg-merchant-avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .ypg-merchant-text-group {
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    .ypg-merchant-name {
      font-size: 16px;
      font-weight: 700;
      color: #ffffff;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      line-height: 1.25;
    }

    /* YouPI PG Verified Business Badge */
    .ypg-trusted-badge {
      display: flex;
      align-items: center;
      gap: 4px;
      font-size: 11.5px;
      font-weight: 600;
      color: rgba(255, 255, 255, 0.95);
      margin-top: 1px;
    }

    .ypg-green-shield {
      width: 13px;
      height: 13px;
      flex-shrink: 0;
    }

    /* Profile Account Icon */
    .ypg-btn-profile {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.2);
      border: none;
      color: #ffffff;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.15s;
      flex-shrink: 0;
    }

    .ypg-btn-profile:hover {
      background: rgba(255, 255, 255, 0.35);
    }

    /* Sub-banner */
    .ypg-header-subbanner {
      background: rgba(0, 0, 0, 0.12);
      padding: 6px 16px;
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 11.5px;
      font-weight: 500;
      color: #ffffff;
    }

    .ypg-header-subbanner svg {
      width: 14px;
      height: 14px;
      flex-shrink: 0;
    }

    /* Profile Dropdown Popover */
    .ypg-account-popover {
      position: absolute;
      top: 54px;
      right: 16px;
      background: #ffffff;
      color: var(--ypg-text-dark);
      border-radius: 10px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
      border: 1px solid var(--ypg-border);
      padding: 8px;
      z-index: 50;
      min-width: 190px;
      animation: ypgFadeInDown 0.15s ease-out;
    }

    @keyframes ypgFadeInDown {
      from {
        opacity: 0;
        transform: translateY(-6px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .ypg-popover-item {
      width: 100%;
      text-align: left;
      padding: 8px 12px;
      background: none;
      border: none;
      font-size: 12px;
      font-weight: 600;
      color: var(--ypg-text-dark);
      border-radius: 6px;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .ypg-popover-item:hover {
      background: var(--ypg-bg);
    }

    /* --- 3. SCROLLABLE BODY (WHITE SURFACE) --- */
    .ypg-body {
      flex: 1;
      overflow-y: auto;
      background: #ffffff;
      padding: 16px 16px 20px 16px;
      display: flex;
      flex-direction: column;
      position: relative;
    }

    .ypg-page-title {
      font-size: 18px;
      font-weight: 700;
      color: var(--ypg-text-dark);
      margin-bottom: 12px;
      letter-spacing: -0.01em;
    }

    /* Available Offers Pill */
    .ypg-offers-pill {
      background: var(--ypg-offer-bg);
      border: 1px solid var(--ypg-offer-border);
      border-radius: 9999px;
      padding: 6px 14px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 18px;
      cursor: pointer;
      transition: background 0.15s;
    }

    .ypg-offers-pill:hover {
      background: #e2eeff;
    }

    .ypg-offers-left {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 12px;
      font-weight: 600;
      color: var(--ypg-hc-info, #1e3a8a);
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }

    .ypg-offer-icon-badge {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: #fee2e2;
      color: var(--ypg-hc-danger, #b91c1c);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 11px;
      font-weight: 800;
      flex-shrink: 0;
    }

    .ypg-offers-right {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 12px;
      font-weight: 600;
      color: var(--ypg-blue);
      flex-shrink: 0;
    }

    /* Section Label Row */
    .ypg-section-label-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 8px;
    }

    .ypg-section-heading {
      font-size: 13.5px;
      font-weight: 600;
      color: #334155;
    }

    .ypg-countdown-pill {
      background: #f1f5f9;
      border: 1px solid var(--ypg-border);
      border-radius: 9999px;
      padding: 2px 9px;
      font-size: 11.5px;
      font-weight: 600;
      color: var(--ypg-hc-text-body, #475569);
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }

    /* --- 4. CORE UPI QR CARD (STRICTLY UPI ONLY) --- */
    .ypg-qr-card-container {
      background: #f8fafc;
      border: 1px solid var(--ypg-border-light);
      border-radius: 16px;
      padding: 16px;
      display: flex;
      gap: 16px;
      align-items: center;
      margin-bottom: 18px;
    }

    .ypg-qr-image-box {
      width: 130px;
      height: 130px;
      background: #ffffff;
      border: 1px solid var(--ypg-border);
      border-radius: 12px;
      padding: 6px;
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      position: relative;
    }

    .ypg-qr-image-box svg {
      width: 100%;
      height: 100%;
    }

    .ypg-qr-details-col {
      display: flex;
      flex-direction: column;
      gap: 8px;
      flex: 1;
      overflow: hidden;
    }

    .ypg-qr-prompt-title {
      font-size: 14px;
      font-weight: 600;
      color: var(--ypg-text-dark);
      line-height: 1.3;
    }

    /* UPI Brand Logos */
    .ypg-upi-logos-row {
      display: flex;
      align-items: center;
      gap: 5px;
      flex-wrap: wrap;
    }

    .ypg-app-icon {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
      cursor: pointer;
      transition: transform 0.15s ease, box-shadow 0.15s ease;
      user-select: none;
    }

    .ypg-app-icon:hover {
      transform: scale(1.18);
      box-shadow: 0 3px 8px rgba(0, 0, 0, 0.22);
    }

    .ypg-app-icon:active {
      transform: scale(0.92);
    }

    .ypg-app-icon img,
    .ypg-app-icon svg {
      width: 100%;
      height: 100%;
      border-radius: 50%;
      pointer-events: none;
    }

    .ypg-btn-upi-mobile-intent {
      display: none;
    }

    .ypg-green-pill-badge {
      background: var(--ypg-green-bg);
      color: var(--ypg-green);
      font-size: 11px;
      font-weight: 600;
      padding: 2.5px 8px;
      border-radius: 9999px;
      align-self: flex-start;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }

    /* Payee VPA & Copy Button */
    .ypg-vpa-copy-row {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-top: 2px;
    }

    .ypg-vpa-badge {
      font-size: 11px;
      font-weight: 600;
      color: var(--ypg-hc-text-body, #475569);
      background: #edf2f7;
      padding: 2px 7px;
      border-radius: 6px;
      max-width: 140px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .ypg-btn-mini-copy {
      background: none;
      border: 1px solid var(--ypg-input-border);
      border-radius: 5px;
      font-size: 10px;
      font-weight: 700;
      color: #334155;
      padding: 2px 6px;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 3px;
      transition: all 0.15s;
    }

    .ypg-btn-mini-copy:hover {
      border-color: var(--ypg-blue);
      color: var(--ypg-blue);
    }

    .ypg-btn-mini-copy.copied {
      background: #10b981;
      border-color: #10b981;
      color: #ffffff;
    }

    /* Live Observer Radar Strip */
    .ypg-live-observer-strip {
      background: #f0fdf4;
      border: 1px solid #bbf7d0;
      border-radius: 10px;
      padding: 10px 14px;
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 12px;
      font-weight: 600;
      color: var(--ypg-hc-success, #166534);
      margin-bottom: 14px;
    }

    .ypg-radar-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #16a34a;
      box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
      animation: ypgPulseDot 1.8s infinite;
      flex-shrink: 0;
    }

    @keyframes ypgPulseDot {
      0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
      }

      70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(22, 163, 74, 0);
      }

      100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
      }
    }

    /* UPI Instructions Card */
    .ypg-instructions-card {
      background: #ffffff;
      border: 1px solid var(--ypg-border);
      border-radius: 12px;
      padding: 14px 16px;
      margin-bottom: 16px;
    }

    .ypg-instruction-step {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      margin-bottom: 8px;
      font-size: 12.5px;
      color: #334155;
    }

    .ypg-instruction-step:last-child {
      margin-bottom: 0;
    }

    .ypg-step-num {
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: #eff6ff;
      color: var(--ypg-blue);
      font-size: 11px;
      font-weight: 800;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      margin-top: 1px;
    }

    /* Payment Method Selector Bar (Online / Offline Modalities) */
    .ypg-method-selector-bar {
      display: flex;
      gap: 6px;
      background: #f1f5f9;
      padding: 4px;
      border-radius: 10px;
      margin-bottom: 14px;
      border: 1px solid var(--ypg-border);
    }

    .ypg-method-tab {
      flex: 1;
      text-align: center;
      padding: 7px 10px;
      border-radius: 8px;
      font-size: 11.5px;
      font-weight: 700;
      cursor: pointer;
      border: none;
      background: transparent;
      color: var(--ypg-text-muted);
      transition: all 0.15s ease;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
    }

    .ypg-method-tab:hover {
      color: var(--ypg-navy);
    }

    .ypg-method-tab.active {
      background: #ffffff;
      color: var(--ypg-blue);
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    }

    .ypg-tab-icon {
      height: 14px;
      width: auto;
      object-fit: contain;
      display: inline-block;
      vertical-align: middle;
      flex-shrink: 0;
    }

    .ypg-tab-icon-svg {
      width: 14px;
      height: 14px;
      display: inline-block;
      vertical-align: middle;
      flex-shrink: 0;
    }

    .ypg-card-logos-combo {
      display: inline-flex;
      align-items: center;
      gap: 3px;
      vertical-align: middle;
      flex-shrink: 0;
    }

    .ypg-card-logos-combo img {
      height: 13px;
      width: auto;
      object-fit: contain;
      display: inline-block;
    }

    /* --- 5. PRE-GATEWAY AUTH VIEW --- */
    .ypg-auth-box {
      background: #ffffff;
      display: flex;
      flex-direction: column;
      gap: 14px;
      margin-top: 4px;
    }

    .ypg-auth-sub-desc {
      font-size: 12.5px;
      color: var(--ypg-text-muted);
      margin-bottom: 8px;
    }

    .ypg-auth-tab-row {
      display: flex;
      background: #f1f5f9;
      border-radius: 8px;
      padding: 3px;
    }

    .ypg-auth-tab-btn {
      flex: 1;
      padding: 8px 12px;
      font-size: 12.5px;
      font-weight: 700;
      border: none;
      border-radius: 6px;
      background: transparent;
      color: var(--ypg-text-muted);
      cursor: pointer;
      transition: all 0.15s;
    }

    .ypg-auth-tab-btn.active {
      background: #ffffff;
      color: var(--ypg-navy);
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    }

    .ypg-input-group {
      margin-bottom: 12px;
    }

    .ypg-input-label {
      display: block;
      font-size: 11px;
      font-weight: 700;
      color: var(--ypg-text-dark);
      margin-bottom: 4px;
      text-transform: uppercase;
      letter-spacing: 0.3px;
    }

    .ypg-input-control {
      width: 100%;
      padding: 10px 12px;
      border: 1px solid var(--ypg-input-border);
      border-radius: 8px;
      font-size: 13.5px;
      color: var(--ypg-text-dark);
      outline: none;
      transition: border-color 0.15s;
    }

    .ypg-input-control:focus {
      border-color: var(--ypg-blue);
      box-shadow: 0 0 0 3px rgba(11, 99, 229, 0.15);
    }

    .ypg-btn-auth-action {
      width: 100%;
      padding: 12px;
      background: var(--ypg-navy);
      color: #ffffff;
      border: none;
      border-radius: 8px;
      font-size: 13.5px;
      font-weight: 700;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      transition: background 0.15s;
    }

    .ypg-btn-auth-action:hover {
      background: #1e293b;
    }

    .ypg-btn-auth-action:disabled {
      opacity: 0.65;
      cursor: not-allowed;
    }

    .ypg-phone-input-wrap {
      display: flex;
      align-items: center;
      border: 1px solid var(--ypg-input-border);
      border-radius: 8px;
      overflow: hidden;
      background: #ffffff;
      transition: border-color 0.15s, box-shadow 0.15s;
    }

    .ypg-phone-input-wrap:focus-within {
      border-color: var(--ypg-blue);
      box-shadow: 0 0 0 3px rgba(11, 99, 229, 0.15);
    }

    .ypg-phone-prefix {
      padding: 10px 12px;
      background: #f8fafc;
      border-right: 1px solid var(--ypg-border);
      font-size: 13.5px;
      font-weight: 700;
      color: var(--ypg-navy);
      display: flex;
      align-items: center;
      gap: 6px;
      user-select: none;
    }

    .ypg-phone-control {
      border: none !important;
      box-shadow: none !important;
      padding: 10px 12px;
      font-size: 14.5px;
      font-weight: 600;
      letter-spacing: 0.5px;
      flex: 1;
    }

    .ypg-auth-badge-banner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: #f0fdf4;
      border: 1px solid #bbf7d0;
      border-radius: 8px;
      padding: 10px 12px;
      margin-bottom: 12px;
      font-size: 12.5px;
      color: var(--ypg-hc-success, #166534);
    }

    .ypg-btn-link {
      background: none;
      border: none;
      color: var(--ypg-blue);
      font-weight: 700;
      cursor: pointer;
      font-size: 12px;
      padding: 0;
      text-decoration: underline;
    }

    .ypg-otp-control {
      text-align: center;
      font-size: 24px !important;
      font-weight: 800 !important;
      letter-spacing: 12px !important;
      font-family: monospace;
      padding: 12px !important;
    }

    .ypg-autootp-status-box {
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
      border-radius: 8px;
    }

    @keyframes ypg-pulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.55; transform: scale(1.12); }
    }

    .ypg-pulse {
      animation: ypg-pulse 1.8s infinite ease-in-out;
    }

    /* Saved Accounts Carousel */
    .ypg-saved-accs-wrapper {
      background: #f8fafc;
      border: 1px solid var(--ypg-border);
      border-radius: 10px;
      padding: 12px;
    }

    .saved-account-row {
      background: #ffffff;
      border: 1px solid var(--ypg-border);
      border-radius: 8px;
      padding: 10px 12px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 8px;
      cursor: pointer;
      transition: all 0.15s;
    }

    .saved-account-row:hover {
      border-color: var(--ypg-blue);
      box-shadow: 0 2px 8px rgba(11, 99, 229, 0.12);
    }

    /* --- 6. QUEUE SYSTEM VIEW --- */
    .ypg-queue-container {
      background: #eff6ff;
      border: 1px solid #bfdbfe;
      border-radius: 14px;
      padding: 28px 18px;
      text-align: center;
      margin: auto 0;
    }

    .ypg-queue-number {
      font-size: 36px;
      font-weight: 900;
      color: var(--ypg-hc-info, #1d4ed8);
      margin: 8px 0;
    }

    /* --- 7. PROCESSING / VERIFYING VIEW --- */
    .ypg-processing-box {
      text-align: center;
      padding: 40px 18px;
      margin: auto 0;
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    .ypg-double-spinner-box {
      position: relative;
      width: 72px;
      height: 72px;
      margin-bottom: 20px;
    }

    .ypg-spin-ring-outer {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      border: 4px solid rgba(11, 99, 229, 0.15);
      border-radius: 50%;
    }

    .ypg-spin-ring-inner {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      border: 4px solid transparent;
      border-top-color: var(--ypg-blue);
      border-radius: 50%;
      animation: ypgRotateRing 0.85s linear infinite;
    }

    @keyframes ypgRotateRing {
      0% {
        transform: rotate(0deg);
      }

      100% {
        transform: rotate(360deg);
      }
    }

    .ypg-spin-center-icon {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 28px;
      height: 28px;
      color: var(--ypg-blue);
      animation: ypgPulseCenter 1.5s ease-in-out infinite;
    }

    @keyframes ypgPulseCenter {

      0%,
      100% {
        transform: translate(-50%, -50%) scale(0.9);
      }

      50% {
        transform: translate(-50%, -50%) scale(1.1);
      }
    }

    .ypg-processing-title {
      font-size: 16px;
      font-weight: 700;
      color: var(--ypg-text-dark);
      margin-bottom: 6px;
    }

    .ypg-processing-sub {
      font-size: 12px;
      color: var(--ypg-text-muted);
      line-height: 1.5;
      max-width: 290px;
      margin-bottom: 14px;
    }

    .ypg-proc-timer-badge {
      background: #f1f5f9;
      border: 1px solid var(--ypg-border);
      border-radius: 9999px;
      padding: 3px 12px;
      font-size: 12px;
      font-weight: 700;
      color: #334155;
    }

    /* --- 8. SUCCESS CELEBRATION VIEW --- */
    .ypg-success-box {
      text-align: center;
      padding: 36px 18px;
      margin: auto 0;
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    .ypg-success-circle {
      width: 76px;
      height: 76px;
      border-radius: 50%;
      background: #10b981;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
      margin-bottom: 18px;
      animation: ypgSpringPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    @keyframes ypgSpringPop {
      0% {
        transform: scale(0);
        opacity: 0;
      }

      70% {
        transform: scale(1.15);
      }

      100% {
        transform: scale(1);
        opacity: 1;
      }
    }

    .ypg-check-svg {
      width: 42px;
      height: 42px;
      stroke: #ffffff;
      stroke-width: 3.5;
      stroke-linecap: round;
      stroke-linejoin: round;
      fill: none;
    }

    .ypg-check-path {
      stroke-dasharray: 40;
      stroke-dashoffset: 40;
      animation: ypgDrawCheck 0.45s 0.25s forwards ease-in-out;
    }

    @keyframes ypgDrawCheck {
      to {
        stroke-dashoffset: 0;
      }
    }

    .ypg-success-title {
      font-size: 19px;
      font-weight: 800;
      color: var(--ypg-text-dark);
      margin-bottom: 4px;
    }

    .ypg-success-amount {
      font-size: 24px;
      font-weight: 900;
      color: var(--ypg-hc-success, #10b981);
      margin-bottom: 8px;
    }

    .btn-return-merchant {
      background: var(--ypg-navy);
      color: #ffffff;
      text-decoration: none;
      font-size: 13.5px;
      font-weight: 700;
      padding: 12px 26px;
      border-radius: 8px;
      margin-top: 14px;
      display: inline-block;
    }

    /* --- 9. DEDICATED PAYMENT EXPIRED / FAILED VIEW (FIXED & CENTERED) --- */
    .ypg-expired-box {
      text-align: center;
      padding: 32px 18px;
      margin: auto 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      background: #ffffff;
      border-radius: 16px;
      border: 1px solid var(--ypg-border);
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    }

    .ypg-expired-icon-wrap {
      width: 68px;
      height: 68px;
      border-radius: 50%;
      background: #fee2e2;
      color: var(--ypg-hc-danger, #ef4444);
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 16px;
      box-shadow: 0 8px 16px rgba(239, 68, 68, 0.15);
    }

    .ypg-expired-icon-wrap svg {
      width: 34px;
      height: 34px;
    }

    .ypg-expired-title {
      font-size: 19px;
      font-weight: 800;
      color: var(--ypg-text-dark);
      margin-bottom: 6px;
    }

    .ypg-expired-desc {
      font-size: 12.5px;
      color: var(--ypg-text-muted);
      max-width: 310px;
      margin: 0 auto 20px auto;
      line-height: 1.5;
    }

    .ypg-expired-actions {
      display: flex;
      gap: 10px;
      justify-content: center;
      width: 100%;
      max-width: 300px;
    }

    .ypg-btn-expired-primary {
      flex: 1;
      padding: 12px;
      background: var(--ypg-navy);
      color: #ffffff;
      border: none;
      border-radius: 8px;
      font-size: 13.5px;
      font-weight: 700;
      cursor: pointer;
      transition: background 0.15s;
    }

    .ypg-btn-expired-primary:hover {
      background: #1e293b;
    }

    .ypg-btn-expired-secondary {
      padding: 12px 16px;
      background: #f1f5f9;
      color: var(--ypg-hc-text-body, #475569);
      border: 1px solid var(--ypg-input-border);
      border-radius: 8px;
      font-size: 13.5px;
      font-weight: 700;
      cursor: pointer;
      transition: background 0.15s;
    }

    .ypg-btn-expired-secondary:hover {
      background: #e2e8f0;
    }

    /* --- 10. DEDICATED FRAUD / SECURITY ALERT & ACCESS BLOCKED VIEW --- */
    .ypg-blocked-box {
      text-align: center;
      padding: 32px 20px;
      margin: auto 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      background: #ffffff;
      border-radius: 16px;
      border: 1.5px solid #fecaca;
      box-shadow: 0 10px 30px rgba(220, 38, 38, 0.08);
      position: relative;
      overflow: hidden;
    }
    .ypg-blocked-box::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 4px;
      background: linear-gradient(90deg, #dc2626, #b91c1c, #991b1b);
    }
    .ypg-blocked-icon-wrap {
      width: 72px;
      height: 72px;
      border-radius: 50%;
      background: #fef2f2;
      border: 2px solid #fee2e2;
      color: var(--ypg-hc-danger, #dc2626);
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 16px;
      box-shadow: 0 8px 24px rgba(220, 38, 38, 0.16);
      animation: ypgPulseAlert 2s infinite ease-in-out;
    }
    @keyframes ypgPulseAlert {
      0%, 100% { transform: scale(1); box-shadow: 0 8px 24px rgba(220, 38, 38, 0.16); }
      50% { transform: scale(1.05); box-shadow: 0 12px 30px rgba(220, 38, 38, 0.28); }
    }
    .ypg-blocked-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: #fef2f2;
      color: var(--ypg-hc-danger, #b91c1c);
      border: 1px solid #fca5a5;
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      padding: 4px 10px;
      border-radius: 20px;
      margin-bottom: 10px;
    }
    .ypg-blocked-badge-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: #dc2626;
      box-shadow: 0 0 6px #dc2626;
      animation: rzpHaloPulse 1.2s infinite;
    }
    .ypg-blocked-title {
      font-size: 20px;
      font-weight: 800;
      color: var(--ypg-hc-danger, #991b1b);
      margin-bottom: 6px;
      letter-spacing: -0.01em;
    }
    .ypg-blocked-subtitle {
      font-size: 13px;
      font-weight: 600;
      color: var(--ypg-hc-text-body, #475569);
      margin-bottom: 14px;
    }
    .ypg-blocked-card {
      background: #f8fafc;
      border: 1px solid var(--ypg-border);
      border-radius: 12px;
      padding: 14px 16px;
      margin-bottom: 18px;
      width: 100%;
      max-width: 340px;
      text-align: left;
    }
    .ypg-blocked-desc {
      font-size: 12px;
      color: #334155;
      line-height: 1.55;
      margin: 0;
    }
    .ypg-blocked-investigation {
      margin-top: 10px;
      padding-top: 10px;
      border-top: 1px dashed var(--ypg-input-border);
      display: flex;
      align-items: flex-start;
      gap: 8px;
      font-size: 11.5px;
      color: var(--ypg-text-muted);
      line-height: 1.45;
    }
    .ypg-blocked-details {
      background: #0f172a;
      border-radius: 8px;
      padding: 10px 14px;
      margin-bottom: 18px;
      width: 100%;
      max-width: 340px;
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 4px 10px;
      font-size: 11px;
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    }
    .ypg-blocked-details-label {
      /* Light text on the dark details panel: stays out of the high-contrast remap. */
      color: #94a3b8;
    }
    .ypg-blocked-details-val {
      color: #f8fafc;
      text-align: right;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .ypg-btn-blocked-exit {
      background: #0f172a;
      color: #ffffff;
      border: none;
      padding: 11px 20px;
      border-radius: 10px;
      font-weight: 700;
      font-size: 13px;
      cursor: pointer;
      width: 100%;
      max-width: 340px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      transition: all 0.2s;
    }
    .ypg-btn-blocked-exit:hover {
      background: #1e293b;
    }

    /* --- 10b. DEDICATED DUPLICATE SESSION DETECTED VIEW (DEVICE BINDING SECURITY) --- */
    .ypg-duplicate-box {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      padding: 24px 20px;
      animation: rzpFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
      width: 100%;
      box-sizing: border-box;
      position: relative;
    }
    .ypg-duplicate-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: #fef3c7;
      color: var(--ypg-hc-warning, #92400e);
      border: 1px solid #fde68a;
      padding: 4px 12px;
      border-radius: 20px;
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-bottom: 16px;
    }
    .ypg-duplicate-badge-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: #d97706;
      box-shadow: 0 0 6px #d97706;
      animation: rzpHaloPulse 1.2s infinite;
    }
    .ypg-duplicate-icon-wrap {
      width: 64px;
      height: 64px;
      border-radius: 50%;
      background: radial-gradient(circle, #fef3c7 0%, #fffbeb 100%);
      border: 2px solid #fcd34d;
      color: var(--ypg-hc-warning, #b45309);
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 14px;
      box-shadow: 0 4px 16px rgba(217, 119, 6, 0.15);
    }
    .ypg-duplicate-title {
      font-size: 20px;
      font-weight: 800;
      color: #1e293b;
      margin-bottom: 6px;
      letter-spacing: -0.01em;
    }
    .ypg-duplicate-subtitle {
      font-size: 13px;
      font-weight: 600;
      color: var(--ypg-text-muted);
      margin-bottom: 16px;
    }
    .ypg-duplicate-card {
      background: #fffbeb;
      border: 1px solid #fef08a;
      border-radius: 12px;
      padding: 16px 18px;
      margin-bottom: 22px;
      width: 100%;
      max-width: 360px;
      text-align: center;
    }
    .ypg-duplicate-desc {
      font-size: 13px;
      color: #1e293b;
      line-height: 1.55;
      margin: 0;
      font-weight: 500;
    }
    .ypg-btn-duplicate-action {
      background: #0f172a;
      color: #ffffff;
      border: none;
      padding: 13px 20px;
      border-radius: 10px;
      font-weight: 700;
      font-size: 13px;
      cursor: pointer;
      width: 100%;
      box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
      transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
      display: flex;
      align-items: center;
      justify-content: center;
      letter-spacing: 0.02em;
    }
    .ypg-btn-duplicate-action:hover {
      background: #1e293b;
      transform: translateY(-1px);
      box-shadow: 0 6px 16px rgba(15, 23, 42, 0.25);
    }
    .ypg-btn-duplicate-action:active {
      transform: translateY(0);
    }

    /* --- 11. AUTHENTIC STICKY BOTTOM FOOTER --- */
    .ypg-sticky-footer {
      background: #ffffff;
      border-top: 1px solid var(--ypg-hc-divider, #f1f5f9);
      display: flex;
      flex-direction: column;
      flex-shrink: 0;
      position: relative;
      z-index: 20;
    }

    /* Legal Disclaimer */
    .ypg-legal-disclaimer {
      font-size: 11px;
      color: var(--ypg-text-muted);
      text-align: center;
      padding: 4px 16px;
      line-height: 1.35;
    }

    /* Bottom Action Row (₹5,500 View Details | Continue Button) */
    .ypg-action-bottom-bar {
      padding: 10px 16px 14px 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .ypg-amount-view-group {
      display: flex;
      flex-direction: column;
    }

    .ypg-bottom-price {
      font-size: 18px;
      font-weight: 800;
      color: var(--ypg-text-dark);
      letter-spacing: -0.01em;
      line-height: 1.2;
    }

    .ypg-btn-view-details {
      background: none;
      border: none;
      font-size: 11px;
      font-weight: 600;
      color: var(--ypg-text-muted);
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 3px;
      padding: 0;
      margin-top: 2px;
    }

    .ypg-btn-view-details:hover {
      color: var(--ypg-blue);
    }

    .ypg-btn-continue {
      background: var(--ypg-navy);
      color: #ffffff;
      border: none;
      border-radius: 8px;
      padding: 12px 34px;
      font-size: 14.5px;
      font-weight: 700;
      cursor: pointer;
      transition: background 0.15s, transform 0.1s;
    }

    .ypg-btn-continue:hover {
      background: #1e293b;
    }

    .ypg-btn-continue:active {
      transform: scale(0.98);
    }

    /* --- ORDER BREAKDOWN POPUP DRAWER --- */
    .ypg-details-drawer {
      position: absolute;
      bottom: 0;
      left: 0;
      width: 100%;
      background: #ffffff;
      border-top-left-radius: 16px;
      border-top-right-radius: 16px;
      box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.15);
      border-top: 1px solid var(--ypg-border);
      padding: 16px 18px;
      z-index: 30;
      transform: translateY(100%);
      transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .ypg-details-drawer.open {
      transform: translateY(0);
    }

    .ypg-details-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 12px;
      font-size: 14px;
      font-weight: 700;
    }

    .ypg-details-row {
      display: flex;
      justify-content: space-between;
      font-size: 12.5px;
      color: var(--ypg-hc-text-body, #475569);
      margin-bottom: 6px;
    }

    .ypg-details-row.total {
      border-top: 1px dashed var(--ypg-border);
      padding-top: 8px;
      font-size: 14px;
      font-weight: 800;
      color: var(--ypg-text-dark);
    }

    /* Toast Notification */
    .ypg-toast {
      position: absolute;
      top: 16px;
      left: 50%;
      transform: translateX(-50%) translateY(-20px);
      background: #1e293b;
      color: #ffffff;
      padding: 8px 16px;
      border-radius: 9999px;
      font-size: 12px;
      font-weight: 600;
      opacity: 0;
      pointer-events: none;
      transition: all 0.25s ease-out;
      z-index: 1000;
      white-space: nowrap;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    .ypg-toast.show {
      transform: translateX(-50%) translateY(0);
      opacity: 1;
    }

    /* Help Modal Overlay */
    .ypg-dialog-overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(15, 23, 42, 0.6);
      backdrop-filter: blur(4px);
      z-index: 200;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 16px;
    }

    .ypg-dialog-overlay[hidden] {
      display: none !important;
    }

    .ypg-dialog-card {
      background: #ffffff;
      border-radius: 12px;
      width: 100%;
      max-width: 360px;
      padding: 18px;
    }

    /* --- AUTHENTIC RAZORPAY 3D RUNNING COIN & MODAL SHEETS --- */
    .rzp-coin-stage {
      position: relative;
      width: 84px;
      height: 84px;
      margin: 8px auto;
      display: flex;
      align-items: center;
      justify-content: center;
      perspective: 600px;
    }

    .rzp-halo-ring {
      position: absolute;
      width: 76px;
      height: 76px;
      border-radius: 50%;
      border: 2px solid rgba(254, 240, 138, 0.45);
      box-shadow: 0 0 16px rgba(250, 204, 21, 0.28), inset 0 0 10px rgba(250, 204, 21, 0.18);
      animation: rzpHaloPulse 2.2s ease-in-out infinite;
    }

    @keyframes rzpHaloPulse {

      0%,
      100% {
        transform: scale(0.95);
        opacity: 0.55;
      }

      50% {
        transform: scale(1.05);
        opacity: 0.95;
      }
    }

    .rzp-3d-coin {
      width: 54px;
      height: 54px;
      position: relative;
      transform-style: preserve-3d;
      animation: rzpCoinSpin 1.5s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
    }

    @keyframes rzpCoinSpin {
      0% {
        transform: rotateY(0deg);
      }

      50% {
        transform: rotateY(180deg);
      }

      100% {
        transform: rotateY(360deg);
      }
    }

    .rzp-coin-face {
      position: absolute;
      inset: 0;
      border-radius: 50%;
      backface-visibility: hidden;
      background: radial-gradient(circle at 35% 35%, #fff9c4 0%, #fbc02d 42%, #f57f17 82%, #d97706 100%);
      border: 3.5px solid #fff59d;
      box-shadow: 0 4px 14px rgba(217, 119, 6, 0.3), inset 0 1.5px 3px rgba(255, 255, 255, 0.7);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .rzp-coin-back {
      transform: rotateY(180deg);
    }

    .rzp-coin-inner-rim {
      width: 38px;
      height: 38px;
      border-radius: 50%;
      background: radial-gradient(circle at 38% 38%, #ffd54f 0%, #fbc02d 55%, #f57f17 100%);
      box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.18);
      position: relative;
      overflow: hidden;
    }

    .rzp-coin-sheen {
      position: absolute;
      inset: 0;
      border-radius: 50%;
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 50%);
      pointer-events: none;
    }

    /* Compact Coin for Inline Waiting Card */
    .rzp-coin-stage-inline {
      position: relative;
      width: 54px;
      height: 54px;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      perspective: 500px;
    }

    .rzp-coin-stage-inline .rzp-halo-ring {
      width: 50px;
      height: 50px;
      border-width: 1.5px;
    }

    .rzp-coin-stage-inline .rzp-3d-coin {
      width: 36px;
      height: 36px;
    }

    .rzp-coin-stage-inline .rzp-coin-face {
      border-width: 2.5px;
    }

    .rzp-coin-stage-inline .rzp-coin-inner-rim {
      width: 24px;
      height: 24px;
    }

    /* Inline Waiting Card (on UPI QR page) */
    .rzp-inline-waiting-card {
      margin: 14px 0;
      padding: 14px 16px;
      background: #ffffff;
      border: 1.5px solid #fde047;
      border-radius: 14px;
      display: flex;
      align-items: center;
      gap: 14px;
      box-shadow: 0 4px 14px rgba(234, 179, 8, 0.15);
      position: relative;
      overflow: hidden;
      text-align: left;
    }

    .rzp-inline-waiting-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 3px;
      background: linear-gradient(90deg, #f59e0b, #eab308, #f59e0b);
      background-size: 200% 100%;
      animation: rzpGlowBar 2s linear infinite;
    }

    @keyframes rzpGlowBar {
      0% {
        background-position: 0% 50%;
      }

      100% {
        background-position: 200% 50%;
      }
    }

    /* Full-Screen Bottom Sheet / Dialog Modals */
    .rzp-sheet-backdrop {
      position: fixed;
      inset: 0;
      width: 100%;
      height: 100%;
      height: 100dvh;
      background: rgba(15, 23, 42, 0.65);
      backdrop-filter: blur(5px);
      -webkit-backdrop-filter: blur(5px);
      z-index: 99999;
      display: flex;
      align-items: flex-end;
      justify-content: center;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.25s ease-out;
      overflow: hidden;
    }

    @media (min-width: 601px) {
      .rzp-sheet-backdrop {
        align-items: center;
      }
    }

    .rzp-sheet-backdrop.active {
      opacity: 1;
      pointer-events: auto;
    }

    .rzp-sheet-dialog {
      width: 100%;
      max-width: 440px;
      max-height: 88dvh;
      max-height: 88vh;
      background: #ffffff;
      border-top-left-radius: 20px;
      border-top-right-radius: 20px;
      box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.35);
      overflow-y: auto !important;
      -webkit-overflow-scrolling: touch !important;
      overscroll-behavior-y: contain !important;
      transform: translateY(100%);
      transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
      display: flex;
      flex-direction: column;
      position: relative;
    }

    @media (min-width: 601px) {
      .rzp-sheet-dialog {
        border-radius: 20px;
        max-height: 85vh;
        transform: translateY(20px) scale(0.98);
      }

      .rzp-sheet-backdrop.active .rzp-sheet-dialog {
        transform: translateY(0) scale(1);
      }
    }

    .rzp-sheet-backdrop.active .rzp-sheet-dialog {
      transform: translateY(0);
    }

    .rzp-sheet-content {
      padding: 16px 20px 20px;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      width: 100%;
      box-sizing: border-box;
    }

    .rzp-sheet-title {
      font-size: 19px;
      font-weight: 800;
      color: var(--ypg-text-dark);
      letter-spacing: -0.3px;
      margin-bottom: 4px;
    }

    .rzp-sheet-subtitle {
      font-size: 13px;
      color: var(--ypg-text-muted);
      margin-bottom: 6px;
      line-height: 1.4;
    }

    .rzp-sheet-cancel-btn {
      width: 100%;
      height: 42px;
      background: #ffffff;
      border: 1.5px solid var(--ypg-border);
      border-radius: 10px;
      font-size: 14px;
      font-weight: 700;
      color: #0b63e5;
      cursor: pointer;
      margin-top: 14px;
      transition: all 0.2s;
    }

    .rzp-sheet-cancel-btn:hover {
      background: #f8fafc;
      border-color: var(--ypg-input-border);
    }

    /* Cancel Modal Header Arc with Doors */
    .rzp-cancel-header-arc {
      width: 120%;
      height: 80px;
      background: #dbeafe;
      border-bottom-left-radius: 50% 28px;
      border-bottom-right-radius: 50% 28px;
      display: flex;
      align-items: flex-end;
      justify-content: center;
      padding-bottom: 6px;
      position: relative;
      margin-left: -10%;
      margin-right: -10%;
    }

    .rzp-btn-sheet-close {
      position: absolute;
      top: 12px;
      right: calc(10% + 12px);
      width: 30px;
      height: 30px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.7);
      border: none;
      color: #334155;
      font-size: 15px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: background 0.15s;
    }

    .rzp-btn-sheet-close:hover {
      background: rgba(255, 255, 255, 0.95);
    }

    .rzp-btn-wait {
      width: 100%;
      height: 42px;
      background: #ffffff;
      border: 1.5px solid var(--ypg-border);
      border-radius: 10px;
      font-size: 14px;
      font-weight: 700;
      color: var(--ypg-text-dark);
      cursor: pointer;
      margin-top: 14px;
      transition: all 0.2s;
    }

    .rzp-btn-wait:hover {
      background: #f8fafc;
    }

    .rzp-btn-confirm-cancel {
      width: 100%;
      height: 42px;
      background: #0f172a;
      border: none;
      border-radius: 10px;
      font-size: 14px;
      font-weight: 700;
      color: #ffffff;
      cursor: pointer;
      margin-top: 8px;
      transition: all 0.2s;
    }

    .rzp-btn-confirm-cancel:hover {
      background: #1e293b;
    }

    .rzp-secured-by {
      font-size: 12px;
      color: var(--ypg-text-muted);
      margin-top: 22px;
      display: flex;
      align-items: center;
      gap: 5px;
    }

    /* --- PSYCHOLOGICAL TIME-SAVING CONVERSION BANNER --- */
    .ypg-time-saving-banner {
      background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
      border: 1px solid #86efac;
      border-radius: 10px;
      padding: 10px 14px;
      margin-bottom: 14px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }

    .ypg-time-saving-text {
      font-size: 12px;
      font-weight: 700;
      color: var(--ypg-hc-success, #14532d);
      line-height: 1.4;
      flex: 1;
    }

    .ypg-banner-running-timer {
      font-family: monospace;
      font-size: 13px;
      font-weight: 800;
      color: var(--ypg-hc-success, #15803d);
      background: rgba(255, 255, 255, 0.85);
      padding: 1px 6px;
      border-radius: 4px;
      border: 1px solid #bbf7d0;
      display: inline-block;
      letter-spacing: 0.5px;
    }

    .ypg-btn-fast-switch {
      background: linear-gradient(135deg, #10b981 0%, #059669 100%);
      color: #ffffff;
      border: none;
      border-radius: 8px;
      padding: 8px 12px;
      font-size: 11.5px;
      font-weight: 700;
      cursor: pointer;
      white-space: nowrap;
      flex-shrink: 0;
      box-shadow: 0 2px 6px rgba(16, 185, 129, 0.28);
      transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }

    .ypg-btn-fast-switch:hover {
      background: linear-gradient(135deg, #059669 0%, #047857 100%);
      transform: translateY(-1px);
      box-shadow: 0 4px 10px rgba(16, 185, 129, 0.35);
    }

    /* Dedicated Psychological Conversion Card in UPI Queue View */
    .ypg-queue-conversion-card {
      background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
      border: 1px solid #86efac;
      border-radius: 12px;
      padding: 14px 16px;
      margin-bottom: 14px;
      box-shadow: 0 2px 8px rgba(16, 185, 129, 0.12);
      text-align: left;
    }

    .ypg-queue-conversion-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 8px;
    }

    .ypg-queue-conversion-badge {
      font-size: 11.5px;
      font-weight: 800;
      color: #065f46;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .ypg-queue-conversion-pill {
      font-size: 11.5px;
      font-weight: 700;
      color: var(--ypg-hc-success, #15803d);
      background: rgba(255, 255, 255, 0.9);
      padding: 2px 8px;
      border-radius: 12px;
      border: 1px solid #bbf7d0;
      white-space: nowrap;
    }

    .ypg-queue-conversion-text {
      font-size: 12.5px;
      line-height: 1.45;
      color: var(--ypg-hc-success, #14532d);
      margin-bottom: 12px;
    }

    .ypg-btn-queue-switch {
      width: 100%;
      height: 42px;
      background: linear-gradient(135deg, #10b981 0%, #059669 100%);
      color: #ffffff;
      border: none;
      border-radius: 9px;
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      box-shadow: 0 2px 6px rgba(16, 185, 129, 0.28);
      transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
    }

    .ypg-btn-queue-switch:hover {
      background: linear-gradient(135deg, #059669 0%, #047857 100%);
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
    }

    /* --- DESKTOP / PC SPECIFIC 2-COLUMN RAZORPAY REDESIGN --- */
    @media (min-width: 768px) {
      body {
        padding: 0;
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #0b0f19;
      }

      body:not(.is-embedded) {
        padding: 20px;
      }

      .ypg-wrapper {
        width: 900px !important;
        max-width: 95vw !important;
        height: 600px !important;
        max-height: 92vh !important;
        border-radius: 16px !important;
        display: flex !important;
        flex-direction: row !important;
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5) !important;
        overflow: hidden !important;
        position: relative !important;
      }

      body.is-embedded .ypg-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        min-height: 100% !important;
        border-radius: 16px !important;
      }

      .ypg-header {
        display: none !important;
      }

      .ypg-drag-handle-bar {
        display: none !important;
      }

      .ypg-action-bottom-bar {
        display: none !important;
      }

      .ypg-footer {
        display: none !important;
      }

      /* PC Left Sidebar (Blue Branding Panel - ~310px width) */
      .ypg-pc-sidebar {
        width: 310px;
        min-width: 310px;
        max-width: 310px;
        height: 100%;
        background: linear-gradient(180deg, var(--ypg-blue, #0b63e5) 0%, var(--ypg-blue-dark, #0854c6) 100%);
        padding: 22px 20px;
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        color: #ffffff;
        position: relative;
        overflow: hidden;
        box-sizing: border-box;
      }

      .ypg-pc-brand-header {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 12px;
      }

      .ypg-pc-avatar {
        width: 42px;
        height: 42px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.22);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        font-weight: 800;
        color: #ffffff;
        overflow: hidden;
        flex-shrink: 0;
      }

      .ypg-pc-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }

      .ypg-pc-brand-info {
        display: flex;
        flex-direction: column;
        gap: 3px;
        min-width: 0;
      }

      .ypg-pc-merchant-name {
        font-size: 16px;
        font-weight: 800;
        color: #ffffff;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.2;
      }

      .ypg-pc-trust-badge {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        background: rgba(255, 255, 255, 0.16);
        border-radius: 20px;
        padding: 2px 8px;
        font-size: 11px;
        font-weight: 600;
        color: #ffffff;
        width: fit-content;
      }

      .ypg-pc-green-shield {
        width: 13px;
        height: 13px;
      }

      /* Social Proof Pill */
      .ypg-pc-social-proof {
        background: rgba(255, 255, 255, 0.12);
        border-radius: 8px;
        padding: 8px 12px;
        margin-top: 6px;
        font-size: 11.5px;
        color: rgba(255, 255, 255, 0.95);
        display: flex;
        align-items: center;
        gap: 8px;
      }

      /* Price Summary White Card - NO UPI ID VISIBLE */
      .ypg-pc-price-card {
        background: #ffffff;
        border-radius: 10px;
        padding: 14px 16px;
        margin-top: 14px;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
        color: var(--ypg-text-dark);
      }

      .ypg-pc-price-label {
        font-size: 12px;
        font-weight: 600;
        color: var(--ypg-text-muted);
        letter-spacing: 0.2px;
      }

      .ypg-pc-price-val {
        font-size: 26px;
        font-weight: 800;
        color: var(--ypg-text-dark);
        margin-top: 4px;
        letter-spacing: -0.5px;
      }

      /* User Profile Row Button */
      .ypg-pc-row-btn {
        background: rgba(255, 255, 255, 0.12);
        border-radius: 8px;
        padding: 10px 12px;
        margin-top: 10px;
        font-size: 12px;
        color: #ffffff;
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
        transition: background 0.15s;
      }

      .ypg-pc-row-btn:hover {
        background: rgba(255, 255, 255, 0.18);
      }

      .ypg-pc-row-left {
        display: flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
        overflow: hidden;
      }

      #pcCustomerProfileText {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .ypg-pc-chevron {
        font-size: 16px;
        opacity: 0.75;
        flex-shrink: 0;
      }

      /* Shopping Bags Graphic */
      .ypg-pc-bags-wrap {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: auto;
        padding-top: 14px;
        padding-bottom: 4px;
      }

      /* PC Right Column / Workspace */
      .ypg-pc-workspace {
        flex: 1;
        height: 100%;
        display: flex !important;
        flex-direction: column;
        background: #ffffff;
        overflow: hidden;
        min-width: 0;
      }

      .ypg-pc-topbar {
        height: 48px;
        border-bottom: 1px solid var(--ypg-hc-divider, #f1f5f9);
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 0 20px;
        background: #ffffff;
        flex-shrink: 0;
        position: relative;
        z-index: 60;
      }

      .ypg-pc-topbar-title {
        font-size: 15px;
        font-weight: 700;
        color: var(--ypg-text-dark);
      }

      .ypg-pc-topbar-actions {
        display: flex;
        align-items: center;
        gap: 12px;
        position: relative;
        z-index: 61;
      }

      .ypg-pc-btn-more,
      .ypg-pc-btn-close {
        background: none;
        border: none;
        font-size: 16px;
        color: var(--ypg-text-muted);
        cursor: pointer;
        padding: 4px 6px;
        border-radius: 4px;
        line-height: 1;
        transition: color 0.15s, background 0.15s;
      }

      .ypg-pc-btn-close {
        font-size: 18px;
        font-weight: 600;
      }

      .ypg-pc-btn-more:hover,
      .ypg-pc-btn-close:hover {
        color: var(--ypg-text-dark);
        background: #f1f5f9;
      }

      /* PC Body Container - Bounded to viewport height */
      .ypg-body {
        flex: 1 !important;
        height: auto !important;
        min-height: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        padding: 0 !important;
        overflow: hidden !important;
      }

      #paymentGatewayInterface:not([hidden]) {
        flex: 1 !important;
        height: 100% !important;
        max-height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        min-height: 0 !important;
        overflow: hidden !important;
      }

      #paymentGatewayInterface[hidden] {
        display: none !important;
      }

      #preGatewayAuthView:not([hidden]) {
        flex: 1 !important;
        height: 100% !important;
        max-height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        overflow-y: auto !important;
        padding: 24px 32px !important;
        box-sizing: border-box !important;
      }

      #preGatewayAuthView[hidden] {
        display: none !important;
      }

      /* Clean PC layout */
      .ypg-pc-columns {
        display: flex !important;
        flex-direction: row !important;
        flex: 1 !important;
        height: 100% !important;
        max-height: 100% !important;
        min-height: 0 !important;
        overflow: hidden !important;
      }

      .ypg-pc-methods-list {
        width: 220px !important;
        min-width: 220px !important;
        height: 100% !important;
        max-height: 100% !important;
        border-right: 1px solid var(--ypg-hc-divider, #f1f5f9) !important;
        padding: 14px 12px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        overflow-y: auto !important;
        background: #ffffff !important;
        scrollbar-width: thin !important;
        scrollbar-color: #e2e8f0 transparent !important;
      }

      .ypg-pc-methods-list::-webkit-scrollbar {
        width: 4px;
      }

      .ypg-pc-methods-list::-webkit-scrollbar-thumb {
        background: #e2e8f0;
        border-radius: 4px;
      }

      .ypg-pc-method-card {
        border: 1.5px solid var(--ypg-border);
        border-radius: 10px;
        padding: 10px 12px;
        cursor: pointer;
        transition: all 0.2s ease;
        background: #ffffff;
      }

      .ypg-pc-method-card:hover {
        border-color: var(--ypg-input-border);
        background: #f8fafc;
      }

      .ypg-pc-method-card.is-active {
        border-color: var(--ypg-blue, #0b63e5);
        background: #eff6ff;
        box-shadow: 0 0 0 1px var(--ypg-blue, #0b63e5);
      }

      .ypg-pc-method-card.disabled {
        opacity: 0.6;
        cursor: default;
      }

      .ypg-pc-method-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 2px;
      }

      .ypg-pc-method-title {
        font-size: 13px;
        font-weight: 700;
        color: var(--ypg-text-dark);
      }

      .ypg-pc-cash-pill {
        font-size: 10px;
        font-weight: 700;
        color: var(--ypg-hc-info, #0369a1);
        background: #e0f2fe;
        padding: 2px 6px;
        border-radius: 10px;
      }

      .ypg-pc-method-sub {
        font-size: 11px;
        color: var(--ypg-text-muted);
      }

      .ypg-pc-method-icons {
        display: flex;
        align-items: center;
        gap: 4px;
        margin-top: 6px;
      }

      .ypg-pc-mini-icon {
        width: 18px;
        height: 18px;
        border-radius: 4px;
        object-fit: cover;
      }

      /* Right active workspace - Bounded height with buttery-smooth scrolling */
      .ypg-pc-active-view {
        flex: 1 !important;
        height: 100% !important;
        max-height: 100% !important;
        padding: 16px 22px !important;
        overflow-y: auto !important;
        display: flex !important;
        flex-direction: column !important;
        min-width: 0 !important;
        scrollbar-width: thin !important;
        scrollbar-color: #cbd5e1 transparent !important;
      }

      .ypg-pc-active-view::-webkit-scrollbar {
        width: 6px;
      }

      .ypg-pc-active-view::-webkit-scrollbar-track {
        background: transparent;
      }

      .ypg-pc-active-view::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
      }

      .ypg-pc-active-view::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
      }

      /* Desktop: Hide redundant step cards since QR details column has instructions */
      .ypg-instructions-card {
        display: none !important;
      }

      /* Desktop method selector override */
      .ypg-method-selector-bar {
        display: none !important;
      }

      /* PC Exit Modal Styling (Razorpay desktop modal) */
      .mob-only-title,
      .mob-only-sub,
      .mob-only-btn {
        display: none !important;
      }

      .pc-only-title,
      .pc-only-sub,
      .pc-only-btn {
        display: inline !important;
      }

      .rzp-sheet-dialog {
        width: 420px !important;
        border-radius: 16px !important;
        box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4) !important;
        animation: rzpModalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
      }

      /* Desktop Sticky Footer (Pinned firmly at the bottom of workspace) */
      .ypg-sticky-footer {
        margin-top: auto !important;
        background: #ffffff !important;
        border-top: 1px solid #f1f5f9 !important;
        display: flex !important;
        flex-direction: column !important;
        flex-shrink: 0 !important;
        position: relative !important;
        z-index: 20 !important;
        width: 100% !important;
      }

      .ypg-legal-disclaimer {
        font-size: 11px !important;
        color: #64748b !important;
        text-align: center !important;
        padding: 8px 16px !important;
        line-height: 1.4 !important;
      }
    }

    /* MOBILE SPECIFIC RULES - PINNED HEADER WITH CONTENT SCROLLING BEHIND IT */
    @media (max-width: 767px) {
      .ypg-pc-sidebar {
        display: none !important;
      }

      .ypg-pc-topbar {
        display: none !important;
      }

      .ypg-wrapper {
        height: 100% !important;
        height: 100dvh !important;
        min-height: 100% !important;
        min-height: 100dvh !important;
        max-height: 100% !important;
        max-height: 100dvh !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        width: 100vw !important;
        max-width: 100vw !important;
        border-radius: 0 !important;
      }

      .ypg-pc-workspace {
        height: 100% !important;
        max-height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        flex: 1 !important;
        position: relative !important;
      }

      /* Pinned/Sticky Header: Store name sits firmly at top */
      .ypg-header {
        position: sticky !important;
        top: 0 !important;
        z-index: 50 !important;
        flex-shrink: 0 !important;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12) !important;
      }

      /* Body is the single fluid scroll container that flows behind the header */
      .ypg-body {
        display: block !important;
        flex: 1 !important;
        height: auto !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior-y: contain !important;
        padding: 14px 16px 140px 16px !important;
        scrollbar-width: none !important;
      }

      .ypg-body::-webkit-scrollbar {
        display: none !important;
      }

      /* Method tabs scroll smoothly under the header */
      .ypg-method-selector-bar {
        position: sticky !important;
        top: -14px !important;
        z-index: 30 !important;
        background: #ffffff !important;
        padding-top: 4px !important;
        padding-bottom: 8px !important;
      }

      /* Inner wrappers must NOT have conflicting overflow or height */
      #paymentGatewayInterface:not([hidden]) {
        display: block !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        flex: none !important;
      }

      #paymentGatewayInterface[hidden] {
        display: none !important;
      }

      #preGatewayAuthView:not([hidden]) {
        display: block !important;
        width: 100% !important;
        padding: 16px 16px 24px !important;
        box-sizing: border-box !important;
      }

      #preGatewayAuthView[hidden] {
        display: none !important;
      }

      .ypg-pc-columns {
        display: block !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        flex: none !important;
      }

      .ypg-pc-methods-list {
        display: none !important;
      }

      .ypg-pc-active-view {
        display: block !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        padding: 0 !important;
        width: 100% !important;
        flex: none !important;
      }

      /* Fixed Bottom Footer Bar */
      .ypg-sticky-footer {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 45 !important;
        background: #ffffff !important;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08) !important;
      }

      .pc-only-title,
      .pc-only-sub,
      .pc-only-btn {
        display: none !important;
      }

      .mob-only-title,
      .mob-only-sub,
      .mob-only-btn {
        display: inline !important;
      }

      .ypg-btn-upi-mobile-intent {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        padding: 12px 16px;
        background: var(--ypg-blue, #0b63e5);
        color: #ffffff;
        border: none;
        border-radius: 10px;
        font-weight: 700;
        font-size: 14px;
        cursor: pointer;
        margin-top: 10px;
        box-shadow: 0 4px 14px rgba(11, 99, 229, 0.28);
        transition: transform 0.15s ease, filter 0.15s ease;
      }

      .ypg-btn-upi-mobile-intent:active {
        transform: scale(0.98);
        filter: brightness(0.92);
      }
    }

    /* --- OFFICIAL GOOGLE PLAY STORE APP ICONS --- */
    .ypg-upi-logos-row {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }

    .ypg-app-icon {
      width: 26px;
      height: 26px;
      border-radius: 6px;
      overflow: hidden;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
      display: flex;
      align-items: center;
      justify-content: center;
      background: #ffffff;
      border: 1px solid var(--ypg-border);
      flex-shrink: 0;
    }

    .ypg-app-icon img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      border-radius: 5px;
      display: block;
    }

    /* --- UPI SERVER HEALTH INDICATOR & DOWNTIME ALERT --- */
    .ypg-server-health-indicator {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 4px 10px;
      border-radius: 20px;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.2px;
      margin: 0 auto 10px auto;
      transition: all 0.25s ease;
      width: fit-content;
    }

    .ypg-server-health-indicator.is-working {
      background: #f0fdf4;
      color: var(--ypg-hc-success, #15803d);
      border: 1px solid #bbf7d0;
    }

    .ypg-server-health-indicator.is-busy {
      background: #fefce8;
      color: var(--ypg-hc-warning, #854d0e);
      border: 1px solid #fef08a;
    }

    .ypg-server-health-indicator.is-issues {
      background: #fef2f2;
      color: var(--ypg-hc-danger, #b91c1c);
      border: 1px solid #fecaca;
    }

    .ypg-pulse-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      display: inline-block;
    }

    .ypg-server-health-indicator.is-working .ypg-pulse-dot {
      background: #22c55e;
      box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
      animation: pulse-green 1.8s infinite;
    }

    .ypg-server-health-indicator.is-busy .ypg-pulse-dot {
      background: #eab308;
      box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.7);
      animation: pulse-yellow 1.8s infinite;
    }

    .ypg-server-health-indicator.is-issues .ypg-pulse-dot {
      background: #ef4444;
      box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
      animation: pulse-red 1.8s infinite;
    }

    @keyframes pulse-yellow {
      0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.7);
      }

      70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(234, 179, 8, 0);
      }

      100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(234, 179, 8, 0);
      }
    }

    @keyframes pulse-green {
      0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
      }

      70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
      }

      100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
      }
    }

    @keyframes pulse-red {
      0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
      }

      70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
      }

      100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
      }
    }

    .ypg-downtime-alert {
      background: #fff5f5;
      border: 1px solid #fed7d7;
      border-left: 4px solid #e53e3e;
      border-radius: 8px;
      padding: 10px 14px;
      margin: 10px 0;
      display: flex;
      gap: 10px;
      align-items: flex-start;
      text-align: left;
    }

    .ypg-downtime-alert.is-warning {
      background: #fffbeb;
      border: 1px solid #fef3c7;
      border-left: 4px solid #f59e0b;
    }

    .ypg-downtime-alert.is-warning .ypg-downtime-heading {
      color: var(--ypg-hc-warning, #92400e);
    }

    .ypg-downtime-alert.is-warning .ypg-downtime-msg {
      color: var(--ypg-hc-warning, #78350f);
    }

    .ypg-downtime-icon {
      font-size: 18px;
      line-height: 1;
      flex-shrink: 0;
    }

    .ypg-downtime-heading {
      font-size: 12px;
      font-weight: 800;
      color: var(--ypg-hc-danger, #991b1b);
      margin-bottom: 3px;
    }

    .ypg-downtime-msg {
      font-size: 11.5px;
      color: var(--ypg-hc-danger, #7f1d1d);
      line-height: 1.4;
      margin-bottom: 6px;
    }

    .ypg-btn-downtime-alt {
      background: #0f172a;
      color: #ffffff;
      border: none;
      border-radius: 6px;
      font-size: 11px;
      font-weight: 700;
      padding: 6px 12px;
      cursor: pointer;
      transition: opacity 0.2s;
    }

    .ypg-btn-downtime-alt:hover {
      opacity: 0.9;
    }

    /* ULTRA-COMPACT MOBILE DEVICES (<= 360px) */
    @media (max-width: 360px) {
      .ypg-body {
        padding: 10px 10px 120px 10px !important;
      }
      .ypg-header {
        padding: 10px 12px !important;
      }
      .ypg-otp-control {
        font-size: 18px !important;
        letter-spacing: 6px !important;
        padding: 8px !important;
      }
      .ypg-qr-img {
        max-width: 170px !important;
        max-height: 170px !important;
      }
    }