    body {
      padding: 0;
      padding-top: 36px;
    }

    /* --- Store header --- */
    .store-header {
      background: linear-gradient(135deg, var(--earth) 0%, var(--earth-light) 100%);
      color: white;
      padding: 0 30px;
      height: 70px;
      font-size: 15px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .store-header .store-name {
      font-weight: 700;
      font-size: 20px;
    }

    .store-header .store-address {
      font-size: 15px;
      opacity: 0.85;
    }

    .store-header .header-buttons {
      display: flex;
      gap: 8px;
      align-items: center;
    }

    .store-header .change-store-btn,
    .store-header .new-txn-btn {
      background: rgba(255,255,255,0.2);
      border: 1px solid rgba(255,255,255,0.4);
      color: white;
      padding: 10px 20px;
      border-radius: 8px;
      font-size: 16px;
      cursor: pointer;
      font-family: var(--font-body);
      font-weight: 600;
      transition: background var(--transition-fast);
    }

    .store-header .change-store-btn:hover,
    .store-header .new-txn-btn:hover {
      background: rgba(255,255,255,0.3);
    }

    .store-header .new-txn-btn {
      background: rgba(166, 80, 60, 0.8);
      border-color: rgba(166, 80, 60, 0.9);
    }

    /* --- Main card wrapper --- */
    .main-card {
      background: var(--surface);
      border-radius: 20px;
      box-shadow: var(--card-shadow);
      border: 1px solid var(--border-light);
      max-width: 1000px;
      margin: 16px auto 24px;
      overflow: hidden;
    }

    .main-card .container {
      max-width: none;
      padding: 16px 32px 24px;
    }

    /* --- Progress bar --- */
    .progress-bar-container {
      background: var(--border-light);
      height: 10px;
      width: 100%;
    }

    .progress-bar-fill {
      background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
      height: 100%;
      width: 0%;
      transition: width 0.3s ease;
      border-radius: 0 5px 5px 0;
    }

    .step-counter {
      text-align: center;
      font-size: 16px;
      color: var(--text-tertiary);
      padding: 8px 0;
      background: var(--surface);
      border-bottom: 1px solid var(--border-light);
    }

    /* --- Screens: hidden by default, shown via JS --- */
    .screen { display: none; }
    .screen.active { display: block; }

    /* --- Screen header --- */
    .screen-title {
      font-family: var(--font-heading);
      font-size: 32px;
      font-weight: 700;
      margin-bottom: 4px;
    }

    .screen-subtitle {
      color: var(--text-tertiary);
      font-size: 17px;
      margin-bottom: 20px;
    }

    /* --- Navigation --- */
    .nav-bar {
      display: flex;
      align-items: center;
      margin-bottom: 16px;
      gap: 12px;
    }

    .back-btn {
      background: linear-gradient(135deg, var(--earth) 0%, var(--earth-light) 100%);
      border: none;
      font-size: 18px;
      color: white;
      cursor: pointer;
      padding: 10px 20px;
      line-height: 1;
      font-family: var(--font-body);
      border-radius: 10px;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-weight: 600;
      box-shadow: 0 4px 12px rgba(154, 124, 90, 0.3);
      transition: background var(--transition), box-shadow var(--transition);
    }

    .back-btn:hover {
      background: linear-gradient(135deg, var(--earth-dark) 0%, var(--earth) 100%);
      box-shadow: 0 6px 16px rgba(154, 124, 90, 0.4);
    }

    .nav-title {
      font-size: 20px;
      font-weight: 600;
    }

    /* --- Item counter badge --- */
    .item-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
      color: white;
      border-radius: 20px;
      min-width: 36px;
      height: 36px;
      padding: 10px 28px;
      font-size: 19px;
      font-weight: 700;
    }

    /* --- Selection grid (item types, metals, etc.) --- */
    .selection-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 10px;
      margin-bottom: 16px;
    }

    .selection-grid .grid-item {
      background: var(--surface);
      border: 2px solid var(--border);
      border-radius: 16px;
      padding: 24px;
      text-align: center;
      font-size: 18px;
      font-weight: 700;
      cursor: pointer;
      transition: border-color var(--transition), background var(--transition), transform var(--transition), box-shadow var(--transition);
      box-shadow: 0 4px 15px rgba(0,0,0,0.08);
      min-height: 140px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 14px;
      -webkit-tap-highlight-color: transparent;
    }

    .selection-grid .grid-item .grid-emoji {
      font-size: 40px;
      line-height: 1;
    }

    .selection-grid .grid-item:hover {
      border-color: var(--earth);
      background: var(--cream);
      box-shadow: 0 8px 30px rgba(154,124,90,0.35);
      transform: translateY(-5px);
    }

    .selection-grid .grid-item.selected {
      border-color: var(--earth);
      background: #F0E8E0;
      color: var(--earth-dark);
    }

    /* --- Metal purity grids (Screen 2) --- */
    .metal-section {
      margin-bottom: 35px;
    }

    .gold-grid {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 18px;
      margin-bottom: 16px;
    }

    .silver-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 18px;
      max-width: 700px;
      margin-bottom: 16px;
    }

    .other-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 18px;
      max-width: 450px;
      margin-bottom: 16px;
    }

    .metal-tile {
      min-height: 115px;
      padding: 20px;
      border: none;
      border-radius: 14px;
      cursor: pointer;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 8px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
      transition: all 0.3s;
      font-family: var(--font-body);
      -webkit-tap-highlight-color: transparent;
      font-size: 19px;
      font-weight: 700;
      color: #1f2937;
    }

    .metal-tile .tile-secondary {
      font-size: 15px;
      color: #6b7280;
      font-weight: 500;
    }

    .metal-tile.gold {
      background: linear-gradient(135deg, #fef9c3 0%, #fef08a 100%);
      border: 2px solid #f5d680;
    }

    .metal-tile.gold:hover {
      transform: translateY(-3px);
      box-shadow: 0 6px 20px rgba(251, 191, 36, 0.4);
    }

    .metal-tile.silver {
      background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
      border: 2px solid #c8d0d8;
    }

    .metal-tile.silver:hover {
      transform: translateY(-3px);
      box-shadow: 0 6px 20px rgba(148, 163, 184, 0.4);
    }

    .metal-tile.other {
      background: linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%);
      border: 2px solid var(--border);
    }

    .metal-tile.other:hover {
      transform: translateY(-3px);
      box-shadow: 0 6px 20px rgba(107, 114, 128, 0.3);
    }

    /* --- Context reminder box --- */
    .context-reminder {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 15px;
      margin: 0 auto 24px;
      padding: 16px 24px;
      background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
      border: 2px solid #7cb342;
      border-radius: 14px;
      max-width: 600px;
      box-shadow: 0 4px 12px rgba(124, 179, 66, 0.2);
    }

    .context-emoji {
      font-size: 32px;
      line-height: 1;
      flex-shrink: 0;
    }

    .context-reminder .context-label {
      font-size: 19px;
      font-weight: 700;
      color: #1f2937;
    }

    /* --- Item cards (summary) --- */
    .item-card {
      display: flex;
      align-items: center;
      gap: 16px;
      padding: 20px 24px;
      background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
      border: 1px solid var(--border-light);
      border-radius: 14px;
      margin-bottom: 16px;
      box-shadow: 0 4px 12px rgba(44,32,22,0.10);
      cursor: pointer;
      transition: all 0.3s;
      position: relative;
    }

    .item-card:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(184, 149, 111, 0.25);
      background: linear-gradient(135deg, #faf7f2 0%, #f5eee3 100%);
    }

    .item-card .item-info { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }

    .item-card .item-title {
      font-weight: 700;
      font-size: 17px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .item-card .item-detail {
      font-size: 15px;
      color: var(--text-secondary);
      font-weight: 500;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .item-card .item-payout {
      font-size: 23px;
      font-weight: 700;
      color: #b8956f;
      flex-shrink: 0;
    }

    .item-card .item-chevron {
      width: 24px;
      height: 24px;
      stroke: #9ca3af;
      fill: none;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
      flex-shrink: 0;
    }

    .item-card .item-thumb {
      width: 65px;
      height: 65px;
      object-fit: cover;
      border-radius: 10px;
      border: 2px solid #9ca3af;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
      flex-shrink: 0;
    }

    .item-card .btn-danger {
      position: static;
      width: 32px;
      height: 32px;
      min-height: 32px;
      padding: 0;
      font-size: 14px;
      line-height: 1;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .item-thumb-placeholder {
      width: 65px;
      height: 65px;
      min-width: 65px;
      border-radius: 10px;
      background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
      border: 2px solid #9ca3af;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-tertiary);
      font-size: 22px;
      flex-shrink: 0;
    }

    /* --- Summary bar --- */
    .summary-bar {
      margin-top: 16px;
      padding: 28px 30px;
      background: var(--surface-dark);
      border-radius: 14px;
      box-shadow: 0 4px 15px rgba(44, 32, 22, 0.25);
    }

    .summary-bar .summary-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 6px;
    }

    .summary-bar .summary-row:last-child {
      margin-bottom: 0;
    }

    .summary-bar .summary-label {
      font-size: 22px;
      color: #bfb8af;
      font-weight: 600;
    }

    .summary-bar .summary-value {
      font-size: 17px;
      font-weight: 600;
      color: #f5f1ed;
    }

    .summary-bar .total-amount {
      font-size: 34px;
      font-weight: 700;
      font-family: var(--font-mono);
      color: var(--gold-light);
      -webkit-text-fill-color: unset;
      background: none;
    }

    /* --- Payout result --- */
    .payout-result {
      padding: 40px 30px;
      text-align: center;
      margin-bottom: 16px;
      background: var(--surface-dark);
      border-radius: 16px;
    }

    .payout-result .payout-label {
      font-size: 17px;
      color: #bfb8af;
      margin-bottom: 6px;
    }

    .payout-result .payout-amount {
      font-size: 72px;
      font-weight: 700;
      font-family: var(--font-mono);
      color: var(--gold-light);
      -webkit-text-fill-color: unset;
      background: none;
      margin-bottom: 15px;
    }

    .payout-result .spot-info {
      font-size: 14px;
      color: #9d958c;
    }

    /* --- Screen 5 summary card --- */
    .screen5-summary-card {
      background: linear-gradient(135deg, #ffffff 0%, #faf7f2 100%);
      border: 2px solid var(--border);
      border-radius: 16px;
      padding: 28px;
      box-shadow: var(--card-shadow);
      margin-bottom: 24px;
      max-width: 900px;
      width: 100%;
      margin-left: auto;
      margin-right: auto;
    }

    .screen5-summary-card .summary-row {
      display: flex;
      align-items: center;
      gap: 15px;
      margin-bottom: 10px;
    }

    .screen5-summary-card .summary-row:last-child { margin-bottom: 0; }

    .screen5-summary-card .context-emoji {
      font-size: 28px;
    }

    .screen5-summary-card .summary-text {
      font-size: 17px;
      color: var(--text);
      font-weight: 600;
    }

    .screen5-summary-card .summary-detail {
      font-size: 17px;
      color: var(--text);
      margin-left: 55px;
    }

    /* --- Screen 5 action buttons (side-by-side) --- */
    .screen5-actions {
      display: flex;
      gap: 30px;
      justify-content: center;
      margin-top: 40px;
    }

    .screen5-actions .btn-add-item {
      padding: 20px 40px;
      border-radius: 12px;
      font-size: 18px;
      font-weight: 700;
      cursor: pointer;
      min-width: 240px;
      text-align: center;
      background: #ffffff;
      border: 3px solid var(--earth);
      color: var(--earth);
      box-shadow: 0 4px 12px rgba(154, 124, 90, 0.2);
      transition: all 0.3s;
      font-family: var(--font-body);
    }

    .screen5-actions .btn-add-item:hover:not(:disabled) {
      background: var(--cream);
      transform: translateY(-2px);
      box-shadow: 0 6px 18px rgba(154, 124, 90, 0.3);
    }

    .screen5-actions .btn-done-items {
      padding: 20px 40px;
      border-radius: 12px;
      font-size: 18px;
      font-weight: 700;
      cursor: pointer;
      min-width: 240px;
      text-align: center;
      background: linear-gradient(135deg, var(--earth) 0%, var(--earth-light) 100%);
      color: #ffffff;
      border: none;
      box-shadow: 0 6px 20px rgba(154, 124, 90, 0.4);
      transition: all 0.3s;
      font-family: var(--font-body);
    }

    .screen5-actions .btn-done-items:hover:not(:disabled) {
      transform: translateY(-3px);
      box-shadow: 0 8px 30px rgba(154, 124, 90, 0.5);
    }

    .screen5-actions button:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    /* --- Signature canvas --- */
    .signature-canvas-container {
      border: 3px dashed var(--earth);
      border-radius: 14px;
      overflow: hidden;
      margin-bottom: 8px;
      background: white;
      touch-action: none;
      position: relative;
      max-width: 100%;
    }

    .signature-canvas-container canvas {
      display: block;
      width: 100%;
    }

    /* --- QR display --- */
    .qr-display {
      text-align: center;
      padding: 20px;
    }

    .qr-display .qr-container {
      display: inline-block;
      padding: 16px;
      background: white;
      border-radius: 12px;
      border: 2px solid var(--gold);
    }

    .qr-display .txn-id {
      margin-top: 12px;
      padding: 10px;
      background: var(--cream);
      border-radius: 8px;
      font-family: var(--font-mono);
      font-size: 15px;
      word-break: break-all;
    }

    .store-option {
      padding: 12px;
      border: 2px solid var(--border);
      border-radius: 8px;
      margin-bottom: 8px;
      cursor: pointer;
      transition: border-color var(--transition);
    }

    .store-option:hover, .store-option.selected {
      border-color: var(--earth);
      background: var(--cream);
    }

    .store-option .store-option-name {
      font-weight: 600;
      font-size: 16px;
    }

    .store-option .store-option-address {
      font-size: 14px;
      color: var(--text-tertiary);
      margin-top: 2px;
    }

    /* --- Numeric keypad --- */
    .keypad {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 12px;
      margin: 0 auto 16px;
      max-width: 600px;
      background: var(--surface);
      border: 1px solid var(--border-light);
      border-radius: 16px;
      padding: 16px;
      box-shadow: var(--card-shadow);
    }

    .keypad .key {
      background: var(--surface);
      border: 2px solid var(--border);
      border-radius: 12px;
      padding: 16px;
      text-align: center;
      font-size: 30px;
      font-weight: 600;
      cursor: pointer;
      min-height: 80px;
      display: flex;
      align-items: center;
      justify-content: center;
      -webkit-tap-highlight-color: transparent;
      font-family: var(--font-body);
      transition: background var(--transition-fast), border-color var(--transition-fast), transform 0.1s ease, box-shadow var(--transition-fast);
      box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    }

    .keypad .key:active {
      background: var(--cream);
      border-color: var(--earth);
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    }

    .keypad .key.key-action,
    .keypad .key.key-clear {
      background: var(--cream);
      font-size: 22px;
      color: var(--text-secondary);
    }

    .keypad .key.key-span-2 {
      grid-column: span 2;
    }

    .keypad .key.key-continue {
      grid-column: 1 / -1;
      background: linear-gradient(135deg, var(--earth) 0%, var(--earth-light) 100%);
      color: white;
      font-size: 20px;
      min-height: 70px;
      box-shadow: 0 4px 12px rgba(154, 124, 90, 0.3);
      border: none;
    }

    .keypad .key.key-continue:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    /* --- Weight display --- */
    .weight-display {
      background: var(--surface);
      border-radius: 12px;
      padding: 20px;
      margin: 0 auto 16px;
      border: 2px solid var(--border);
      max-width: 600px;
      box-shadow: var(--card-shadow);
    }

    .weight-field {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 10px 0;
      border-bottom: 1px solid var(--border-light);
    }

    .weight-field:last-child { border-bottom: none; }

    .weight-field .weight-label {
      font-size: 16px;
      color: var(--text-secondary);
    }

    .weight-field .weight-value {
      font-size: 32px;
      font-weight: 600;
      font-family: var(--font-mono);
    }

    .weight-field .weight-value.active {
      color: var(--earth);
    }

    .weight-field .weight-value.net {
      background: linear-gradient(135deg, var(--earth) 0%, var(--earth-light) 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    /* --- Handoff prompt --- */
    .handoff-prompt {
      background: var(--ochre-light);
      border: 2px solid var(--ochre);
      border-radius: 12px;
      padding: 16px;
      text-align: center;
      margin-bottom: 16px;
    }

    .handoff-prompt .handoff-icon {
      font-size: 32px;
      margin-bottom: 8px;
    }

    .handoff-prompt .handoff-text {
      font-size: 17px;
      font-weight: 600;
      color: #6B5A1F;
    }

    /* --- Signature instruction --- */
    .signature-instruction {
      font-size: 24px;
      font-weight: 700;
      color: var(--text);
      text-align: center;
      margin-bottom: 35px;
    }

    /* --- Legal text / disclaimer --- */
    .legal-text {
      background: #f8f9fa;
      border: 2px solid #e5e7eb;
      border-radius: 14px;
      padding: 25px;
      font-size: 17px;
      color: var(--text);
      line-height: 1.6;
      margin-bottom: 35px;
      max-height: none;
      overflow-y: visible;
    }

    /* --- Contact fields --- */
    .contact-fields {
      display: flex;
      gap: 30px;
      margin-bottom: 35px;
    }

    .contact-fields .field-group {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .contact-fields .field-label {
      font-size: 17px;
      color: var(--text-secondary);
    }

    .contact-fields .field-input {
      padding: 16px 20px;
      border: 2px solid #d1d5db;
      border-radius: 10px;
      font-size: 18px;
      font-family: var(--font-body);
      transition: all 0.3s;
    }

    .contact-fields .field-input:focus {
      outline: none;
      border-color: var(--earth-light);
      background: var(--cream);
    }

    .contact-hint {
      font-size: 15px;
      color: var(--text-secondary);
      margin-bottom: 12px;
      font-style: italic;
    }

    /* --- Agreement checkbox --- */
    .agreement-row {
      display: flex;
      align-items: center;
      gap: 18px;
      margin-bottom: 40px;
      padding: 20px;
      cursor: pointer;
    }

    .agreement-row input[type="checkbox"] {
      -webkit-appearance: checkbox;
      appearance: checkbox;
      width: 44px;
      height: 44px;
      min-width: 44px;
      margin-top: 0;
      cursor: pointer;
      accent-color: var(--earth);
    }

    .agreement-row label {
      font-size: 19px;
      font-weight: 600;
      cursor: pointer;
    }

    /* --- Photo capture --- */
    .photo-preview-container {
      width: 100%;
      max-width: 800px;
      margin: 0 auto 16px;
      border-radius: 14px;
      overflow: hidden;
      background: var(--cream);
      border: 3px solid var(--border);
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    }

    .photo-preview-container img {
      display: block;
      width: 100%;
      height: auto;
    }

    .photo-placeholder {
      width: 100%;
      height: 280px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      color: var(--text-tertiary);
      font-size: 16px;
      gap: 8px;
    }

    .photo-placeholder .camera-icon {
      font-size: 48px;
    }

    .photo-actions {
      display: flex;
      gap: 12px;
      margin-bottom: 16px;
      max-width: 800px;
      margin-left: auto;
      margin-right: auto;
    }

    .photo-actions .btn {
      flex: 1;
    }
