/* بوث اللمس — أهداف لمس كبيرة (≥ 64px)، بدون تمرير أفقي، يعمل أفقياً وعمودياً */
html, body { height: 100%; overflow: hidden; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
body { font-size: clamp(15px, 1.05vw + 6px, 20px); }
svg { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 14px; padding: .6em 1.1em; font-weight: 600; cursor: pointer; transition: transform .12s, background .15s, border-color .15s, opacity .2s; }
.btn:active { transform: scale(.96); }
.btn.primary { background: var(--ink); color: #fff; border-color: transparent; }
.btn.green { background: var(--green-d); color: #fff; border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.big { min-height: 64px; padding: 0 1.6em; font-size: 1.1em; border-radius: 16px; }
.btn:disabled { opacity: .38; pointer-events: none; }

/* ───────── شاشة البداية ───────── */
.welcome { position: fixed; inset: 0; background: radial-gradient(120vmax 80vmax at 85% -10%, #1d5c94 0%, #12365B 45%, #0c2540 100%); color: #fff; overflow: hidden; cursor: pointer; }
.w-bands { position: absolute; inset: auto -10% -6% -10%; height: 46%; pointer-events: none; }
.w-bands span { position: absolute; inset: 0; border-radius: 50% 50% 0 0 / 100% 100% 0 0; transform-origin: 50% 100%; }
.w-bands span:nth-child(1) { background: linear-gradient(90deg, #39B54A, #006838); transform: rotate(-4deg) translateY(28%); opacity: .95; }
.w-bands span:nth-child(2) { background: linear-gradient(90deg, #1B75BC, #12365B); transform: rotate(3deg) translateY(48%); opacity: .9; }
.w-bands span:nth-child(3) { background: #0c2540; transform: rotate(-1deg) translateY(68%); }
.w-inner { position: relative; z-index: 1; height: 100%; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 4vw; padding: 6vh 6vw 14vh; }
.w-copy { display: grid; gap: 2.4vh; justify-items: start; max-width: 760px; }
.feed-lockup.on-dark .logo { height: clamp(48px, 6vh, 72px); }
.feed-lockup.on-dark .feed-ribbon { height: clamp(22px, 2.6vh, 30px); font-size: clamp(13px, 1.5vh, 17px); }
.w-badge { border: 1px solid rgba(255,255,255,.25); border-radius: 99px; padding: .3em 1em; font-size: .9em; color: #cfe3f3; margin-top: 2vh; }
.welcome h1 { font-size: clamp(34px, 3.4vw + 1vh, 66px); line-height: 1.22; font-weight: 800; }
.welcome p { margin: 0; font-size: 1.2em; color: #cfe3f3; max-width: 36em; }
.w-points { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6em; }
.w-points li { display: flex; align-items: center; gap: .45em; background: rgba(255,255,255,.08); border-radius: 12px; padding: .5em .9em; font-weight: 500; }
.w-points li svg { color: var(--green); stroke-width: 2.6; }
.cta { margin-top: 1.5vh; display: inline-flex; align-items: center; gap: .7em; border: 0; border-radius: 22px; padding: 0 1.4em 0 1.8em; min-height: 84px;
  font: 700 clamp(22px, 1.6vw + 6px, 32px) var(--display); color: #fff; background: var(--grad); box-shadow: 0 14px 40px -12px rgba(57,181,74,.7); cursor: pointer;
  animation: breathe 2.6s ease-in-out infinite; }
.cta svg { width: 1.1em; height: 1.1em; stroke-width: 2.6; }
@keyframes breathe { 50% { transform: scale(1.04); box-shadow: 0 18px 50px -10px rgba(57,181,74,.85); } }
.w-bags { position: relative; height: min(64vh, 46vw); }
.w-bags img { position: absolute; height: 74%; filter: drop-shadow(0 30px 30px rgba(0,0,0,.35)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { translate: 0 -2.2%; } }
.w-tap { position: absolute; inset: auto 0 3vh 0; text-align: center; z-index: 1; color: #9fc0dc; font-size: .95em; letter-spacing: .3px; }

/* ───────── الإطار ───────── */
.app { position: fixed; inset: 0; display: grid; grid-template-rows: auto 1fr auto; }
.top { display: flex; align-items: center; gap: 1.4em; padding: .8em 1.6em; background: var(--card); border-bottom: 1px solid var(--line); }
.feed-lockup.small .logo { height: 40px; }
.feed-lockup.small .feed-ribbon { height: 18px; font-size: 11px; }
.top-title { display: grid; line-height: 1.25; padding-inline-start: 1.2em; border-inline-start: 1px solid var(--line); }
.top-title b { font-family: var(--display); color: var(--ink); font-size: 1.05em; }
.top-title small { color: var(--muted); font-size: .8em; }
.steps { list-style: none; margin: 0 auto; padding: 0; display: flex; gap: .3em; align-items: center; }
.steps li { display: flex; align-items: center; gap: .5em; color: var(--faint); font-size: .85em; font-weight: 500; padding: .35em .7em; border-radius: 99px; }
.steps li i { width: 1.9em; height: 1.9em; border-radius: 50%; display: grid; place-items: center; font-style: normal; background: var(--sunk); font-weight: 700; color: var(--muted); }
.steps li.on { color: var(--ink); background: var(--sunk); }
.steps li.on i { background: var(--ink); color: #fff; }
.steps li.done i { background: var(--green); color: #fff; }
.steps li + li::before { content: ''; width: 1.2em; height: 2px; background: var(--line); margin-inline-end: .3em; }
.restart { color: var(--muted); }

.body { min-height: 0; display: grid; grid-template-columns: minmax(250px, 22%) 1fr; }
.app.is-result .body { grid-template-columns: 1fr; }
.app.is-result .summary { display: none; }
.summary { border-inline-end: 1px solid var(--line); background: var(--card); padding: 1.2em; overflow-y: auto; display: grid; align-content: start; gap: .6em; }
.summary h4 { font-size: .85em; color: var(--muted); font-weight: 600; margin-bottom: .2em; }
.sum-item { display: flex; align-items: center; gap: .7em; background: var(--sunk); border: 1px solid transparent; border-radius: 12px; padding: .6em .8em; text-align: start; width: 100%; cursor: pointer; }
.sum-item:active { border-color: var(--line2); }
.sum-item small { display: block; color: var(--muted); font-size: .75em; }
.sum-item b { display: block; color: var(--ink); font-weight: 600; font-size: .95em; }
.sum-item svg { margin-inline-start: auto; color: var(--faint); width: 1em; height: 1em; }
.sum-empty { color: var(--faint); font-size: .9em; border: 1px dashed var(--line2); border-radius: 12px; padding: 1em; text-align: center; }
.sum-req { margin-top: .6em; border-top: 1px solid var(--line); padding-top: .9em; display: grid; gap: .5em; }
.sum-req div { display: flex; justify-content: space-between; font-size: .9em; }
.sum-req b { color: var(--ink); }

.stage { min-height: 0; overflow-y: auto; padding: 2.2vh 2.4vw 3vh; scroll-behavior: smooth; }
.stage > * { animation: rise .32s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.q { font-size: clamp(24px, 1.5vw + 10px, 38px); color: var(--ink); margin-bottom: .2em; }
.q-hint { color: var(--muted); margin: 0 0 1.4em; }
.block { margin-top: 2.2vh; }
.block > h3 { font-size: 1.1em; color: var(--ink); margin-bottom: .7em; display: flex; align-items: center; gap: .5em; }
.block > h3 small { font: 400 .8em var(--font); color: var(--muted); }

.nav { display: flex; align-items: center; gap: 1em; padding: .9em 1.6em; background: var(--card); border-top: 1px solid var(--line); }
.nav .primary { margin-inline-start: auto; min-width: 220px; }
.nav-hint { color: var(--warn); font-weight: 500; }

/* ───────── البلاطات ───────── */
.tiles { display: grid; gap: 1.1em; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.tiles.lg { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.tile { position: relative; display: grid; gap: .4em; align-content: center; justify-items: center; text-align: center; min-height: 128px; padding: 1.1em;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 20px; cursor: pointer; transition: border-color .15s, box-shadow .2s, transform .12s; box-shadow: var(--shadow); }
.tile:active { transform: scale(.97); }
.tile b { font-family: var(--display); font-size: 1.25em; color: var(--ink); font-weight: 700; }
.tile small { color: var(--muted); font-size: .85em; }
.tile.on { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(18,54,91,.12), var(--shadow); }
.tile.on::after { content: ''; position: absolute; top: 12px; inset-inline-start: 12px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 18px no-repeat; }
.tile .art { width: 72%; max-width: 220px; aspect-ratio: 6 / 5; color: var(--ink); }
.tile .art img { width: 100%; height: 100%; object-fit: contain; }
.tile.species { min-height: min(52vh, 460px); background: linear-gradient(180deg, #fff 55%, #f1f6f9); }
.tile.species .art { color: var(--ink); }
.tile.species:nth-child(2) .art { color: var(--green-d); }
.tile.species:nth-child(3) .art { color: var(--blue); }
/* صور البروشور: صورة النوع خلفية كاملة، وقصاصة الفئة فوق اسمها */
.tile.photo { padding: 0; overflow: hidden; align-content: end; justify-items: stretch; background: #12365B var(--img) center 70% / cover no-repeat; border-color: transparent; }
.tile.photo::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12,37,64,0) 35%, rgba(12,37,64,.88) 100%); transition: opacity .2s; }
.tile.photo .ph-txt { position: relative; display: grid; gap: .1em; padding: 1.2em 1.4em 1.3em; text-align: start; }
.tile.photo b { color: #fff; font-size: 2em; }
.tile.photo small { color: #cfe3f3; font-size: .95em; }
.tile.photo.on { box-shadow: 0 0 0 4px var(--green), var(--shadow); }
.tiles.groups { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.tile.group.has-img { min-height: min(40vh, 360px); align-content: end; padding-top: .6em; background: linear-gradient(180deg, #f4efe6 0%, #fff 62%); }
.tile.group .cut { width: 100%; height: min(26vh, 240px); position: relative; }
.tile.group .cut img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 10px 8px rgba(18,54,91,.18)); transition: transform .25s; }
.tile.group.on .cut img { transform: scale(1.06); }
.res-cut { height: 76px; width: auto; filter: drop-shadow(0 6px 6px rgba(18,54,91,.18)); }
.tile .tag { position: absolute; top: 12px; inset-inline-end: 12px; font-size: .72em; background: var(--sunk); color: var(--muted); border-radius: 99px; padding: .15em .7em; }
.tile.state { min-height: 140px; }
.tiles:not(.lg) .tile { min-height: 150px; }
.chips { display: flex; flex-wrap: wrap; gap: .7em; }
.chip { min-height: 60px; min-width: 96px; padding: 0 1.3em; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink);
  font-weight: 600; font-size: 1.02em; cursor: pointer; transition: all .15s; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip:active { transform: scale(.96); }
.seg { display: inline-flex; background: var(--sunk); border-radius: 16px; padding: 5px; gap: 5px; }
.seg button { min-height: 58px; min-width: 130px; border: 0; border-radius: 12px; background: transparent; font-weight: 600; font-size: 1.05em; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.row { display: flex; flex-wrap: wrap; gap: 1.2em 2.4em; align-items: flex-end; }
.field { display: grid; gap: .5em; }
.field > span { color: var(--muted); font-weight: 500; font-size: .95em; }
.w-hint { display: flex; align-items: center; gap: .5em; max-width: 30em; background: #eef5fb; border: 1px solid #d6e6f4; color: var(--ink); border-radius: 12px; padding: .5em .8em; font-size: .9em; }
.w-hint svg { color: var(--blue); }
.w-hint.on { background: #eef7f0; border-color: #cfe8d5; }
.w-hint.on svg { color: var(--green-d); }
.w-hint .btn { margin-inline-start: auto; min-height: 44px; padding: 0 .9em; font-size: .92em; }

/* عدّاد بأزرار كبيرة + ضغط مطوّل */
.stepper { display: inline-flex; align-items: stretch; background: var(--card); border: 1.5px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.stepper button { width: 76px; min-height: 76px; border: 0; background: var(--sunk); color: var(--ink); font-size: 2em; font-weight: 500; cursor: pointer; }
.stepper button:active { background: var(--line); }
.stepper .val { min-width: 170px; background: var(--card); display: grid; place-items: center; line-height: 1.05; padding: .3em .8em; font-size: 1em; }
.stepper .val b { font-family: var(--display); font-size: 2.1em; color: var(--ink); }
.stepper .val b.ph { color: var(--faint); }
.stepper .val small { color: var(--muted); font-size: .8em; }
.stepper.sm button { width: 60px; min-height: 60px; font-size: 1.6em; }
.stepper.sm .val { min-width: 110px; }
.stepper.sm .val b { font-size: 1.5em; }

/* الأسعار وخلطة المربي */
.price-grid { display: grid; gap: .8em; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); }
.price-row { display: flex; align-items: center; gap: .9em; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: .6em .8em; }
.price-row .pic { width: 52px; height: 64px; flex: none; }
.price-row .nm { flex: 1; min-width: 0; }
.price-row .nm b { display: block; color: var(--ink); }
.price-row .nm small { color: var(--muted); }
.pic { display: grid; place-items: center; }
.pic { position: relative; }
.pic img { position: absolute; inset: 0; height: 100%; width: 100%; object-fit: contain; }
.bagph { width: 78%; height: 88%; border-radius: 6px 6px 8px 8px; background: var(--c); color: #fff; display: grid; place-items: center; font: 700 .9em var(--display);
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.2); text-align: center; padding: 2px; line-height: 1.1; position: relative; }
.bagph::before { content: ''; position: absolute; top: 6%; left: 18%; right: 18%; height: 3px; border-radius: 2px; background: rgba(255,255,255,.55); }
.mix-head { display: flex; flex-wrap: wrap; gap: 1.4em; align-items: center; justify-content: space-between; }
.mix-sum { display: flex; align-items: center; gap: .8em; font-weight: 600; }
.mix-sum .meter { width: 220px; height: 12px; border-radius: 8px; background: var(--sunk); overflow: hidden; }
.mix-sum .meter span { display: block; height: 100%; background: var(--green); transition: width .3s; }
.mix-sum.bad .meter span { background: var(--warn); }
.mix-sum.over .meter span { background: var(--danger); }
.mix-sum b.num { font-family: var(--display); font-size: 1.3em; color: var(--ink); }
.mix-list { display: grid; gap: .7em; margin-top: 1em; }
.mix-item { display: flex; align-items: center; gap: 1em; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: .55em .8em; }
.mix-item .pic { width: 46px; height: 56px; }
.mix-item .nm { flex: 1; font-weight: 600; color: var(--ink); }
.mix-item .kg { color: var(--muted); font-size: .9em; min-width: 6em; text-align: center; }
.mix-item .rm { width: 56px; height: 56px; border-radius: 14px; border: 0; background: #fbeceb; color: var(--danger); font-size: 1.6em; cursor: pointer; }
.pick-grid { display: grid; gap: .7em; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); }
.pick { display: flex; align-items: center; gap: .6em; min-height: 70px; padding: .4em .7em; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); cursor: pointer; text-align: start; font-weight: 600; color: var(--ink); }
.pick .pic { width: 40px; height: 50px; }
.pick.on { border-color: var(--green-d); background: #f1f8f2; }
.pick:disabled { opacity: .4; }
.cat-title { font-size: .9em; color: var(--muted); font-weight: 600; margin: 1.1em 0 .5em; }

/* ───────── النتيجة ───────── */
.result { display: grid; grid-template-columns: 1fr minmax(320px, 30%); gap: 1.6em; align-items: start; }
.res-main { display: grid; gap: 1.5em; min-width: 0; }
.res-head { display: flex; flex-wrap: wrap; align-items: center; gap: .8em 1.2em; }
.res-head h2 { font-size: clamp(24px, 1.4vw + 10px, 36px); color: var(--ink); }
.res-chips { display: flex; flex-wrap: wrap; gap: .5em; }
.res-chips span { background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: .25em .9em; font-size: .88em; color: var(--muted); }
.res-chips b { color: var(--ink); font-weight: 600; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 1.2em 1.3em; box-shadow: var(--shadow); }
.card > h3 { font-size: 1.08em; color: var(--ink); margin-bottom: .9em; display: flex; align-items: center; gap: .55em; }
.card > h3::before { content: ''; width: 18px; height: 6px; border-radius: 4px; background: var(--grad); }
.card > h3 small { font: 400 .78em var(--font); color: var(--muted); }
.reqs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .9em; }
.req { border-radius: 16px; background: var(--sunk); padding: .9em 1.1em; position: relative; overflow: hidden; }
.req::before { content: ''; position: absolute; inset: 0 0 0 auto; width: 5px; background: var(--c); }
.req small { color: var(--muted); display: block; }
.req b { font-family: var(--display); font-size: 1.9em; color: var(--ink); line-height: 1.2; }
.req i { font-style: normal; color: var(--faint); font-size: .8em; display: block; }
.prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 1em; }
.prod { border: 1px solid var(--line); border-radius: 18px; padding: .9em; display: grid; justify-items: center; text-align: center; gap: .2em; position: relative; background: linear-gradient(180deg, #fff, #f7faf8); }
.prod .pic { width: 100%; height: 150px; }
.prod .bagph { width: 46%; }
.prod .nm { font-family: var(--display); font-weight: 700; color: var(--ink); font-size: 1.08em; }
.prod .kg { font-family: var(--display); font-size: 2em; font-weight: 800; color: var(--green-d); line-height: 1.1; }
.prod .kg small { font: 500 .42em var(--font); color: var(--muted); display: block; }
.prod .meta { display: flex; gap: .4em; flex-wrap: wrap; justify-content: center; margin-top: .3em; }
.prod .meta span { font-size: .78em; background: var(--sunk); color: var(--muted); border-radius: 99px; padding: .15em .7em; }
.prod .brand { position: absolute; top: 10px; inset-inline-start: 10px; font-size: .7em; background: var(--green-d); color: #fff; border-radius: 6px; padding: .1em .55em; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .9em; }
.kpi { background: var(--sunk); border-radius: 16px; padding: .9em 1.1em; }
.kpi small { color: var(--muted); display: block; font-size: .85em; }
.kpi b { font-family: var(--display); font-size: 1.75em; color: var(--ink); }
.kpi i { font-style: normal; color: var(--faint); font-size: .8em; margin-inline-start: .3em; }
.kpi.hero { background: var(--grad-blue); }
.kpi.hero small, .kpi.hero i { color: #cfe3f3; } .kpi.hero b { color: #fff; }
.cov { display: grid; gap: .8em; }
.cov-row { display: grid; grid-template-columns: 6.5em 1fr; gap: .4em 1em; align-items: center; }
.cov-row > b { color: var(--ink); }
.cov-bars { display: grid; gap: .35em; }
.cov-bar { display: grid; grid-template-columns: 1fr 4.5em 6.5em; align-items: center; gap: .7em; font-size: .9em; }
.cov-bar .track { height: 14px; border-radius: 8px; background: var(--sunk); position: relative; overflow: hidden; }
.cov-bar .track span { position: absolute; inset: 0 0 0 auto; border-radius: 8px; background: var(--green); width: 0; transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.cov-bar .track i { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ink); opacity: .45; }
.cov-bar.low .track span { background: var(--warn); } .cov-bar.high .track span { background: var(--blue); }
.cov-bar .pct { font-weight: 700; color: var(--ink); }
.cov-bar.low .pct { color: var(--warn); } .cov-bar.high .pct { color: var(--blue); }
.cov-bar .who { color: var(--muted); font-size: .85em; }
.advice { list-style: none; margin: 0; padding: 0; display: grid; gap: .6em; }
.advice li { border-inline-start: 5px solid var(--green); background: #f3f9f4; border-radius: 10px; padding: .7em 1em; }
.advice li.low, .advice li.warn { border-color: var(--warn); background: #fdf6ec; }
.advice li.high, .advice li.info { border-color: var(--blue); background: #eff6fc; }
.advice li.saving { border-color: var(--green-d); background: #e6f4ea; color: var(--green-d); font-weight: 700; }
.cmp-tbl { width: 100%; border-collapse: collapse; }
.cmp-tbl th, .cmp-tbl td { text-align: start; padding: .55em .5em; border-bottom: 1px solid var(--line); }
.cmp-tbl thead th { color: var(--muted); font-weight: 600; font-size: .85em; }
.cmp-tbl td.low { color: var(--warn); font-weight: 600; } .cmp-tbl td.high { color: var(--blue); font-weight: 600; }

.get { position: sticky; top: 0; display: grid; gap: 1em; }
.get-card { background: var(--ink); color: #fff; border-radius: 22px; padding: 1.3em; display: grid; gap: .9em; position: relative; overflow: hidden; }
.get-card::after { content: ''; position: absolute; inset: auto -30% -40% -30%; height: 60%; background: radial-gradient(closest-side, rgba(57,181,74,.35), transparent); pointer-events: none; }
.get-card > * { position: relative; z-index: 1; }
.get-card h3 { font-size: 1.3em; }
.get-card p { margin: 0; color: #cfe3f3; font-size: .92em; }
.get-tabs { display: grid; grid-template-columns: 1fr 1fr; background: rgba(255,255,255,.08); border-radius: 14px; padding: 4px; gap: 4px; }
.get-tabs button { min-height: 56px; border: 0; border-radius: 11px; background: transparent; color: #cfe3f3; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: .45em; cursor: pointer; }
.get-tabs button.on { background: #fff; color: var(--ink); }
.qr { background: #fff; border-radius: 18px; padding: 14px; display: grid; place-items: center; aspect-ratio: 1; width: min(100%, 300px); justify-self: center; }
.qr svg { width: 100%; height: 100%; stroke-width: 1; stroke-linecap: butt; stroke-linejoin: miter; }
.qr .spin { width: 46px; height: 46px; border: 4px solid var(--sunk); border-top-color: var(--green); border-radius: 50%; animation: rot 1s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.qr-hint { text-align: center; color: #cfe3f3; font-size: .9em; }
.phone-btn { min-height: 70px; border-radius: 16px; border: 2px solid rgba(255,255,255,.25); background: rgba(255,255,255,.06); color: #fff; font: 700 1.5em var(--display); letter-spacing: 1px; cursor: pointer; direction: ltr; }
.phone-btn.empty { font: 500 1em var(--font); color: #9fc0dc; letter-spacing: 0; direction: rtl; }
.wa-btn { min-height: 64px; border-radius: 16px; border: 0; background: #25D366; color: #073b1c; font-weight: 700; font-size: 1.1em; display: flex; align-items: center; justify-content: center; gap: .5em; cursor: pointer; }
.wa-btn:disabled { opacity: .45; }
.wa-state { text-align: center; font-weight: 600; min-height: 1.4em; }
.wa-state.ok { color: #7fe39a; } .wa-state.err { color: #ffb4a8; }
.reg-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 1.1em 1.2em; display: grid; gap: .7em; box-shadow: var(--shadow); }
.reg-card h3 { font-size: 1.05em; color: var(--ink); }
.reg-card p { margin: 0; color: var(--muted); font-size: .85em; }
.in-btn { min-height: 60px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--sunk); text-align: start; padding: 0 1em; font-size: 1.02em; color: var(--ink); cursor: pointer; font-weight: 600; }
.in-btn.empty { color: var(--faint); font-weight: 400; }
.consent { display: flex; align-items: center; gap: .7em; color: var(--muted); font-size: .9em; cursor: pointer; min-height: 48px; }
.consent i { width: 30px; height: 30px; border-radius: 8px; border: 2px solid var(--line2); display: grid; place-items: center; flex: none; }
.consent.on i { background: var(--green-d); border-color: var(--green-d); }
.consent.on i::after { content: ''; width: 12px; height: 7px; border: 3px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -2px); }
.reg-wa { text-align: center; font-weight: 600; min-height: 1.3em; color: var(--muted); }
.reg-wa.sent { color: var(--green-d); } .reg-wa.fail { color: var(--danger); }
.reg-saved { color: var(--green-d); font-weight: 600; text-align: center; }

/* ───────── لوحة الأرقام والحروف ───────── */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(9, 28, 48, .55); display: grid; place-items: center; padding: 3vh 3vw; animation: fade .18s both; backdrop-filter: blur(3px); }
@keyframes fade { from { opacity: 0; } }
.sheet { background: var(--card); border-radius: 26px; padding: 1.3em; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); animation: rise .25s cubic-bezier(.2, .8, .2, 1) both; }
.pad { width: min(560px, 96vw); display: grid; gap: .9em; }
.pad.text { width: min(1100px, 98vw); }
.pad-head { display: flex; align-items: center; justify-content: space-between; color: var(--ink); font-size: 1.05em; }
.x { width: 54px; height: 54px; border-radius: 14px; border: 0; background: var(--sunk); font-size: 1.8em; color: var(--muted); cursor: pointer; }
.pad-display { min-height: 84px; border-radius: 16px; background: var(--sunk); display: flex; align-items: center; justify-content: center; gap: .4em; padding: 0 1em; }
.pad-display span { font: 700 2.4em var(--display); color: var(--ink); min-width: 1ch; }
.pad.text .pad-display span { direction: rtl; font-size: 1.9em; }
.pad-display span:empty::before { content: '—'; color: var(--faint); }
.pad-display i { font-style: normal; color: var(--muted); }
.pad-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6em; direction: ltr; }
.pad.text .pad-keys { grid-template-columns: repeat(11, 1fr); direction: rtl; }
.pad-keys button { min-height: 78px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); font: 600 1.7em var(--display); color: var(--ink); cursor: pointer; box-shadow: 0 2px 0 var(--line); }
.pad.text .pad-keys button { min-height: 70px; font-size: 1.5em; }
.pad-keys button:active { background: var(--sunk); transform: translateY(1px); box-shadow: none; }
.pad-keys .k-ok { background: var(--green-d); color: #fff; border-color: transparent; }
.pad-keys .k-del { color: var(--danger); }
.pad-keys .k-wide { grid-column: span 3; }
.pad-keys .k-sp { grid-column: span 5; }
.pad-keys .k-mode { font-size: 1em; }
.pad.text .k-ok { grid-column: span 3; }
.sheet.prices { width: min(860px, 96vw); max-height: 90vh; display: grid; grid-template-rows: auto auto 1fr auto; gap: .8em; }
.pr-head { display: flex; align-items: center; justify-content: space-between; }
.pr-head h3 { font-size: 1.45em; color: var(--ink); }
.sheet.prices > p { margin: 0; }
.pr-list { overflow-y: auto; display: grid; gap: .6em; padding: .2em; }
.pr-row { display: flex; align-items: center; gap: 1em; min-height: 86px; padding: .5em .9em; border-radius: 16px; border: 1.5px solid var(--line); background: var(--card); cursor: pointer; text-align: start; }
.pr-row:active { transform: scale(.99); }
.pr-row.empty { border-color: #f1dcb8; background: #fffaf2; }
.pr-row .pic { width: 52px; height: 66px; flex: none; }
.pr-row .nm { flex: 1; }
.pr-row .nm b { display: block; color: var(--ink); font-size: 1.05em; }
.pr-row .nm small { color: var(--muted); }
.pr-row .pv { min-width: 8.5em; text-align: center; background: var(--sunk); border-radius: 12px; padding: .45em .8em; line-height: 1.15; }
.pr-row .pv b { font: 700 1.5em var(--display); color: var(--ink); display: block; }
.pr-row .pv small { color: var(--muted); font-size: .78em; }
.pr-row .pv .ph { color: var(--warn); font-weight: 600; }
.pr-foot { display: flex; gap: .8em; justify-content: flex-end; }
.pr-foot .primary { min-width: 220px; }
#pad { z-index: 55; }
.idle { text-align: center; display: grid; gap: 1em; width: min(480px, 92vw); }
.idle h3 { font-size: 1.6em; color: var(--ink); }
.idle p { margin: 0; color: var(--muted); font-size: 1.1em; }
.fab { display: none; position: fixed; inset-inline-start: 24px; bottom: 28px; z-index: 30; align-items: center; gap: .5em; min-height: 72px; padding: 0 1.6em;
  border: 0; border-radius: 99px; background: var(--grad); color: #fff; font: 700 1.15em var(--display); box-shadow: 0 14px 40px -10px rgba(0,104,56,.6); cursor: pointer; animation: breathe 2.6s ease-in-out infinite; }
.toast { position: fixed; inset: auto 0 110px 0; margin: auto; width: max-content; max-width: 90vw; z-index: 60; background: var(--ink); color: #fff; border-radius: 14px; padding: .8em 1.4em; font-weight: 600; box-shadow: var(--shadow); animation: rise .25s both; }

/* ───────── عمودي / شاشات أضيق ───────── */
@media (orientation: portrait), (max-width: 1100px) {
  .w-inner { grid-template-columns: 1fr; align-content: center; text-align: start; padding: 8vh 7vw 16vh; }
  .w-bags { height: 30vh; order: -1; }
  .body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .summary { border: 0; border-bottom: 1px solid var(--line); display: flex; overflow-x: auto; padding: .7em 1em; gap: .5em; }
  .summary h4, .sum-req, .sum-empty { display: none; }
  .sum-item { width: auto; flex: none; padding: .4em .8em; }
  .result { grid-template-columns: 1fr; }
  .get { position: static; grid-template-columns: 1fr 1fr; }
  .w-bands { height: 30%; }
  .fab { display: flex !important; }
  .top-title { display: none; }
  .steps li span { display: none; }
}
@media (max-width: 760px) {
  .get { grid-template-columns: 1fr; }
  .steps { display: none; }
  .pad.text .pad-keys { grid-template-columns: repeat(6, 1fr); }
}
