/* كويز «مطبخ الطيبات» */
:root {
  --olive: #2c3618; --olive-2: #3d4a22; --olive-soft: #e6e8d8;
  --cream: #f4f0e4; --paper: #fbf9f2; --line: #e2dcc8;
  --gold: #a9852b; --gold-2: #d9b24c; --gold-soft: #f5ecd0;
  --ink: #23281a; --mute: #6a6d5c;
  --ok: #2f7a3a; --ok-soft: #e4f0e2; --no: #b3261e; --no-soft: #fbe9e6; --amber: #9a6a00; --amber-soft: #fcf2d6;
  --r: 18px; --shadow: 0 1px 2px rgba(44,54,24,.06), 0 12px 32px -12px rgba(44,54,24,.22);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: 'Cairo', system-ui, 'Segoe UI', Tahoma, sans-serif; color: var(--ink); line-height: 1.75; font-size: 16px;
  background: var(--cream);
  background-image: radial-gradient(1200px 500px at 85% -10%, rgba(217,178,76,.22), transparent 60%), radial-gradient(900px 500px at 0% 110%, rgba(44,54,24,.10), transparent 60%);
  background-attachment: fixed; min-height: 100vh; display: flex; flex-direction: column;
}
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img { max-width: 100%; height: auto; display: block; }
svg { width: 1.25em; height: 1.25em; flex: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 2px; border-radius: 8px; }

