/* Scoped adapter: no upstream checkout/payment styles or behavior changed. */
#customer_gate, #customer_gate .customer-gate-admin-grid, #customer_gate .customer-gate-table-wrap { min-width: 0; max-width: 100%; }
.customer-gate { margin: 20px 0; padding: 20px; border: 1px solid var(--glass-border, #d5d9df); border-radius: 12px; background: var(--surface-soft, #f8fafc); color: var(--text-main, #172033); }
.customer-gate [hidden], .customer-gate[hidden] { display: none !important; }
.customer-gate h3 { font-size: 18px; margin: 0 0 10px; }
.customer-gate h4 { font-size: 15px; margin: 18px 0 8px; }
.customer-gate-note, .customer-gate-status { font-size: 13px; line-height: 1.7; color: var(--text-secondary, #334155); margin: 8px 0; overflow-wrap: anywhere; }
.customer-gate-support { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 16px; }
.customer-gate-contact { border: 1px solid var(--glass-border, #d5d9df); border-radius: 8px; padding: 12px; background: var(--surface, white); overflow-wrap: anywhere; }
.customer-gate-contact p { margin: 8px 0; user-select: all; }
.customer-gate-contact img { object-fit: contain; max-width: 100%; background: white; }
.customer-gate-copy { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.8; }
.customer-gate-terms { max-height: 280px; overflow: auto; border: 1px solid var(--glass-border, #d5d9df); border-radius: 8px; background: var(--surface, white); padding: 14px; }
.customer-gate-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 12px; }
.customer-gate-summary { padding: 12px; border-left: 3px solid var(--primary, #b93d34); font-weight: 600; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.customer-gate-checks { padding: 12px 0 0; margin: 12px 0 0; border: 0; }
.customer-gate-checks legend { font-size: 14px; font-weight: 600; }
.customer-gate-check { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; font-size: 14px; line-height: 1.6; cursor: pointer; }
.customer-gate-check input { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 3px; accent-color: var(--primary, #b93d34); }
.customer-gate :focus-visible { outline: 3px solid var(--primary, #b93d34); outline-offset: 3px; }
.customer-gate button:disabled { opacity: .65; cursor: not-allowed; }
/* Restored from cumulative-worktree/public/us-parity.css: fixed three-stage
   customer dialog. Selectors stay scoped so admin and payment pages are untouched. */
.customer-gate-dialog {
  width: min(1320px, calc(100% - 24px)); height: min(92dvh, 1080px); max-width: none;
  max-height: min(92dvh, 1080px); padding: 0; inset: 0; margin: auto; overflow: hidden;
  color: #f4f1eb; border: 1px solid rgba(255,255,255,.18); border-radius: 22px;
  background: #141416; box-shadow: 0 38px 120px rgba(0,0,0,.66), inset 0 1px 0 rgba(255,255,255,.05);
  font-family: inherit; box-sizing: border-box;
}
.customer-gate-dialog::backdrop { background: rgba(3,3,4,.82); backdrop-filter: blur(8px); }
.customer-gate-dialog *, .customer-gate-dialog *::before, .customer-gate-dialog *::after { box-sizing: border-box; }
.customer-gate-dialog [hidden] { display: none !important; }
.customer-gate-dialog :focus-visible { outline: 3px solid #ffb947; outline-offset: 3px; }
.customer-gate-dialog button, .customer-gate-dialog input { font: inherit; }
#customerGateDialog button { cursor: pointer; box-shadow: none; transform: none; }
#customerGateDialog button:disabled { opacity: .5; cursor: not-allowed; }
.customer-gate-dialog-shell { position: relative; width: 100%; height: 100%; max-height: 100%; display: flex; flex-direction: column; min-height: 0; }
.customer-gate-dialog-head { flex: 0 0 auto; display: flex; justify-content: space-between; gap: 16px; padding: 24px 34px 6px; text-align: left; background: linear-gradient(135deg, rgba(255,255,255,.025), transparent 58%); }
.customer-gate-kicker { color: #c8a75e; font: 700 10px/1.2 "SFMono-Regular", Consolas, monospace; letter-spacing: .18em; }
.customer-gate-dialog-head h2 { margin: 7px 0 6px; color: #f0ebe4; font-family: "Noto Serif SC", "Songti SC", "STSong", serif; font-size: 30px; font-weight: 650; line-height: 1.25; }
.customer-gate-dialog-head p { margin: 0; color: #aaa39b; font-size: 16px; line-height: 1.6; }
#customerGateDialog .customer-gate-close { flex: 0 0 40px; align-self: flex-start; width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; color: #d9d3ca; background: transparent; font-size: 26px; }
.customer-gate-stages { flex: 0 0 auto; align-self: flex-start; display: flex; gap: 8px; margin: 0; padding: 16px 34px 0; list-style: none; }
.customer-gate-stages li { flex: 1; min-height: 56px; padding: 14px 18px; display: flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.105); border-radius: 10px; color: #a9a29a; background: rgba(255,255,255,.018); font-size: 17px; }
.customer-gate-stages li span { width: 26px; height: 26px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: #a8a29b; background: rgba(255,255,255,.07); font-size: 14px; }
.customer-gate-stages .active { color: #f1ede6; border-color: rgba(255,185,71,.34); background: rgba(196,127,23,.08); }
.customer-gate-stages .active span { color: #241a08; background: #ffb947; }
.customer-gate-stages .done { color: #a8cbb9; border-color: rgba(138,209,176,.3); }
.customer-gate-stages .done span { color: #8edbb9; background: rgba(138,209,176,.18); }
.customer-gate-read-progress { flex: 0 0 auto; padding: 14px 34px 0; }
.customer-gate-read-track { height: 4px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.07); }
.customer-gate-read-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: #ffb947; }
.customer-gate-read-progress p { margin: 7px 0 0; color: #b0a79d; font-size: 12px; }
.customer-gate-dialog-scroll { flex: 1 1 auto; min-height: 0; padding: 22px 34px 30px; overflow-y: auto; overscroll-behavior: contain; scrollbar-color: rgba(255,185,71,.34) rgba(255,255,255,.035); }
.customer-gate-pane { display: grid; gap: 22px; min-height: 0; }
.customer-gate-section-intro { display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 15px; align-items: start; }
.customer-gate-section-number { width: 38px; height: 38px; display: grid; place-items: center; color: #d7a952; border: 1px solid rgba(255,185,71,.24); border-radius: 50%; background: rgba(196,127,23,.09); font: 700 11px/1 Consolas, monospace; }
.customer-gate-section-intro h3 { margin: 1px 0 7px; color: #ece7df; font-size: 27px; font-weight: 720; }
.customer-gate-section-intro p { margin: 0; color: #b1aaa2; font-size: 17px; line-height: 1.85; }
.customer-gate-contact-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.customer-gate-contact-card { min-width: 0; padding: 18px; display: grid; grid-template-columns: minmax(160px,.9fr) minmax(120px,1.1fr); gap: 18px; align-items: center; border: 1px solid rgba(255,255,255,.105); border-radius: 16px; background: rgba(255,255,255,.018); }
.customer-gate-contact-card:not(:has(img)) { grid-template-columns: 1fr; }
.customer-gate-contact-card:not(:has(img)) .customer-gate-contact-meta { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px 16px; }
.customer-gate-contact-card:not(:has(img)) .customer-gate-contact-meta strong { font-size: 14px; }
.customer-gate-contact-card:not(:has(img)) .customer-gate-contact-meta p { margin: 0; }
.customer-gate-contact-card:not(:has(img)) .customer-gate-contact-meta small { display: none; }
.customer-gate-contact-card:not(:has(img)) .customer-gate-copy-status { grid-column: 1 / -1; }
.customer-gate-qr-frame { min-width: 0; padding: 12px; display: grid; place-items: center; overflow: hidden; border-radius: 12px; background: #fff; }
.customer-gate-qr-frame img { width: 300px; max-width: 100%; height: auto; object-fit: contain; }
.customer-gate-contact-meta { min-width: 0; overflow-wrap: anywhere; }
.customer-gate-contact-meta strong { color: #ece7df; font-size: 20px; }
.customer-gate-contact-meta p { margin: 12px 0; color: #f5d9a4; font: 600 18px/1.6 Consolas, monospace; user-select: all; }
.customer-gate-contact-meta small { color: #aaa39b; font-size: 13px; line-height: 1.8; }
#customerGateDialog .customer-gate-copy-contact { display: block; min-height: 42px; margin-top: 16px; padding: 8px 16px; border: 1px solid rgba(255,185,71,.34); border-radius: 9px; color: #ecd6ad; background: rgba(196,127,23,.08); font-size: 14px; font-weight: 600; }
#customerGateDialog .customer-gate-contact-card:not(:has(img)) .customer-gate-copy-contact { margin-top: 0; }
.customer-gate-copy-status { display: block; margin-top: 7px; color: #b9cbb7; font-size: 12px; line-height: 1.6; }
.customer-gate-copy-status:empty { display: none; }
.customer-gate-guide-copy, .customer-gate-rules { white-space: pre-wrap; overflow-wrap: anywhere; color: #d4cdc3; font-size: 17px; line-height: 1.95; }
.customer-gate-guide-copy { padding: 22px; border: 1px solid rgba(255,185,71,.2); border-radius: 14px; background: rgba(196,127,23,.035); }
.customer-gate-end-marker { padding: 14px 0 0; margin: 0; text-align: center; color: #aea599; font-size: 13px; }
.customer-gate-dialog-footer { flex: 0 0 auto; padding: 18px 34px 20px; border-top: 1px solid rgba(255,255,255,.18); background: #101012; box-shadow: 0 -14px 30px rgba(0,0,0,.45); }
.customer-gate-ack { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 12px; padding: 12px 14px; border: 1px solid rgba(255,185,71,.26); border-radius: 12px; background: rgba(196,127,23,.07); cursor: pointer; }
.customer-gate-ack input { flex: 0 0 24px; width: 24px; height: 24px; margin: 1px 0 0; accent-color: #b93d34; }
.customer-gate-ack span { color: #cfc8c0; font-size: 17px; line-height: 1.75; }
.customer-gate-ack span b { display: block; margin-bottom: 3px; color: #f1ede6; font-size: 18px; font-weight: 650; }
.customer-gate-ack:has(input:disabled) { opacity: .6; cursor: not-allowed; }
.customer-gate-scroll-hint { margin: -6px 0 10px; color: #b1a89d; font-size: 13px; text-align: right; }
.customer-gate-action-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.customer-gate-action-row > span { color: #b1a89d; font-size: 14px; overflow-wrap: anywhere; }
.customer-gate-action-row > div { display: flex; gap: 9px; }
#customerGateDialog .customer-gate-primary, #customerGateDialog .customer-gate-secondary { min-height: 52px; padding: 0 26px; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; color: #e8e1d7; background: rgba(255,255,255,.035); font-size: 17px; font-weight: 650; }
#customerGateDialog .customer-gate-primary { color: #fff4ef; border-color: #b93d34; background: #b93d34; }
#customerGateDialog .customer-gate-primary:hover:not(:disabled) { background: #a3312a; }
#customerGateDialog .customer-gate-secondary:hover:not(:disabled), #customerGateDialog .customer-gate-close:hover:not(:disabled) { background: rgba(255,255,255,.08); }
#customerGateDialog .customer-gate-copy-contact:hover:not(:disabled) { background: rgba(196,127,23,.16); }
@media (max-width: 960px) {
  .customer-gate-contact-grid { grid-template-columns: 1fr; }
  .customer-gate-contact-card { grid-template-columns: minmax(140px,.85fr) minmax(140px,1.15fr); }
  .customer-gate-qr-frame img { width: 210px; }
}
@media (max-width: 720px) {
  .customer-gate-dialog { width: calc(100% - 12px); height: calc(100dvh - 12px); max-height: calc(100dvh - 12px); border-radius: 15px; }
  .customer-gate-dialog-head { padding: 21px 17px 8px; }
  .customer-gate-dialog-head h2 { font-size: 23px; }
  .customer-gate-dialog-head p { font-size: 13px; }
  .customer-gate-stages, .customer-gate-read-progress { padding-left: 15px; padding-right: 15px; }
  .customer-gate-stages { width: 100%; gap: 6px; }
  .customer-gate-stages li { min-width: 0; min-height: 44px; padding: 8px 9px; justify-content: center; font-size: 13px; }
  .customer-gate-stages li span { width: 22px; height: 22px; font-size: 12px; }
  .customer-gate-dialog-scroll { padding: 18px 15px 28px; }
  .customer-gate-section-intro { grid-template-columns: 32px minmax(0,1fr); gap: 11px; }
  .customer-gate-section-number { width: 32px; height: 32px; }
  .customer-gate-section-intro h3 { font-size: 21px; }
  .customer-gate-section-intro p { font-size: 14px; line-height: 1.75; }
  .customer-gate-contact-card { padding: 13px; }
  .customer-gate-contact-meta strong { font-size: 17px; }
  .customer-gate-guide-copy, .customer-gate-rules { font-size: 15px; line-height: 1.85; }
  .customer-gate-guide-copy { padding: 15px; }
  .customer-gate-dialog-footer { padding: 13px 15px max(14px,env(safe-area-inset-bottom)); }
  .customer-gate-ack input { flex-basis: 20px; width: 20px; height: 20px; }
  .customer-gate-ack span { font-size: 13px; line-height: 1.65; }
  .customer-gate-ack span b { font-size: 14px; }
  .customer-gate-action-row { flex-direction: column; align-items: stretch; gap: 9px; }
  .customer-gate-action-row > span { text-align: center; font-size: 11px; }
  .customer-gate-action-row > div { display: grid; grid-template-columns: .8fr 1.2fr; }
  #customerGateDialog .customer-gate-primary, #customerGateDialog .customer-gate-secondary { width: 100%; min-height: 46px; padding: 0 10px; font-size: 13px; }
}
@media (max-width: 480px) {
  .customer-gate-contact-card { grid-template-columns: 1fr; }
  .customer-gate-contact-meta { text-align: center; }
  .customer-gate-contact-card:not(:has(img)) .customer-gate-contact-meta { grid-template-columns: 1fr; gap: 10px; }
  #customerGateDialog .customer-gate-copy-contact { margin-left: auto; margin-right: auto; }
}
#customer_gate .customer-gate-admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
#customer_gate label { display: block; font-size: 14px; margin-bottom: 8px; }
#customer_gate input:not([type=checkbox]), #customer_gate textarea { display: block; width: 100%; box-sizing: border-box; padding: 10px 12px; margin-top: 8px; border: 1px solid var(--glass-border, #d5d9df); border-radius: 8px; color: var(--text-main, #172033); background: var(--surface, white); font: inherit; }
#customer_gate .customer-gate-wide { grid-column: 1 / -1; }
#customer_gate table { width: 100%; border-collapse: collapse; font-size: 13px; }
#customer_gate th, #customer_gate td { text-align: left; padding: 10px; border-bottom: 1px solid var(--glass-border, #d5d9df); overflow-wrap: anywhere; }
#customer_gate .customer-gate-table-wrap { overflow-x: auto; }
@media (max-width: 640px) {
  .customer-gate { padding: 14px; }
  .customer-gate-buttons button { flex: 1 1 180px; }
  #customer_gate .customer-gate-admin-grid { grid-template-columns: 1fr; }
}
