/* The approved prototype's one-sheet configuration flow, scoped to touch layouts. */
body:is([data-layout="mobile"], [data-layout="portrait"]) #touchMenuConfigDialog {
  box-sizing: border-box; width: min(640px, 100vw); max-width: 640px;
  height: calc(100dvh - 30px); max-height: calc(100dvh - 30px);
  margin: auto auto 0; padding: 0; border: 0; border-radius: 28px 28px 0 0;
  background: var(--touch-canvas, #f7f6f2); color: var(--touch-ink, #242a26);
  box-shadow: 0 -12px 38px #17231d22; overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #touchMenuConfigDialog[open] { display: flex; flex-direction: column; }
body:is([data-layout="mobile"], [data-layout="portrait"]) #touchMenuConfigDialog::backdrop { background: #17231d70; backdrop-filter: blur(3px); }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-handle { width: 35px; height: 4px; flex: 0 0 4px; align-self: center; margin: 9px 0 2px; border-radius: 5px; background: #c9cbc2; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: 0 0 auto; padding: 15px 20px 14px; border-bottom: 1px solid var(--touch-line, #e4e5dd); }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-header > div { min-width: 0; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-eyebrow { margin: 0 0 6px; color: var(--touch-muted, #62695f); font-size: 10px; font-weight: 700; letter-spacing: .12em; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-header h2 { margin: 0; color: var(--touch-ink, #242a26); font-size: 23px; line-height: 1.25; letter-spacing: -.4px; overflow-wrap: anywhere; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-close { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: #eceee8; color: var(--touch-ink, #242a26); font: inherit; font-size: 26px; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-progress { flex: 0 0 auto; padding: 12px 20px; border-bottom: 1px solid var(--touch-line, #e4e5dd); background: #fff; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-progress p { margin: 0 0 7px; color: var(--touch-muted, #62695f); font-size: 13px; font-weight: 650; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-progress[data-complete="true"] p { color: #38683b; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-progress progress { display: block; appearance: none; width: 100%; height: 5px; border: 0; border-radius: 8px; overflow: hidden; background: var(--touch-line, #e4e5dd); accent-color: var(--touch-accent, #cc4238); }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-progress progress::-webkit-progress-bar { background: var(--touch-line, #e4e5dd); }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-progress progress::-webkit-progress-value { background: var(--touch-accent, #cc4238); border-radius: 8px; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-progress progress::-moz-progress-bar { background: var(--touch-accent, #cc4238); }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px 20px 22px; scroll-padding-block: 12px 24px; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-rule { margin: 0 0 18px; padding: 11px 13px; border-radius: 13px; background: #ecefe4; color: var(--touch-muted, #62695f); font-size: 12px; line-height: 1.55; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-group { min-width: 0; margin: 0 0 16px; border: 0; padding: 0; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-group-title { display: flex; align-items: center; gap: 8px; width: 100%; margin: 0 0 10px; color: var(--touch-ink, #242a26); font-size: 15px; font-weight: 650; line-height: 1.4; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-group-title small { margin-left: auto; color: var(--touch-muted, #62695f); font-size: 11px; font-weight: 400; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-step { display: grid; place-items: center; flex: 0 0 25px; width: 25px; height: 25px; border-radius: 8px; background: #edf0e6; color: var(--touch-muted, #62695f); font-size: 12px; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-group[data-complete="true"] .touch-config-step { background: #e2eedf; color: #38683b; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-group select { box-sizing: border-box; width: 100%; min-height: 50px; padding: 10px 12px; border: 1px solid var(--touch-line, #e4e5dd); border-radius: 12px; background: #fff; color: var(--touch-ink, #242a26); font: inherit; font-size: 16px; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-count-group { padding: 0 12px; border: 1px solid var(--touch-line, #e4e5dd); border-radius: 14px; background: #fff; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-count-group > summary { display: flex; align-items: center; gap: 8px; min-height: 56px; margin: 0; cursor: pointer; list-style: none; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-count-group > summary::-webkit-details-marker { display: none; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-count-group > summary output { color: #b93830; font-size: 13px; white-space: nowrap; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-count-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 54px; border-top: 1px solid #f0f0e9; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-count-row > span { min-width: 0; overflow-wrap: anywhere; font-size: 15px; line-height: 1.4; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-count-row > small { margin-left: auto; color: var(--touch-muted, #62695f); font-size: 12px; white-space: nowrap; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-stepper { display: flex; align-items: center; flex: 0 0 auto; border-radius: 12px; background: #edf0e9; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-stepper button { width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--touch-ink, #242a26); font: inherit; font-size: 20px; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-stepper button:disabled { opacity: .35; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-stepper output { min-width: 21px; color: var(--touch-ink, #242a26); font-size: 13px; text-align: center; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-footer { flex: 0 0 auto; padding: 12px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--touch-line, #e4e5dd); background: #fff; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-required { min-height: 16px; margin: 0 0 10px; color: var(--touch-muted, #62695f); font-size: 11px; line-height: 1.5; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-price-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-prices { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-prices span { color: var(--touch-muted, #62695f); font-size: 11px; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-prices strong { color: var(--touch-ink, #242a26); font-size: 21px; font-weight: 700; white-space: nowrap; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-prices small { flex-basis: 100%; color: var(--touch-muted, #62695f); font-size: 11px; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-feedback { margin: 0 0 10px; color: #b93830; font-size: 12px; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-actions { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 8px; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-actions.single-action { grid-template-columns: minmax(0, 1fr); }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-actions button { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 52px; padding: 9px 10px; border-radius: 12px; font: inherit; font-size: 13px; font-weight: 650; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-actions button[hidden] { display: none; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-add { border: 0; background: var(--touch-accent, #cc4238); color: #fff; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-save { border: 1px solid var(--touch-line, #e4e5dd); background: #fff; color: #b93830; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-save svg { flex: 0 0 18px; width: 18px; height: 18px; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-save[data-saved="true"] svg { fill: currentColor; }
body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-actions button:disabled { opacity: .5; }
body:is([data-layout="mobile"], [data-layout="portrait"]) #touchMenuConfigDialog :focus-visible { outline: 2px solid #b93830; outline-offset: -4px; }
@media (max-height: 520px) {
  body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-header { padding-block: 8px; }
  body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-header h2 { font-size: 19px; }
  body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-progress { padding-block: 7px; }
  body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-footer { padding-top: 8px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  body:is([data-layout="mobile"], [data-layout="portrait"]) .touch-config-price-row { margin-bottom: 7px; }
}
