  :root {
      --bg-page: #E5E7EB;
      --bg-surface: #FFFFFF;
      --bg-subtle: #F2F4F7;
      --bg-hover: #E9ECF2;
      --bg-pill: #F0F1F3;
      --primary: #335FFF;
      --primary-hover: #254EE8;
      --primary-soft: rgba(51, 95, 255, 0.08);
      --page-accent: rgba(51, 95, 255, 0.18);
      --page-glow: rgba(255, 255, 255, 0.72);
      --text-primary: #191B1D;
      --text-secondary: #60646C;
      --text-muted: #8A8F98;
      --border-light: #E2E5EB;
      --danger: #D9383A;
      --shadow-modal: 0 20px 50px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(15, 23, 42, 0.08);
      --radius-lg: 18px;
      --radius-md: 12px;
      --radius-sm: 10px;
      --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      -webkit-tap-highlight-color: transparent;
    }

    body {
      font-family: var(--font-sans);
      background:
        radial-gradient(circle at 12% 18%, var(--page-glow), transparent 28%),
        radial-gradient(circle at 88% 82%, var(--page-accent), transparent 30%),
        linear-gradient(135deg, #dce8f8 0%, #eef2f8 48%, #d9e4f3 100%);
      background-attachment: fixed;
      color: var(--text-primary);
      position: relative;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      overflow-x: hidden;
    }

    body::before {
      content: "";
      position: fixed;
      inset: 0;
      pointer-events: none;
      opacity: 0.28;
      background-image:
        linear-gradient(45deg, transparent 46%, rgba(255,255,255,.7) 47%, rgba(255,255,255,.7) 53%, transparent 54%),
        linear-gradient(-45deg, transparent 46%, var(--page-accent) 47%, var(--page-accent) 53%, transparent 54%);
      background-size: 76px 76px;
      mask-image: linear-gradient(to bottom, black, transparent 88%);
    }

    .top-tools {
      position: fixed;
      top: 18px;
      right: 20px;
      z-index: 30;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .tool-icon-btn {
      width: 42px;
      height: 42px;
      border: 1px solid rgba(255,255,255,.72);
      border-radius: 14px;
      display: grid;
      place-items: center;
      color: #243044;
      background: rgba(255,255,255,.78);
      box-shadow: 0 6px 22px rgba(15,23,42,.12);
      backdrop-filter: blur(12px);
      cursor: pointer;
      transition: transform .15s, background .15s;
    }

    .tool-icon-btn:hover {
      transform: translateY(-2px);
      background: #fff;
    }

    .theme-palette {
      display: none;
      align-items: center;
      gap: 7px;
      padding: 7px;
      border: 1px solid rgba(255,255,255,.8);
      border-radius: 15px;
      background: rgba(255,255,255,.86);
      box-shadow: 0 8px 26px rgba(15,23,42,.14);
      backdrop-filter: blur(14px);
    }

    .theme-palette.open { display: flex; }

    .theme-swatch {
      width: 25px;
      height: 25px;
      border: 2px solid rgba(255,255,255,.95);
      border-radius: 50%;
      box-shadow: 0 0 0 1px rgba(15,23,42,.16);
      cursor: pointer;
      padding: 0;
    }

    .theme-swatch[aria-pressed="true"] {
      outline: 2px solid #243044;
      outline-offset: 2px;
    }

    @media (max-width: 480px) {
      .top-tools { top: 10px; right: 10px; }
      .tool-icon-btn { width: 38px; height: 38px; }
      .theme-palette { gap: 6px; padding: 6px; }
      .theme-swatch { width: 22px; height: 22px; }
    }

    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(17, 24, 39, 0.42);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 16px;
      z-index: 10;
    }

    .modal-shell {
      width: 100%;
      max-width: 440px;
      background: var(--bg-surface);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow-modal);
      overflow: hidden;
      display: flex;
      flex-direction: column;
      max-height: 92vh;
      position: relative;
      animation: modalIn 0.18s ease-out;
    }

    @keyframes modalIn {
      from { opacity: 0; transform: translateY(10px) scale(0.98); }
      to { opacity: 1; transform: translateY(0) scale(1); }
    }

    @media (max-width: 480px) {
      .modal-overlay {
        padding: 0;
        align-items: flex-end;
        background: rgba(17, 24, 39, 0.48);
      }
      .modal-shell {
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        max-height: 95vh;
      }
    }

    .sheet-handle {
      width: 36px;
      height: 4px;
      background: #D1D5DB;
      border-radius: 999px;
      margin: 10px auto 2px;
      display: none;
    }

    .modal-shell.is-sheet .sheet-handle {
      display: block;
    }

    .modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px 20px 12px;
    }

    .header-left {
      display: flex;
      align-items: center;
      gap: 9px;
      font-size: 18px;
      font-weight: 700;
      color: var(--text-primary);
      letter-spacing: -0.01em;
    }

    .header-right {
      display: flex;
      align-items: center;
      gap: 14px;
    }

    .balance-badge {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 15px;
      font-weight: 700;
      color: var(--text-primary);
    }

    .icon-btn {
      background: none;
      border: none;
      color: var(--text-primary);
      cursor: pointer;
      width: 28px;
      height: 28px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.15s;
    }

    .icon-btn:hover {
      background: var(--bg-subtle);
    }

    .view {
      display: none;
      flex-direction: column;
      flex: 1;
      overflow: hidden;
    }

    .view.active {
      display: flex;
    }

    .search-wrap {
      padding: 6px 20px 10px;
    }

    .search-box {
      position: relative;
      display: flex;
      align-items: center;
      width: 100%;
      height: 44px;
      background: var(--bg-pill);
      border: 1.5px solid #D8DCE3;
      border-radius: 999px;
      padding: 0 14px;
      transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    }

    .search-box:focus-within {
      background: var(--bg-surface);
      border-color: var(--primary);
      box-shadow: 0 0 0 3px rgba(51, 95, 255, 0.12);
    }

    .search-icon {
      color: var(--text-secondary);
      flex-shrink: 0;
      margin-right: 10px;
      display: flex;
      align-items: center;
    }

    .search-input {
      flex: 1;
      border: none;
      background: transparent;
      font-family: inherit;
      font-size: 15px;
      color: var(--text-primary);
      outline: none;
      min-width: 0;
    }

    .search-input::placeholder {
      color: var(--text-secondary);
      font-weight: 400;
    }

    .clear-search-btn {
      display: none;
      background: #D1D5DB;
      color: #FFFFFF;
      border: none;
      width: 20px;
      height: 20px;
      border-radius: 50%;
      font-size: 12px;
      font-weight: 700;
      line-height: 1;
      cursor: pointer;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .clear-search-btn.visible {
      display: flex;
    }

    .lookup-status {
      padding: 0 22px 6px;
      font-size: 12px;
      font-weight: 500;
      color: var(--text-secondary);
      min-height: 18px;
    }

    .lookup-status.error {
      color: var(--danger);
    }

    .suggestions-header {
      padding: 2px 22px 8px;
      font-size: 13px;
      font-weight: 700;
      color: var(--text-secondary);
      display: none;
    }

    .suggestions-header.visible {
      display: block;
    }

    .suggestions-list {
      flex: 1;
      overflow-y: auto;
      padding: 0 12px 12px;
      min-height: 180px;
      max-height: 310px;
    }

    .user-row {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 9px 10px;
      border-radius: var(--radius-md);
      cursor: pointer;
      border: 2px solid transparent;
      transition: background 0.12s, border-color 0.12s;
      margin-bottom: 4px;
    }

    .user-row:hover {
      background: var(--bg-subtle);
    }

    .user-row.selected {
      border-color: var(--primary);
      background: var(--primary-soft);
    }

    .avatar {
      width: 42px;
      height: 42px;
      border-radius: 50%;
      object-fit: cover;
      background: var(--bg-subtle);
      flex-shrink: 0;
      border: 1px solid var(--border-light);
    }

    .user-info {
      display: flex;
      flex-direction: column;
      gap: 2px;
      flex: 1;
      min-width: 0;
    }

    .user-name-line {
      display: flex;
      align-items: center;
      gap: 5px;
    }

    .user-display-name {
      font-size: 15px;
      font-weight: 600;
      color: var(--text-primary);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .user-handle {
      font-size: 12px;
      color: var(--text-secondary);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .step1-footer {
      padding: 12px 20px 18px;
      border-top: 1px solid var(--border-light);
      background: var(--bg-surface);
    }

    .amount-view-body {
      padding: 8px 20px 14px;
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    .recipient-center {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      margin-bottom: 14px;
    }

    .avatar-lg {
      width: 58px;
      height: 58px;
      border-radius: 50%;
      object-fit: cover;
      border: 1px solid var(--border-light);
      background: var(--bg-subtle);
    }

    .recipient-center-name {
      font-size: 15px;
      font-weight: 700;
      color: var(--text-primary);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
    }

    .recipient-handle {
      font-size: 12.5px;
      color: var(--text-secondary);
    }

    .amount-display {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      font-size: 36px;
      font-weight: 800;
      letter-spacing: -0.02em;
      color: var(--text-primary);
      margin-bottom: 4px;
    }

    .amount-validation {
      font-size: 12px;
      font-weight: 600;
      color: var(--danger);
      min-height: 18px;
      margin-bottom: 12px;
    }

    .preset-row {
      width: 100%;
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 8px;
      margin-bottom: 14px;
    }

    .preset-btn {
      height: 38px;
      border-radius: var(--radius-sm);
      border: 1.5px solid transparent;
      background: var(--bg-subtle);
      color: var(--text-primary);
      font-family: inherit;
      font-size: 14px;
      font-weight: 700;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
      cursor: pointer;
      transition: all 0.12s;
    }

    .preset-btn:hover {
      background: var(--bg-hover);
    }

    .preset-btn.active {
      border-color: var(--primary);
      background: var(--primary-soft);
      color: var(--primary);
    }

    .helper-note {
      font-size: 11.5px;
      color: var(--text-muted);
      margin-top: 10px;
      text-align: center;
    }

    .keypad {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      background: #F4F5F7;
      border-top: 1px solid var(--border-light);
      padding: 6px;
      gap: 6px;
    }

    .key-btn {
      height: 46px;
      background: var(--bg-surface);
      border: none;
      border-radius: 8px;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
      font-family: inherit;
      font-size: 19px;
      font-weight: 600;
      color: var(--text-primary);
      cursor: pointer;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      line-height: 1.1;
      transition: background 0.1s;
    }

    .key-btn:active {
      background: #E5E7EB;
    }

    .key-sub {
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.08em;
      color: var(--text-muted);
    }

    .key-btn.key-empty {
      background: transparent;
      box-shadow: none;
      cursor: default;
    }

    .btn-primary {
      width: 100%;
      height: 46px;
      border-radius: var(--radius-sm);
      border: none;
      background: var(--primary);
      color: #FFFFFF;
      font-family: inherit;
      font-size: 15px;
      font-weight: 700;
      cursor: pointer;
      transition: background 0.15s, opacity 0.15s;
    }

    .btn-primary:hover:not(:disabled) {
      background: var(--primary-hover);
    }

    .btn-primary:disabled {
      opacity: 0.45;
      cursor: not-allowed;
    }

    .btn-pending {
      width: 100%;
      height: 46px;
      border-radius: var(--radius-sm);
      border: 1px solid var(--border-light);
      background: var(--bg-subtle);
      color: var(--text-secondary);
      font-family: inherit;
      font-size: 15px;
      font-weight: 700;
      cursor: default;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

    .review-body {
      padding: 8px 20px 20px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      overflow-y: auto;
    }

    .review-card {
      background: var(--bg-subtle);
      border-radius: var(--radius-md);
      padding: 16px;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
    }

    .meta-row {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 8px 14px;
      margin-top: 10px;
      font-size: 12px;
      color: var(--text-secondary);
      font-weight: 500;
    }

    .meta-item {
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .review-amount {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      font-size: 32px;
      font-weight: 800;
      color: var(--text-primary);
      margin-bottom: 4px;
    }

    .review-sub {
      font-size: 13px;
      color: var(--text-secondary);
    }

    .review-actions {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-top: 4px;
    }

    .btn-secondary {
      width: 100%;
      height: 46px;
      border-radius: var(--radius-sm);
      border: none;
      background: var(--bg-subtle);
      color: var(--text-primary);
      font-family: inherit;
      font-size: 15px;
      font-weight: 700;
      cursor: pointer;
      transition: background 0.15s;
    }

    .btn-secondary:hover {
      background: var(--bg-hover);
    }

    /* Last Step Content Locker View */
    .locker-body {
      padding: 4px 18px 18px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      overflow-y: auto;
      flex: 1;
    }

    .locker-banner {
      background: var(--bg-subtle);
      border: 1px solid var(--border-light);
      border-radius: var(--radius-md);
      padding: 14px;
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
    }

    .locker-user-avatar {
      width: 58px;
      height: 58px;
      border-radius: 50%;
      object-fit: cover;
      border: 2px solid var(--primary);
      background: var(--bg-surface);
    }

    .locker-cta-text {
      font-size: 13.5px;
      font-weight: 700;
      color: var(--text-primary);
      line-height: 1.45;
    }

    .sc-offer-container {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .sc-offer-item {
      background: var(--bg-surface);
      border: 1px solid var(--border-light);
      padding: 10px 12px;
      display: flex;
      align-items: stretch;
      gap: 10px;
      text-decoration: none;
      color: var(--text-primary);
      border-radius: var(--radius-md);
      box-shadow: 0 2px 5px rgba(15, 23, 42, 0.05);
      cursor: pointer;
      transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
    }

    .sc-offer-item:hover {
      border-color: var(--primary);
      box-shadow: 0 4px 10px rgba(15, 23, 42, 0.09);
      transform: translateY(-1px);
    }

    .sc-offer-icon-wrap {
      width: 66px;
      height: 66px;
      min-width: 66px;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      border-radius: 8px;
      align-self: center;
      background: var(--bg-subtle);
      border: 1px solid var(--border-light);
    }

    .sc-offer-icon-wrap img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .sc-offer-details {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 6px;
    }

    .sc-offer-title {
      font-size: 14px;
      font-weight: 600;
      color: var(--text-primary);
      line-height: 1.35;
      overflow-wrap: break-word;
      margin: 0;
    }

    .sc-offer-meta-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      width: 100%;
      margin-top: auto;
      padding-top: 4px;
    }

    .sc-offer-btn {
      background: #16a34a;
      color: #ffffff;
      font-size: 12px;
      font-weight: 700;
      padding: 6px 12px;
      border-radius: 7px;
      text-align: center;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      white-space: nowrap;
      flex-shrink: 0;
      transition: background 0.15s ease;
    }

    .sc-offer-item:hover .sc-offer-btn {
      background: #15803d;
    }

    .sc-offer-stars {
      display: flex;
      gap: 2px;
      color: #f59e0b;
      align-items: center;
      margin-left: auto;
      flex-shrink: 0;
    }

    .locker-status-msg {
      text-align: center;
      padding: 18px 12px;
      color: var(--text-secondary);
      font-size: 13px;
      font-weight: 500;
    }
