/* X9 — x9-prep styles (design reference port). Loaded after ui/x9.css.
   «جهّزه» — the product preparation card, its windows, sending and the results. Values are copied from the design
   reference (X9 PREPARATION DESIGN PROTOTYPE, corrections v22/v23/v24, final corrections and saving). The preparation
   card is outside the scaled work canvas in the reference, so its values are plain pixels. */
.x9z-root, .x9z-child-card, .x9z-toast, .x9z-work-save-toast {
    --x9z-lime: #c6f532; --x9z-cyan: #5ceced; --x9z-muted: #c7d7d1; --x9z-red: #ff8c89; --x9z-orange: #ffc17b; --x9z-text: #f5f8f5;
    --x9z-field-fill: #7faaa02b; --x9z-save-muted: #b9d4c6;
}

/* ---------------------------------------------------------------- the card and its layer */
.xa-glass.x9-wizard-layer { background: rgba(0,10,7,.72); }
.xa-glass.x9-wizard-layer.x9z-over-layer { background: transparent; }
.xa-card.x9-wizard-card { font: 500 14px/1.65 var(--x9-font); color: var(--x9z-text, #f5f8f5); text-shadow: 0 1px 2px #00181080; }
.xa-card.x9-wizard-card.x9z-root { background: linear-gradient(135deg,#517d6626,transparent 60%), rgba(19,54,43,.87); backdrop-filter: blur(18px) saturate(.85); -webkit-backdrop-filter: blur(18px) saturate(.85); }
.x9-wizard-card button { font: inherit; }
.x9-wizard-card > .xa-card-head { position: static; padding: 0; height: 0; min-height: 0; border: 0; z-index: 600; }
.x9-wizard-card > .xa-card-head .x9-dismiss { position: absolute; top: 5px; right: 8px; width: 44px; height: 44px; padding: 4px; z-index: 500; color: inherit; }
.x9-wizard-card > .xa-card-head .x9-dismiss svg { width: 33px; height: 33px; stroke: none; filter: none; }

/* ---------------------------------------------------------------- head: type · save status · compact mini */
.x9z-head { position: relative; z-index: 220; display: flex; align-items: center; gap: 4px; height: 54px; min-height: 54px; padding: 5px 56px 5px 8px; background: rgba(26,62,49,.72); flex: none; }
.x9z-root[data-stage="2"] .x9z-head { padding-left: 115px; }
.x9z-root[data-stage="2"].x9z-save-failed .x9z-head { padding-left: 174px; }
.x9z-head-normal { display: flex; align-items: center; justify-content: space-between; gap: 4px; flex: 1; min-width: 0; width: 100%; }
.x9z-subtle { color: var(--x9z-muted); font-size: 12px; margin: 3px 0 10px; }
.x9z-head-normal .x9z-subtle { margin: 0; }
.x9-wizard-card .x9z-type-button { position: static; display: inline-flex; align-items: center; gap: 3px; min-height: 44px; min-width: 44px; padding: 2px 4px; border: 0; background: none; color: var(--x9z-text); font-size: 12px !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x9z-mini { display: none; align-items: center; gap: 8px; flex: 1; min-width: 0; width: 100%; height: 44px; }
.x9z-mini img { width: 36px; height: 40px; object-fit: cover; border-radius: 8px; background: #f1f2f0; }
.x9z-mini > .x9-icon { width: 21px; height: 21px; color: var(--x9z-muted); }
.x9z-mini span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 750; text-align: right; unicode-bidi: isolate; visibility: visible !important; }
.x9z-mini strong { font-size: 12px; color: var(--x9z-lime); }
.x9z-root.is-scrolled .x9z-head-normal { display: none; }
.x9z-root.is-scrolled .x9z-mini { display: flex; }
.x9z-root .x9z-mini img, .x9z-root .x9z-mini span { visibility: visible; }
.x9z-root .x9z-meter { display: none; }
.x9z-save-status { position: absolute; left: 12px; top: 5px; min-height: 44px; display: flex; align-items: center; gap: 5px; z-index: 501; color: var(--x9z-save-muted); font-size: 12px; white-space: nowrap; }
.x9z-save-status > .x9-icon { width: 15px; height: 15px; flex: none; color: #b1dfa5; }
.x9z-save-status[data-state="saving"] > .x9-icon { color: var(--x9z-muted); }
.x9z-save-status[data-state="failed"], .x9z-save-status[data-state="failed"] > .x9-icon { color: var(--x9z-red); }
.x9-wizard-card .x9z-retry-save { background: none; border: 0; min-width: 44px; min-height: 44px; padding: 0 3px; color: inherit; font-size: 12px !important; }
.x9z-save-flash { animation: x9z-save-glint 500ms ease-out; }
@keyframes x9z-save-glint { 25% { color: #eeffd2; filter: drop-shadow(0 0 5px #bdec8080); } 100% { filter: none; } }
.x9z-status { margin: 0; padding: 4px 16px; font-size: 12px; }

/* ---------------------------------------------------------------- hero */
.x9z-root .x9z-scroll { position: relative; }
.x9z-hero { height: 410px; min-height: 410px; padding: 0 16px; position: relative; }
.x9z-root .x9z-name-line { position: static; }
.x9z-hero.has-ai-note { height: 434px; min-height: 434px; }
.x9z-count { margin: 0; height: 23px; line-height: 23px; font-size: 12px; color: var(--x9z-muted); }
.x9z-name-line { margin-top: 7px; height: 60px; }
.x9z-name-line h1 { margin: 0 20px; height: 60px; font-size: 22px; font-weight: 850; line-height: 1.35; overflow-wrap: anywhere; }
.x9z-name-line h1.is-tappable { cursor: text; }
.x9z-name-line h1.is-editing { display: block; overflow: visible; margin: 0 20px; }
.x9z-name-input { display: block; width: 100%; height: 60px; min-height: 60px; max-height: 60px; resize: none; border: 0; border-radius: 12px; outline: none !important; background: var(--x9z-field-fill); color: var(--x9z-text);
    font: inherit !important; text-align: inherit; padding: 0 7px; box-shadow: 0 0 0 1px #c6f53285, 0 0 12px #c6f53219; unicode-bidi: plaintext; }
.x9z-name-input::placeholder { color: #b8c8bf; }
.x9z-name-line h1 .x9-field-error { display: block; font-size: 12px; font-weight: 500; text-align: right; color: var(--x9z-red); padding-top: 5px; }
/* the hero row is fixed-height (sections nav sits right under it): the name error is drawn inside the box */
.x9z-name-line h1.is-editing { position: relative; }
.x9z-name-line h1.is-editing .x9-field-error { position: absolute; bottom: 4px; inset-inline-start: 10px; padding: 0; line-height: 1.2; pointer-events: none; }
.x9z-name-line h1.is-editing:has(.x9-field-error) .x9z-name-input { box-shadow: 0 0 0 1px var(--x9z-red), 0 0 12px #ff6b6b22; }
.x9z-root .x9z-edit { position: absolute; left: 0; top: 332px; width: 44px; height: 44px; padding: 10px; border: 0; background: none; color: var(--x9z-cyan); }
.x9z-root .x9z-edit .x9-icon { width: 21px; height: 21px; }
.x9z-hero-tools { display: flex; justify-content: center; min-height: 23px; }
.x9z-hero-tools .x9z-ai-note { margin: 0; cursor: pointer; }
.x9-wizard-card .x9z-hero-noimage { width: 240px; height: 280px; margin: 7px auto; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--x9z-text); background: #30504433; border-radius: 16px; border: 0; }
.x9z-hero-noimage .x9-icon { width: 21px; height: 21px; color: var(--x9z-text); }
.x9z-hero-noimage span { font-size: 14px; }
.x9z-root[data-stage="1"] .x9z-hero { height: 300px; min-height: 300px; }
.x9z-root[data-stage="1"] .x9z-name-line { margin-top: 3px; }
.x9z-root[data-stage="1"] .x9z-name-line h1 { margin-inline: 12px; }
.x9z-root[data-stage="1"] .x9z-hero-noimage { width: 190px; height: 210px; }
.x9z-hero:has(.x9z-manual-empty) .x9z-name-input { font-size: 22px; line-height: 1.5; }

/* ---------------------------------------------------------------- AI preparing (reference v24) */
.x9z-ai-progress { padding: 8px 18px 16px; background: #244d3e9c; }
.x9z-ai-progress > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.x9z-ai-progress strong { display: flex; gap: 7px; align-items: center; font-size: 14px; }
.x9z-ai-progress strong .x9-icon { width: 19px; height: 19px; color: var(--x9z-cyan); }
.x9z-ai-progress p { font-size: 12px; color: var(--x9z-muted); margin: 0 0 10px; }
.x9z-ai-meter { height: 4px; background: #8ab6a333; border-radius: 6px; overflow: hidden; }
.x9z-ai-meter i { display: block; height: 100%; background: linear-gradient(90deg,var(--x9z-cyan),var(--x9z-lime)); transition: width 160ms; }
.x9z-ai-running .x9z-hero, .x9z-ai-running .x9z-fields, .x9z-ai-running > .xa-card-foot, .x9z-ai-running .x9z-head, .x9z-ai-running > .xa-card-head .x9-dismiss { opacity: .3; pointer-events: none; user-select: none; }
.x9z-ai-note { display: flex; align-items: center; gap: 5px; font-size: 12px; line-height: 1.6; color: var(--x9z-muted); margin-top: 3px; white-space: normal; }
.x9z-ai-note .x9-icon { width: 13px; height: 13px; flex: none; color: #b4c9c2; }

/* ---------------------------------------------------------------- start (stage 1) */
.x9z-start h2 { font-size: 18px; margin: 0 0 6px; font-weight: 800; }
.x9z-start h3 { font-size: 16px; margin: 8px 0 3px; }
.x9z-types { gap: 7px; }
.x9z-types button { min-height: 60px; padding: 4px 3px; gap: 3px; background: #6b9b8730; border-radius: 14px; color: var(--x9z-text); box-shadow: none; }
.x9z-types button[aria-checked=true] { background: #89ae3447; box-shadow: inset 0 0 0 1px #c6f53270; color: var(--x9z-lime); }
.x9z-types button .x9-icon { width: 21px; height: 21px; }
.x9z-types strong { font-size: 12px; }
.x9z-child-card .x9z-types button { min-height: 72px; padding: 7px 3px; gap: 5px; }
.x9z-type-description { font-size: 12px; color: var(--x9z-muted); margin: 5px 0; }
.x9z-soon-types { font-size: 12px; padding: 0; line-height: 1.6; color: var(--x9z-muted); }
.x9z-soon-types .x9z-pill { min-height: 20px; }
.x9z-pill { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; border-radius: 20px; padding: 2px 9px; background: #4b68524a; color: var(--x9z-lime); font-size: 12px; white-space: nowrap; font-weight: 500; }
.x9z-templates button { min-height: 48px; padding: 4px 0; gap: 8px; }
.x9z-templates strong { font-size: 14px; line-height: 1.4; }
.x9z-templates small { font-size: 12px; line-height: 1.4; color: var(--x9z-muted); }
.x9z-templates [aria-checked=true] strong { color: var(--x9z-lime); }
.x9z-templates [aria-checked=true] { color: var(--x9z-text); }
.x9z-choice-mark { width: 22px; height: 22px; min-width: 22px; border: 1px solid #96ac9e70; border-radius: 50%; display: grid; place-items: center; font-style: normal; }
.x9z-templates [aria-checked=true] .x9z-choice-mark { background: var(--x9z-lime); border-color: var(--x9z-lime); color: #173014; }
.x9z-choice-mark .x9-icon { width: 16px; height: 16px; color: inherit; }
.x9z-templates i:not(.x9z-choice-mark) { display: none; }

/* ---------------------------------------------------------------- footers and buttons */
.x9-wizard-card .xa-card-foot { background: #14382cf5; padding: 8px 12px; gap: 8px; }
.x9-wizard-card .xa-card-foot .xa-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; padding: 10px 18px; min-height: 48px; font-size: 15px; font-weight: 800;
    background: linear-gradient(115deg,#cefa58,#b8f22f); color: #152613; text-shadow: none; box-shadow: 0 3px 18px #b3ed3317; flex: 1; }
.x9-wizard-card .xa-card-foot .xa-btn .x9-icon { color: inherit; width: 21px; height: 21px; }
.x9-wizard-card .xa-card-foot .xa-btn.ghost { flex: none; padding: 8px 14px; min-height: 44px; border-radius: 12px; color: var(--x9z-text); background: #45675650; box-shadow: none; font-weight: 500; font-size: 14px; }
.x9z-root[data-stage="1"] > .xa-card-foot { gap: 8px; }
.x9z-root[data-stage="1"] > .xa-card-foot [data-wiz=save] { flex: 0 0 30%; min-width: 72px; padding: 10px 8px; min-height: 58px; font-size: 15px; }
.x9z-root > .xa-card-foot .xa-btn.x9z-ai-start { flex: 1; min-width: 0; min-height: 44px; height: 44px; padding: 7px 8px; gap: 6px; font-size: 14px; line-height: 1.5; font-weight: 500; background: #41645766; color: var(--x9z-text); border-radius: 12px; }
.x9z-ai-start > .x9-icon { flex: none; width: 18px !important; height: 18px !important; color: var(--x9z-cyan) !important; }
.x9z-ai-start > span:not(.x9z-pill) { min-width: 0; text-align: right; }
.x9z-ai-start .x9z-pill { font-size: 12px; padding: 2px 5px; flex: none; }
.x9z-root[data-stage="2"] > .xa-card-foot [data-wiz=save] { flex: 0 0 64px; min-width: 64px; min-height: 48px; padding: 8px; color: var(--x9z-save-muted); background: #779b7e1a; font-size: 14px; font-weight: 500; box-shadow: none; }
.x9z-root > .xa-card-foot .x9z-progress-action { position: relative; flex: 1; min-width: 0; padding-inline: 8px; height: 48px; background: #2e493a; overflow: hidden; color: #f4ffe7; box-shadow: none; font-weight: 800; }
.x9z-progress-action::before { content: ''; position: absolute; inset: 0 0 0 auto; width: var(--x9z-progress, 0%); background: linear-gradient(110deg,#c5f34c,#93bc29); opacity: .72; transition: width 220ms; }
.x9z-root > .xa-card-foot .x9z-progress-action.is-full { color: #10270b; }
.x9z-progress-action.is-full::before { opacity: 1; }
.x9z-progress-action > span { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; text-shadow: 0 1px 2px #15301655; }
.x9z-progress-action.is-full > span { text-shadow: none; }
.x9-wizard-card .x9z-link, .x9-wizard-card .x9z-quiet { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 4px 8px; min-height: 44px; min-width: 44px; border: 0; background: none; color: var(--x9z-text); font-size: 14px; line-height: 1.5; cursor: pointer; text-decoration: none; }
/* in the reference every link inherits the text colour (`.x9-flow button{color:inherit}` outranks `.x9-link`) */
.x9z-link .x9-icon { width: 18px; height: 18px; color: inherit; }
.x9z-link:disabled { opacity: .5; cursor: default; }
.x9z-danger { color: var(--x9z-red) !important; }
.x9z-warn { color: var(--x9z-orange) !important; }
.x9z-success { color: var(--x9z-lime) !important; }
.x9z-center { text-align: center; }
.x9z-hint { color: var(--x9z-orange); font-size: 12px; line-height: 1.7; margin: 6px 0; }
.x9-wizard-card .x9z-icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--x9z-muted); flex: none; }

/* ---------------------------------------------------------------- editor (stage 2) */
.x9z-tabs { position: sticky; top: 0; z-index: 35; gap: 7px; min-height: 54px; padding: 5px 14px; background: #15392ef7; }
.x9z-tabs button { height: 44px; border-radius: 12px; background: #30534785; color: var(--x9z-muted); font-size: 14px !important; font-weight: 650; box-shadow: none; }
.x9z-tabs [aria-current=true] { background: #769b2b68; color: #ddff8f; box-shadow: inset 0 0 0 1px #c6f53245, 0 0 13px #baf5340d; }
.x9z-dot { width: 5px; height: 5px; margin: 0; }
.x9z-dot.important { background: var(--x9z-orange); }
.x9z-dot.required { background: var(--x9z-red); }
.x9z-field-sections { padding: 0 16px; }
.x9z-field-sections > section { scroll-margin-top: 62px; }
.x9z-field-sections > section + section { padding-top: 15px; }
.x9z-field-sections [data-section="extra"] { min-height: calc(100dvh - 194px); }
.x9z-field-sections h3 { font-size: 16px; margin: 12px 0 8px; }
.x9z-translate-row { display: flex; justify-content: center; align-items: center; }
.x9z-translate-row:empty { display: none; }
.x9z-translate-row .x9z-original { color: var(--x9z-text); }
.x9z-translate-row .x9-icon { width: 21px; height: 21px; color: inherit; }
.x9z-price-block { text-align: right; padding: 0 0 10px; }
.x9z-price-block > .x9z-link { display: inline-flex; margin: 0; }
.x9z-price-source { text-align: center; color: var(--x9z-muted); font-size: 12px; pointer-events: none; padding: 4px 0 10px; }
.x9z-old-price-line { text-align: center; margin: 0 0 4px; }
.x9z-old-price { font-size: 15px; color: var(--x9z-muted); text-decoration: line-through; margin-left: 8px; }
.x9z-readiness-actions { display: flex; gap: 12px; justify-content: center; margin-top: 3px; }
.x9z-readiness-actions button { padding: 0; font-size: 12px; }
.x9z-row { padding: 10px 0; border-bottom: 1px solid #bfdac00c; }
.x9z-row h3 { font-size: 14px; margin: 0 0 4px; }
.x9z-root .x9z-fields .x9-field { margin: 12px 0 16px; }
.x9z-chipline { display: flex; gap: 7px; flex-wrap: wrap; margin: 8px 0 16px; }
.x9-wizard-card .x9z-option { min-width: 44px; min-height: 44px; padding: 8px 12px; border-radius: 12px; border: 0; background: #46625242; color: var(--x9z-text); cursor: pointer; }
.x9-wizard-card .x9z-option[aria-pressed="true"] { color: #172719; background: var(--x9z-lime); font-weight: 750; }
/* inside the windows the reference keeps the matte chip and only darkens the chosen text (`.x9-window .x9-option` wins the cascade) */
.x9-wizard-card.x9z-over .x9z-option, .x9-wizard-card.x9z-over .x9z-option[aria-pressed="true"] { background: #64877b45; }
.x9-wizard-card .x9z-size-option { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 56px; padding: 7px 9px; }
.x9z-size-option strong { font-size: 15px; }
.x9z-size-option small { font-size: 12px; opacity: .85; }
.x9z-option[hidden] { display: none; }
.x9z-root .x9z-feature { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 78px !important; border: 0; border-bottom: 1px solid #bddece12; background: none; padding: 12px 0; text-align: right; color: var(--x9z-text); }
.x9z-root .x9z-feature:active { background: #42614e32; }
.x9z-root .x9z-feature > .x9z-feature-icon { flex: none; display: grid; }
.x9z-feature-icon { display: grid; place-items: center; width: 32px; min-width: 32px; height: 38px; color: #87dfef; }
.x9z-feature-icon .x9-icon { width: 25px; height: 25px; }
.x9z-feature-variants { color: #b8d588; } .x9z-feature-description { color: #9dc2ef; } .x9z-feature-seo { color: #8edbbd; } .x9z-feature-display { color: #c8b6ec; }
.x9z-feature-purchase { color: #eed18d; } .x9z-feature-codes { color: #accbd6; } .x9z-feature-specs { color: #93d7d7; } .x9z-feature-quantity { color: #b8d588; }
.x9z-feature-copy { flex: 1; min-width: 0; display: grid; gap: 4px; }
.x9z-feature-copy strong { font-size: 15px; font-weight: 500; color: var(--x9z-text); }
.x9z-feature-copy > span:not(.x9z-ai-note) { font-size: 14px; line-height: 1.55; color: #d2e3dc; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.x9z-feature .x9z-feature-arrow { width: 18px; height: 18px; color: #bcd5c9; flex: none; }
.x9z-template-save { display: flex; }

/* the readiness guide sweep on the field to fill */
.x9z-root .x9-field.x9-guide .x9-glass-input::after { content: ''; position: absolute; inset: 0; width: 28%; background: linear-gradient(90deg,transparent,#caffb524,transparent); animation: x9-sweep 3s ease-in-out infinite; pointer-events: none; }
.x9z-root .x9-field.x9-invalid .x9-glass-input::after { display: none; }
.x9-field-example:empty { display: none; }
.x9z-root .x9-field.x9-invalid .x9-glass-input, .x9z-child-card .x9-field.x9-invalid .x9-glass-input { background: rgba(198,72,70,.3); box-shadow: inset 0 0 18px #d45d5210; }
.x9z-root .x9-field-label, .x9z-child-card .x9-field-label { font-size: 12px; justify-content: flex-start; margin-bottom: 6px; line-height: 1.5; }
.x9z-root .x9-field.is-checkbox > .x9-field-label, .x9z-child-card .x9-field.is-checkbox > .x9-field-label { font-size: 14px; color: var(--x9z-text); }
.x9z-root .x9-field.is-checkbox, .x9z-child-card .x9-field.is-checkbox { margin: 0; min-height: 48px; }

/* ---------------------------------------------------------------- windows over the preparation (reference `.x9-window`) */
.xa-card.x9z-child-card.x9z-over { background-color: rgba(10,38,31,var(--x9z-window-alpha,.86)); background-image: none; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: none; }
.x9z-child-card.x9z-over[data-depth] { background-color: rgba(10,38,31,var(--x9z-window-alpha,.86)); }
.x9z-child-card .x9z-child header { padding: 0 2px 12px; gap: 10px; }
.x9z-child-card .x9z-child h2 { font-size: 21px; font-weight: 800; margin: 0; line-height: 1.4; }
.x9z-child-card .x9z-crumb { font-size: 12px; color: var(--x9z-muted); margin: 8px 0 14px; }
.x9z-child-card .x9z-product-line { opacity: .9; }
.x9z-child-card .x9z-product-line img { width: 32px; height: 36px; object-fit: cover; border-radius: 6px; }
.x9z-child-card .x9z-product-line span { font-size: 15px; font-weight: 650; text-align: right; }
.x9z-child-card .x9z-child-content p, .x9z-child-card label, .x9z-child-card h2, .x9z-child-card h3 { text-shadow: 0 1px 2px #00120b66; }
.x9z-child-card .x9z-child-content > p { margin: 8px 0 14px; }
.x9z-child-card .x9z-child-content h3 { font-size: 16px; margin: 20px 0 8px; }
.x9z-child-card .x9z-child > .xa-card-foot { padding: 8px 0 0; background: none; }
.x9z-child-card .x9z-subtle { margin: 3px 0 10px; }
.x9z-child-card .x9z-empty, .x9z-child-card p.x9z-empty { padding: 35px 0; text-align: center; color: var(--x9z-muted); margin: 0; }
.x9z-child-card .x9z-counter { text-align: right; direction: rtl; margin: -10px 0 10px; font-size: 12px; color: var(--x9z-muted); }
.x9z-child-card .x9z-char-count { margin: -10px 0 10px; }
.x9z-child-card .x9z-child-content > .x9z-link { display: flex; justify-content: flex-start; padding-inline: 0; }
.x9z-child-card .x9z-save-status { position: absolute; }
.x9z-busy { width: 28px; height: 28px; border: 2px solid #bbd1ad40; border-top-color: var(--x9z-lime); border-radius: 50%; animation: x9z-spin 800ms linear infinite; margin: 15px auto; }
@keyframes x9z-spin { to { transform: rotate(360deg); } }
.x9-wizard-card .x9z-row-value { display: inline-flex; gap: 8px; align-items: center; justify-content: flex-start; min-height: 44px; width: 100%; padding: 3px 0; text-align: right; background: none; border: 0; color: var(--x9z-text); font-size: 15px; font-weight: 650; overflow-wrap: anywhere; cursor: pointer; }
.x9z-row-value > span { min-width: 0; }
.x9z-row-value strong { font-weight: 650; }
.x9z-row-value .x9-icon { width: 17px; height: 17px; opacity: .8; margin-right: 2px; flex: none; }
.x9z-row-value[aria-pressed="true"] { color: var(--x9z-lime); }
.x9-wizard-card .x9z-catalog-refresh { display: inline-flex; }
.x9-wizard-card .x9z-inline-primary { display: inline-flex; width: auto; align-items: center; justify-content: center; border: 0; border-radius: 14px; padding: 10px 18px; min-height: 48px; font-size: 15px; font-weight: 800; background: linear-gradient(115deg,#cefa58,#b8f22f); color: #152613; }
.x9z-size-context, .x9z-size-conversion { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.x9z-size-conversion { font-size: 12px; line-height: 1.7; color: var(--x9z-muted); margin: 4px 0 8px !important; }
.x9z-size-conversion .x9z-link { font-size: 12px; min-height: 32px; color: var(--x9z-cyan); }
.x9z-combo-count strong { font-weight: 800; }
.x9z-variant { padding: 16px 0; border-top: 1px solid #88a49435; border-bottom: 0; }
.x9z-variant h3 { margin: 0 0 8px !important; }
.x9z-variant-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 9px; }
.x9z-variant-grid.is-two { grid-template-columns: 1fr 1fr; }
.x9z-variant-grid .x9-field { margin: 0 0 7px; }
.x9z-variant-grid .x9-field-label { font-size: 12px; }
.x9z-variant-grid input:disabled { opacity: .5; }
.x9z-child-card[data-window="variants2"] .xa-card-foot .xa-btn.ghost { flex: none; }
.x9z-google { padding: 12px 0; text-align: right; }
.x9z-google small { color: #c1dbc5; font-size: 12px; }
.x9z-google strong { display: block; color: #8fcaff; font-size: 18px; }
.x9z-google p { font-size: 14px; color: var(--x9z-muted); }
.x9z-seo-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.x9z-seo-generating { margin: 8px 0 !important; color: var(--x9z-text); }
.x9z-child-card[data-window="seo"] .x9z-link { display: inline-flex; }
.x9z-child-card[data-window="viewer"] .xa-card-foot { justify-content: center; flex-wrap: wrap; gap: 0; padding: 5px 0 0; min-height: 49px; }
.x9z-child-card[data-window="viewer"] .xa-card-foot .x9z-link { font-size: 12px; padding: 4px 7px; flex: none; }
.x9z-child-card[data-window="viewer"] .xa-card-foot .x9z-link .x9-icon { width: 16px; height: 16px; }
.x9z-child-card[data-window="viewer"].x9z-over { padding: 0; }
.x9z-image-grid button { border-radius: 12px; border: 2px solid transparent; background: #54726333; }
.x9z-image-grid button[aria-pressed=true] { border-color: var(--x9z-lime); }
.x9z-image-grid img { background: #eee; }
.x9z-image-number { width: 23px; height: 23px; display: grid; place-items: center; background: #143625ce; border-radius: 50%; }
.x9z-image-number .x9-icon { width: 14px; height: 14px; color: var(--x9z-lime); }
.x9z-main { bottom: 3px; left: 3px; right: 3px; padding: 1px 4px; color: #e7f5db; background: #163b2be8; border-radius: 7px; }
.x9z-image-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; justify-content: flex-start; }
.x9z-image-actions .x9z-link .x9-icon { width: 18px; height: 18px; }
.x9z-child-card .x9z-child-content > .x9z-link[data-wiz="image-add"] { display: flex; }

/* ---------------------------------------------------------------- toasts */
.x9z-toast { position: fixed; bottom: calc(90px + env(safe-area-inset-bottom)); left: 16px; right: 16px; margin: auto; max-width: 398px; padding: 5px 12px; display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px;
    background: #315743f2; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-radius: 14px; z-index: 100400; font: 500 14px/1.65 var(--x9-font); color: var(--x9z-text); box-shadow: 0 6px 25px #00160d88; text-shadow: 0 1px 2px #00181080; direction: rtl; pointer-events: auto; }
.x9z-toast[hidden] { display: none; }
.x9z-toast .x9-icon { color: var(--x9z-lime); width: 17px; height: 17px; flex: none; }
.x9z-toast button { color: var(--x9z-cyan); padding: 0 5px; min-height: 44px; min-width: 44px; background: none; border: 0; font: inherit; cursor: pointer; }
.x9z-work-save-toast { position: fixed; z-index: 85; bottom: calc(98px + env(safe-area-inset-bottom)); left: 18px; right: 18px; max-width: 394px; margin: auto; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 12px;
    border-radius: 15px; background: #294d40f5; box-shadow: 0 5px 24px #00140a55; color: #e6f2df; font: 14px/1.7 var(--x9-font); text-align: center; pointer-events: none; }
.x9z-work-save-toast[hidden] { display: none; }
.x9z-work-save-toast .x9-icon { width: 19px; height: 19px; flex: none; color: #c6f532; }
.x9w-card.x9z-saved-card { animation: x9z-work-saved 1500ms ease-out; }
@keyframes x9z-work-saved { 20%, 45% { box-shadow: inset 0 0 24px #c6f5323a, 0 0 20px #c6f53255; border-color: #c6f532b0; } 100% { box-shadow: inset 0 1px 2px #afc4bb59; } }

/* ---------------------------------------------------------------- sending and the result */
.x9z-send-center { text-align: center; }
.x9z-send-ready { display: flex; align-items: center; justify-content: center; gap: 2px; color: var(--x9z-lime); }
.x9z-send-ready .x9-icon { width: 21px; height: 21px; color: inherit; }
.x9z-failure-mark .x9-icon { width: 40px; height: 40px; color: var(--x9z-red); }
.x9z-child-card[data-window="send"] .xa-card-foot .xa-btn.ghost { flex: none; }
.x9z-outcome .x9z-child > .xa-card-foot { justify-content: center; gap: 20px; background: #14382c; }
.x9z-outcome .x9z-child > .xa-card-foot .xa-btn.ghost { flex: none; }
.x9z-outcome .x9z-child > .xa-card-foot .x9z-later { color: var(--x9z-muted); font-weight: 400; padding: 6px 12px; }
.x9z-next-steps { margin: 12px 0; padding: 12px !important; border: 0; border-radius: 18px; background: #24483d !important; }
.x9z-next-steps h3 { margin: 0 0 6px; font-size: 14px; color: var(--x9z-muted); }
.x9-wizard-card .x9z-next-action { gap: 10px; min-height: 68px; padding: 8px 0; text-align: right; color: var(--x9z-text); }
.x9z-next-action > .x9-icon { width: 23px; height: 23px; flex: none; color: var(--x9z-cyan); }
.x9z-next-action > span:not(.x9z-pill) { flex: 1; min-width: 0; }
.x9z-next-action strong { display: block; font-size: 15px; }
.x9z-next-action small { display: block; font-size: 12px; line-height: 1.65; color: var(--x9z-muted); }
.x9z-next-action .x9z-pill { font-size: 12px; flex: none; padding: 2px 6px; }
.x9z-next-action > .x9-icon:last-child { width: 18px; height: 18px; color: var(--x9z-muted); }

@media (max-height: 700px) { .x9z-child-card .x9z-child header { padding-top: 0; } .x9z-child-card .x9z-product-line img { height: 30px; } }
@media (prefers-reduced-motion: reduce) { .x9z-save-flash, .x9w-card.x9z-saved-card, .x9z-busy, .x9z-root .x9-field.x9-guide .x9-glass-input::after { animation: none; } .x9w-card.x9z-saved-card { outline: 2px solid #c6f53288; outline-offset: -2px; } }
.x9-wizard-card .xa-card-foot a.xa-btn, .x9-wizard-card .xa-card-foot a.x9z-link { text-decoration: none; }
/* compact head with no save status beside it (e.g. «يدويًا» before the first save): the percent sits at the far left like the reference .x9-mini */
.x9z-root.has-autosave .x9z-head:has(+ .x9z-save-status[hidden]) .x9z-mini { padding-left: 0; }
/* «يدويًا» (reference .x9-hero:has(.x9-manual-empty)): the name box writes at the hero title size 22 px, «أضف صور» 18 px, browser-grey placeholder */
.x9z-root[data-stage="1"] .x9z-hero:has(.x9z-manual-empty) .x9z-name-line h1 { font-size: 22px !important; }
.x9z-hero:has(.x9z-manual-empty) .x9z-name-input::placeholder { color: #757575; }
.x9-wizard-card .x9z-manual-empty { color: #c6dfc8; }
.x9-wizard-card .x9z-manual-empty strong { font-size: 18px; }
/* the compact head's photo icon has the text colour (reference .x9-mini svg) */
.x9z-root .x9z-mini > .x9-icon { color: var(--x9z-text); }
.x9-wizard-card .x9z-manual-empty button { padding: 8px 14px; border-radius: 12px; background: rgba(69, 103, 86, .314); color: #c6dfc8; }

/* ===== Fields page — owner reference 2026-10-10 (compact: whole page fits one phone screen) ===== */
.x9z-root .x9z-field-sections{display:grid;gap:10px}
.x9z-root .x9z-field-sections section[data-section="basic"]{display:grid;gap:10px;background:none;border:0;padding:0}
/* price: flat, not boxed */
.x9z-root .x9z-price-block{display:grid;gap:8px;background:none;border:0;padding:0;box-shadow:none}
.x9z-root .x9z-price-source{font-size:14px;color:color-mix(in srgb,var(--x9-ink) 75%,transparent);text-align:start;margin:0}
.x9z-root .x9z-price-block > .x9z-link[data-edit="discount"]{display:flex;align-items:center;gap:10px;width:100%;min-height:50px !important;padding:0 14px;border-radius:14px;
  border:1px solid var(--x9-surface-line);background:var(--x9-surface);color:var(--x9-ink);font-size:16px;font-weight:500;justify-content:flex-start;text-decoration:none}
.x9z-root .x9z-disc-icon .x9-icon{width:26px;height:26px}
.x9z-root .x9z-readiness-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;padding:0 30px;margin:2px 0}
.x9z-root .x9z-readiness-actions .x9z-quiet{min-height:44px !important;border-radius:12px;font-size:16px;font-weight:600;border:1px solid}
.x9z-root .x9z-readiness-actions .x9z-danger{color:var(--x9-danger);border-color:color-mix(in srgb,var(--x9-danger) 45%,transparent);background:var(--x9-danger-fill)}
.x9z-root .x9z-readiness-actions .x9z-warn{color:var(--x9-warn);border-color:color-mix(in srgb,var(--x9-warn) 40%,transparent);background:var(--x9-warn-fill)}
/* bordered cards: shipping, quantity, each organization row, extra */
.x9z-root .x9z-field-sections section[data-row="shipping"],.x9z-root .x9z-field-sections section[data-row="qty"],
.x9z-root .x9z-field-sections [data-organization] > .x9z-feature,.x9z-root .x9z-field-sections section[data-section="extra"]{
  border-radius:14px}
.x9z-root .x9z-field-sections section[data-row="shipping"]{display:grid;gap:8px;padding:10px 12px}
.x9z-root .x9z-field-sections section[data-row="qty"]{display:grid;gap:4px;padding:6px 12px}
.x9z-root .x9z-field-sections section[data-section="organization"],.x9z-root .x9z-field-sections [data-organization]{display:grid;gap:10px;background:none;border:0;padding:0;box-shadow:none}
.x9z-root .x9z-field-sections section[data-section="extra"]{padding:10px 12px}
.x9z-root .x9z-field-sections [data-extra]{display:grid;gap:0}
/* section heads: plain icon + title */
.x9z-root .x9z-field-sections .x9z-sec-head{display:flex;align-items:center;gap:10px;min-height:0 !important;height:auto !important;padding:0 !important;margin:0 0 4px !important;font-size:17px;font-weight:700;color:var(--x9-ink);line-height:1.3}
.x9z-root .x9z-sec-icon{width:30px;height:30px;display:grid;place-items:center;background:none;border:0}
.x9z-root .x9z-sec-icon .x9-icon{width:30px;height:30px}
/* shipping: inner panel holding the toggle + weight */
.x9z-root section[data-row="shipping"] > .x9-field.is-checkbox{margin:0}
.x9z-root section[data-row="shipping"] [data-weight-group]{display:grid;gap:10px}
.x9z-root section[data-row="shipping"] .x9z-chipline{display:flex;gap:10px;justify-content:flex-start}
.x9z-root section[data-row="shipping"] .x9z-option{min-height:44px !important;min-width:74px;border-radius:12px;font-size:16px}
.x9z-root .x9z-field-sections .x9-field.is-checkbox{min-height:46px;display:flex;align-items:center;justify-content:space-between;padding:0;margin:0}
.x9z-root .x9z-field-sections .x9-field.is-checkbox .x9-field-label{font-size:16px;color:var(--x9-ink)}
.x9z-root .x9z-field-sections .x9-field-label{font-size:15px}
.x9z-root .x9z-field-sections .x9-glass-input input{font-size:16px}
/* feature rows */
.x9z-root .x9z-field-sections .x9z-feature{display:flex;align-items:center;gap:12px;width:100%;min-height:68px !important;padding:8px 12px;margin:0;text-align:start;background:none;border:0;border-bottom:1px solid var(--x9-surface-line);border-radius:0}
.x9z-root .x9z-field-sections [data-organization] > .x9z-feature{min-height:70px !important;padding:8px 14px}
.x9z-root .x9z-field-sections [data-extra] > .x9z-feature:last-of-type{border-bottom:0}
.x9z-root .x9z-field-sections [data-extra] > .x9z-feature:first-of-type{background:rgba(255,255,255,.035);border-radius:10px}
.x9z-root .x9z-feature-icon{flex:0 0 34px;width:34px;height:34px;display:grid;place-items:center;background:none;border:0}
.x9z-root .x9z-feature-icon .x9-icon{width:32px;height:32px}
.x9z-root .x9z-feature-copy{flex:1;display:grid;gap:2px;min-width:0}
.x9z-root .x9z-feature-copy strong{font-size:17px;font-weight:700;color:var(--x9-ink)}
.x9z-root .x9z-feature-copy > span{font-size:14px;color:color-mix(in srgb,var(--x9-ink) 65%,transparent);overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.x9z-root [data-extra] .x9z-feature{min-height:62px !important}
.x9z-root [data-extra] .x9z-feature-copy{grid-template-columns:auto 1fr;align-items:center;column-gap:18px}
.x9z-root [data-extra] .x9z-feature-copy > span{text-align:start}
.x9z-root .x9z-feature-arrow{width:22px;height:22px;color:var(--x9-line-cyan);opacity:.9}
.x9z-root .x9z-template-save{justify-self:center;font-size:15px;margin-top:6px}
/* grandchild windows opened from the fields: same organized cards */
.x9n-window .x9n-body > section,.x9n-window .x9n-body > div > section,.x9z-variant{
  background:var(--x9-surface);border:1px solid var(--x9-surface-line);border-radius:14px;padding:12px;display:grid;gap:8px;margin-bottom:10px}
.x9n-window .x9n-body h3{display:flex;align-items:center;gap:8px;margin:0 0 2px;font-size:16px;font-weight:700}
.x9n-window .x9n-body .x9z-row-value{min-height:54px;padding:8px 14px;border-radius:12px;background:var(--x9-surface);border:1px solid var(--x9-surface-line);font-size:16px}
.x9n-window .x9n-body .x9z-row-value[aria-pressed="true"]{border-color:var(--x9-lime);background:color-mix(in srgb,var(--x9-lime) 10%,transparent)}
.x9n-window .x9n-body .x9z-option{min-height:42px;border-radius:12px;font-size:15px}
.x9z-root .x9z-field-sections section[data-section="extra"]{min-height:0 !important;height:auto !important}
.x9z-root [data-extra] .x9z-feature-copy strong{font-size:16px;white-space:nowrap}
.x9z-root [data-extra] .x9z-feature-copy > span{font-size:13.5px}
/* compact pass */
.x9z-root .x9z-field-sections .x9-field{display:grid;gap:6px;margin:0 !important;padding:0 !important;min-height:0 !important}
.x9z-root .x9z-field-sections .x9-field.is-checkbox{display:flex;min-height:44px !important}
.x9z-root .x9z-field-sections .x9-field .x9-glass-input{min-height:52px !important}
.x9z-root .x9z-field-sections .x9-field.is-checkbox .x9-glass-input{min-height:0 !important;background:none;border:0;box-shadow:none;padding:0;width:auto}
.x9z-root section[data-row="shipping"] [data-weight-group]{gap:10px;margin:0;padding:0}
.x9z-root section[data-row="shipping"] .x9z-chipline{flex-wrap:nowrap;gap:8px;margin:0}
.x9z-root section[data-row="shipping"] .x9z-option{flex:1 1 0;min-width:0 !important;min-height:42px !important;padding:0 6px;font-size:15px}
.x9z-root .x9z-readiness-actions{gap:16px;padding:0 36px}
.x9z-root .x9z-readiness-actions .x9z-quiet{min-height:40px !important;font-size:15px}
.x9z-root .x9z-price-block > .x9z-link[data-edit="discount"]{min-height:46px !important}
.x9z-root .x9z-field-sections section[data-row="qty"] .x9-field.is-checkbox{min-height:42px !important}
.x9z-root .x9z-field-sections .x9-field .x9-glass-input{min-height:46px !important;height:46px}
.x9z-root .x9z-field-sections .x9-field.is-checkbox .x9-glass-input{height:auto}
.x9z-root .x9z-field-sections .x9-field.is-checkbox{min-height:38px !important}
.x9z-root .x9z-field-sections section[data-row="qty"]{gap:0}
.x9z-root .x9z-field-sections section[data-row="qty"] .x9-field.is-checkbox{min-height:36px !important}
.x9z-root .x9z-field-sections section[data-row="qty"] [data-quantity-area]{margin-bottom:6px}

/* ===== Grandchild windows (opened from the fields) — owner 2026-10-10: same spirit, strict order =====
   the window: the central strong surface + the page-line frame breathing (orbit stays on the cards inside the pages);
   content starts at the top: product line → title → grouped rows, each group/row a surface card. */
html.x9ui .xa-card.x9z-child-card, html.x9ui .xa-card.x9z-child-card.x9z-over, html.x9ui .x9z-child-card.x9z-over[data-depth] {
  border:1.5px solid transparent !important;
  background:linear-gradient(var(--x9-surface-strong),var(--x9-surface-strong)) padding-box, linear-gradient(#121212,#121212) padding-box,
    linear-gradient(135deg,var(--x9-line-cyan),var(--x9-line-green) 55%,var(--x9-line-cyan)) border-box !important;
  -webkit-backdrop-filter:var(--x9-surface-blur);backdrop-filter:var(--x9-surface-blur);animation:x9-card-breathe 5s ease-in-out infinite}
.x9z-child-card[data-window]:not([data-window="viewer"]) .xa-card-body{justify-content:flex-start;padding-top:64px}
.x9z-child-card .x9z-child header{gap:8px;padding:0 2px 14px;border-bottom:1px solid var(--x9-surface-line);margin-bottom:14px}
.x9z-child-card .x9z-product-line{display:flex;align-items:center;gap:10px}
.x9z-child-card .x9z-child h2{font-size:20px;color:var(--x9-ink)}
.x9z-child-card .x9z-crumb{margin:0 0 4px;font-size:13px}
.x9z-child-card .x9z-child-content{display:flex;flex-direction:column;gap:10px}
.x9z-child-card .x9z-child-content h3{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:700;margin:8px 0 0;color:var(--x9-ink)}
/* rows: summary / pick rows and toggles are surface cards */
.x9z-child-card .x9z-row-value{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:60px;padding:10px 14px;margin:0;
  border-radius:14px;background:var(--x9-surface);border:1px solid var(--x9-surface-line);color:var(--x9-ink);font-size:16px;text-align:start;line-height:1.5}
.x9z-child-card .x9z-row-value strong{font-size:16px}
.x9z-child-card .x9z-row-value > span{flex:1;min-width:0}
.x9z-child-card .x9z-row-value .x9-icon{width:20px;height:20px;color:var(--x9-line-cyan);flex:none}
.x9z-child-card .x9z-row-value[aria-pressed="true"]{border-color:var(--x9-lime);background:color-mix(in srgb,var(--x9-lime) 10%,transparent)}
.x9z-child-card .x9z-child-content > .x9-field.is-checkbox{min-height:56px;padding:0 14px;border-radius:14px;background:var(--x9-surface);border:1px solid var(--x9-surface-line);
  display:flex;align-items:center;justify-content:space-between}
.x9z-child-card .x9z-child-content > .x9-field.is-checkbox .x9-glass-input{background:none;border:0;box-shadow:none;padding:0;min-height:0;width:auto}
.x9z-child-card .x9z-child-content > .x9-field.is-checkbox > .x9-field-label{font-size:15px;margin:0}
.x9z-child-card .x9z-child-content > .x9-field:not(.is-checkbox) > .x9-field-label{font-size:14px}
.x9z-child-card .x9z-child-content .x9z-option{min-height:42px;border-radius:12px;font-size:15px}
.x9z-child-card .x9z-child-content > .x9z-link{align-self:flex-start;font-size:15px;color:var(--x9-lime)}
.x9z-child-card .x9z-variant{background:var(--x9-surface);border:1px solid var(--x9-surface-line);border-radius:14px;padding:12px;display:grid;gap:8px}
@media (prefers-reduced-motion: reduce){ html.x9ui .xa-card.x9z-child-card{animation:none} }
/* content-sized grandchild: the body keeps its scroll inside the max height */
.x9z-child-card:not([data-window="viewer"]) .xa-card-body{max-height:inherit;min-height:0}
.x9z-child-card:not([data-window="viewer"]) .x9z-child-content{overflow:auto;min-height:0;flex:0 1 auto}

/* owner 2026-10-10: the wizard's small product line is the central product card (X9.ui.productCard, size mini) */
.x9z-mini:has(.x9-pc) { height: auto; }
.x9z-product-line:has(.x9-pc) { height: auto; display: block; }
.x9z-root.is-scrolled .x9z-mini:has(.x9-pc) { display: block; }
html.x9ui .x9z-pc.x9-pc--mini { min-height: 54px; cursor: default; border-radius: 16px; }
html.x9ui .x9z-pc .x9-pc-photo { flex-basis: 22%; max-width: 64px; }
html.x9ui .x9z-pc .x9-pc-name { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.x9ui .x9z-pc .x9z-pc-pct { font-size: 12px; color: var(--x9z-lime, #b6fb32); }
html.x9ui .x9z-pc .x9-pc-info { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 6px 12px; }