/* الترويسة */
.top { background: var(--olive); color: #fff; }
.top-in { max-width: 1040px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.05rem; }
.brand b { color: var(--gold-2); font-weight: 900; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--gold-2); color: var(--olive); display: grid; place-items: center; }
.top-tag { font-size: .74rem; color: #d7dcc4; text-align: left; }

.wrap { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 20px 16px 40px; }
.screen.is-on { animation: fade .35s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* الأزرار */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 14px; padding: 12px 22px;
  background: var(--olive); color: #fff; font-weight: 800; text-decoration: none; line-height: 1.4;
  box-shadow: 0 6px 0 -1px #1a2010, 0 14px 24px -12px rgba(44,54,24,.6); transition: transform .12s, box-shadow .12s, background .15s;
}
.btn:hover { background: var(--olive-2); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 -1px #1a2010; }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn-xl { font-size: 1.12rem; padding: 16px 30px; border-radius: 16px; }
.btn-block { width: 100%; }
.btn.is-busy { opacity: .7; pointer-events: none; }
.btn-wa { background: #1f8f4e; box-shadow: 0 6px 0 -1px #14602f; margin-top: 14px; }
.link { background: none; border: 0; color: var(--mute); text-decoration: underline; padding: 6px; }

/* الشاشة الأولى */
.intro-grid { display: grid; gap: 28px; align-items: center; padding-top: 10px; }
.kicker { display: inline-flex; align-items: center; gap: 8px; background: var(--gold-soft); color: #7a5d12; font-weight: 800; font-size: .85rem; padding: 5px 14px; border-radius: 99px; margin-bottom: 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #d0541f; box-shadow: 0 0 0 0 rgba(208,84,31,.6); animation: pulse 1.8s infinite; }
@keyframes pulse { to { box-shadow: 0 0 0 9px rgba(208,84,31,0); } }
.intro h1 { font-size: clamp(1.65rem, 6.2vw, 2.9rem); line-height: 1.35; font-weight: 900; color: var(--olive); letter-spacing: -.01em; }
.intro h1 em { font-style: normal; color: var(--gold); }
.lead { margin: 16px 0 24px; color: #474b3a; font-size: 1.04rem; max-width: 34em; }
.perks { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 22px; color: var(--mute); font-size: .9rem; font-weight: 600; }
.perks li { display: flex; align-items: center; gap: 6px; }
.perks svg { color: var(--gold); }
.fine { margin-top: 30px; text-align: center; color: var(--mute); font-size: .82rem; }

.intro-art { position: relative; height: 300px; max-width: 420px; width: 100%; margin: 0 auto; }
.intro-cover { position: absolute; width: 46%; inset-inline-start: 27%; top: 6%; border-radius: 10px; box-shadow: 0 24px 40px -18px rgba(0,0,0,.55), 0 0 0 1px rgba(0,0,0,.06); transform: rotate(-3deg); z-index: 2; }
.plate { z-index: 3; position: absolute; width: 38%; aspect-ratio: 1; border-radius: 50%; box-shadow: var(--shadow); }
.plate img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 5px solid #fff; }
.plate-ok { inset-inline-start: 0; top: 0; animation: float 6s ease-in-out infinite; }
.plate-no { inset-inline-end: 0; bottom: 0; animation: float 6s ease-in-out -3s infinite; }
@keyframes float { 50% { transform: translateY(-9px); } }
.tag { position: absolute; bottom: -6px; inset-inline-start: 50%; transform: translateX(50%); display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: .78rem; padding: 2px 11px; border-radius: 99px; color: #fff; white-space: nowrap; border: 2px solid #fff; z-index: 3; }
.tag-ok { background: var(--ok); }
.tag-q { background: var(--gold); font-size: 1rem; padding: 0 13px; }
.tag svg { width: 1em; height: 1em; }

/* الأسئلة */
.quiz { max-width: 640px; margin: 0 auto; }
.q-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.q-back { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); display: grid; place-items: center; color: var(--olive); flex: none; }
.q-prog { flex: 1; height: 10px; background: #e3dec9; border-radius: 99px; overflow: hidden; }
.q-prog i { display: block; height: 100%; width: 4%; border-radius: 99px; background: linear-gradient(90deg, var(--gold-2), var(--gold)); transition: width .45s cubic-bezier(.2,.8,.2,1); }
.q-count { font-weight: 800; color: var(--mute); font-size: .88rem; min-width: 3.4em; text-align: center; direction: ltr; }
.q-card { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; padding: 24px 18px 22px; box-shadow: var(--shadow); overflow: hidden; }
.q-in.from-next { animation: slideN .32s cubic-bezier(.2,.8,.2,1) both; }
.q-in.from-back { animation: slideB .32s cubic-bezier(.2,.8,.2,1) both; }
@keyframes slideN { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
@keyframes slideB { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
.q-part { display: inline-flex; align-items: center; gap: 7px; color: var(--gold); font-weight: 800; font-size: .85rem; margin-bottom: 6px; }
.q-title { font-size: clamp(1.3rem, 5vw, 1.7rem); font-weight: 900; color: var(--olive); line-height: 1.45; outline: 0; }
.q-sub { color: var(--mute); margin-top: 4px; font-size: .95rem; }
.opts { display: grid; gap: 10px; margin-top: 18px; }
.opt { display: flex; align-items: center; gap: 12px; text-align: start; width: 100%; padding: 13px 14px; min-height: 58px; background: #fff; border: 2px solid var(--line); border-radius: 15px; transition: border-color .15s, background .15s, transform .1s; }
.opt:hover { border-color: #c9c2a6; }
.opt:active { transform: scale(.985); }
.opt.is-on { border-color: var(--olive); background: var(--olive-soft); }
.opt-box { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #c9c2a6; display: grid; place-items: center; color: transparent; flex: none; transition: .15s; }
.is-multi .opt-box { border-radius: 8px; }
.opt.is-on .opt-box { background: var(--olive); border-color: var(--olive); color: #fff; }
.opt-box svg { width: 16px; height: 16px; }
.opt-txt b { display: block; font-weight: 700; line-height: 1.5; }
.opt-txt small { display: block; color: var(--mute); font-size: .82rem; line-height: 1.5; }
.btn-next { width: 100%; margin-top: 18px; }

/* التحليل */
.think { text-align: center; padding: 50px 0; max-width: 420px; margin: 0 auto; }
.think h2 { color: var(--olive); font-weight: 900; font-size: 1.5rem; margin: 18px 0 16px; }
.pot { position: relative; width: 120px; margin: 40px auto 0; color: var(--olive); animation: wob 1.2s ease-in-out infinite; }
.pot svg { width: 120px; height: 80px; }
@keyframes wob { 50% { transform: rotate(-2deg) translateY(-2px); } }
.steam { position: absolute; top: -34px; width: 8px; height: 30px; border-radius: 8px; background: var(--gold-2); opacity: 0; animation: steam 1.8s ease-out infinite; }
.s1 { left: 34px; } .s2 { left: 56px; animation-delay: .5s; } .s3 { left: 78px; animation-delay: 1s; }
@keyframes steam { 0% { opacity: 0; transform: translateY(14px) scaleY(.6); } 40% { opacity: .8; } 100% { opacity: 0; transform: translateY(-18px) scaleY(1.2); } }
.think-list li { opacity: .3; transition: .4s; padding: 5px 0; font-weight: 600; color: var(--mute); }
.think-list li.is-on { opacity: 1; color: var(--ink); }

/* النتيجة */
.result { max-width: 720px; margin: 0 auto; }
#result > * + * { margin-top: 16px; }
.r-hero { background: var(--olive); color: #eef0e2; border-radius: 24px; padding: 26px 20px; position: relative; overflow: hidden; }
.r-hero::after { content: ''; position: absolute; width: 220px; height: 220px; border-radius: 50%; border: 34px solid rgba(217,178,76,.16); inset-inline-end: -70px; top: -80px; }
.r-label { display: inline-block; background: var(--gold-2); color: var(--olive); font-weight: 800; font-size: .8rem; padding: 2px 13px; border-radius: 99px; margin-bottom: 10px; }
.r-hero h1 { color: #fff; font-size: clamp(1.5rem, 6vw, 2.1rem); font-weight: 900; line-height: 1.4; margin-bottom: 8px; position: relative; z-index: 1; }
.r-hero p { position: relative; z-index: 1; }
.r-card { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 20px 18px; box-shadow: var(--shadow); }
.r-card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: var(--olive); }
.r-card-h svg { width: 38px; height: 38px; padding: 8px; background: var(--gold-soft); color: var(--gold); border-radius: 12px; }
.r-card-h h2 { font-size: 1.2rem; font-weight: 900; }
.lead-s { color: #474b3a; }
.note { margin-top: 12px; font-size: .86rem; color: var(--mute); border-inline-start: 3px solid var(--gold-2); padding-inline-start: 10px; }
.gauge { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-bottom: 10px; }
.gauge i { height: 10px; border-radius: 99px; background: #e3dec9; }
.gauge[data-l="0"] i:nth-child(1) { background: var(--ok); }
.gauge[data-l="1"] i:nth-child(-n+2) { background: #8aa13a; }
.gauge[data-l="2"] i:nth-child(-n+3) { background: #d09a1f; }
.gauge[data-l="3"] i { background: #c9541f; }
.gut-name { font-weight: 900; font-size: 1.15rem; color: var(--olive); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chips span { background: var(--olive-soft); color: var(--olive); font-weight: 700; font-size: .84rem; padding: 2px 12px; border-radius: 99px; }
.tips { display: grid; gap: 10px; margin-top: 12px; }
.tips li { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.tips b { display: block; color: var(--olive); }
.tips span { color: #474b3a; font-size: .95rem; }

.alert { display: flex; gap: 12px; border-radius: 20px; padding: 16px; border: 2px solid; }
.alert > svg { width: 30px; height: 30px; margin-top: 2px; }
.alert h3 { font-weight: 900; font-size: 1.1rem; margin-bottom: 4px; }
.alert ul { display: grid; gap: 8px; }
.alert li { padding-inline-start: 14px; position: relative; }
.alert li::before { content: ''; position: absolute; inset-inline-start: 0; top: .75em; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.alert-red { background: var(--no-soft); border-color: #e3a49e; color: #7c1812; }
.alert-amber { background: var(--amber-soft); border-color: #e6cd84; color: #5f4200; }

.cols { display: grid; gap: 12px; margin-top: 14px; }
.col { border-radius: 16px; padding: 14px; }
.col h3 { display: flex; align-items: center; gap: 8px; font-weight: 900; margin-bottom: 8px; font-size: 1.02rem; }
.col h3 svg { width: 24px; height: 24px; padding: 4px; border-radius: 50%; color: #fff; }
.col ul { display: grid; gap: 8px; font-size: .94rem; }
.col li { padding-inline-start: 14px; position: relative; }
.col li::before { content: ''; position: absolute; inset-inline-start: 0; top: .75em; width: 6px; height: 6px; border-radius: 50%; }
.col-pro { background: var(--ok-soft); } .col-pro h3 { color: #1e5727; } .col-pro h3 svg, .col-pro li::before { background: var(--ok); }
.col-con { background: var(--no-soft); } .col-con h3 { color: #8a1c15; } .col-con h3 svg, .col-con li::before { background: var(--no); }

/* الكتاب */
.book { background: #fff; border: 2px solid var(--olive); border-radius: 26px; padding: 22px 18px; box-shadow: var(--shadow); scroll-margin-top: 12px; }
.book-k { color: var(--gold); font-weight: 800; font-size: .9rem; margin-bottom: 10px; }
.book-top { display: grid; grid-template-columns: 104px 1fr; gap: 16px; align-items: start; }
.book-cover { border-radius: 6px; box-shadow: 0 14px 22px -12px rgba(0,0,0,.5), 0 0 0 1px rgba(0,0,0,.08); transform: rotate(2deg); }
.book h2 { font-size: 1.45rem; font-weight: 900; color: var(--olive); line-height: 1.35; }
.book h2 em { display: block; font-style: normal; color: var(--gold); font-size: 1.05rem; }
.book-pitch { margin-top: 8px; color: #474b3a; }
.book-list { grid-column: 1 / -1; display: grid; gap: 8px; margin-top: 14px; }
.book-list li { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; font-size: .95rem; }
.book-list svg { color: var(--ok); margin-top: .25em; }
.dishes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 16px; }
.dishes img { border-radius: 12px; aspect-ratio: 1; object-fit: cover; width: 100%; }
.honest { display: flex; gap: 10px; margin-top: 16px; background: var(--cream); border-radius: 14px; padding: 12px 14px; font-size: .9rem; color: #474b3a; }
.honest svg { color: var(--gold); margin-top: .2em; }
.order { margin-top: 18px; border-top: 2px dashed var(--line); padding-top: 18px; scroll-margin-top: 12px; }
.price { display: flex; align-items: baseline; justify-content: space-between; }
.price span { font-weight: 700; color: var(--mute); }
.price b { font-size: 1.9rem; font-weight: 900; color: var(--olive); }
.order-perks { display: grid; gap: 6px; margin: 8px 0 16px; font-size: .9rem; color: #474b3a; }
.order-perks li { display: flex; gap: 8px; align-items: flex-start; }
.order-perks svg { color: var(--gold); margin-top: .2em; }
.f { display: block; margin-bottom: 12px; }
.f > span { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 4px; }
.f > span small { color: var(--mute); font-weight: 400; }
.f input, .f select { width: 100%; height: 52px; border: 2px solid var(--line); border-radius: 13px; padding: 0 14px; background: var(--paper); font-size: 1rem; }
.f input[dir="ltr"] { text-align: right; }
.f input:focus, .f select:focus { outline: 0; border-color: var(--olive); background: #fff; }
.f.bad input, .f.bad select { border-color: var(--no); background: var(--no-soft); }
.f-err { display: block; color: var(--no); font-weight: 700; font-size: .84rem; margin-top: 3px; }
.f2 { display: grid; gap: 0 12px; }
.qty { display: flex; align-items: center; gap: 12px; margin: 4px 0 16px; font-weight: 700; }
.qty-c { display: flex; align-items: center; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; }
.qty-c button { width: 44px; height: 44px; border: 0; background: var(--paper); font-size: 1.3rem; font-weight: 800; }
.qty-c output { width: 40px; text-align: center; font-weight: 900; }
.qty .total { margin-inline-start: auto; font-size: 1.15rem; color: var(--olive); font-weight: 900; }
#orderForm { position: relative; }
.hp { position: absolute; inset-inline-start: 0; top: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; clip-path: inset(50%); pointer-events: none; }
.form-err { background: var(--no-soft); color: #7c1812; padding: 10px 14px; border-radius: 12px; font-weight: 700; margin-bottom: 12px; }
.form-fine { text-align: center; color: var(--mute); font-size: .84rem; margin-top: 12px; }
.done { text-align: center; padding: 10px 0; }
.done-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; margin: 0 auto 12px; animation: pop .45s cubic-bezier(.2,1.6,.4,1) both; }
.done-ic svg { width: 34px; height: 34px; }
@keyframes pop { from { transform: scale(0); } }
.done h3 { font-size: 1.35rem; font-weight: 900; color: var(--olive); margin-bottom: 6px; }
.again { text-align: center; }

.sticky { position: fixed; inset-inline: 0; bottom: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 24px -14px rgba(0,0,0,.3); transition: transform .3s; margin: 0 !important; }
.sticky.is-off { transform: translateY(110%); }
.sticky span { font-size: .82rem; color: var(--mute); line-height: 1.5; }
.sticky b { display: block; color: var(--olive); font-size: .98rem; }
.sticky .btn { padding: 10px 18px; white-space: nowrap; }
body[data-screen="result"] .foot { padding-bottom: 96px; }

.foot { background: var(--olive); color: #c9cfb4; font-size: .82rem; padding: 20px 16px; text-align: center; }
.foot p { max-width: 720px; margin: 0 auto; }
.foot p + p { margin-top: 6px; }
.foot b { color: var(--gold-2); }

@media (min-width: 560px) {
  .opts.is-grid { grid-template-columns: 1fr 1fr; }
  .f2 { grid-template-columns: 1fr 1fr; }
  .cols { grid-template-columns: 1fr 1fr; }
  .dishes { grid-template-columns: repeat(6, 1fr); }
  .q-card { padding: 30px 28px 28px; }
  .book { padding: 28px; }
  .book-top { grid-template-columns: 150px 1fr; gap: 22px; }
  .book-list { grid-column: 2; }
  .r-hero, .r-card { padding: 28px; }
}
@media (min-width: 880px) {
  .wrap { padding-top: 36px; }
  .intro-grid { grid-template-columns: 1.15fr .85fr; gap: 40px; min-height: 60vh; }
  .intro-art { height: 440px; max-width: none; }
  .sticky { display: none; }
  body[data-screen="result"] .foot { padding-bottom: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
