:root {
  --ink: #2A2340;
  --sky: #7FD3FF;
  --sun: #FFD23F;
  --mint: #4FD1A5;
  --pink: #FF5CAA;
  --orange: #FF8A3D;
  --purple: #8E5CF6;
  --card: #FFFFFF;
  --soft: #FFF7E6;
  --radius: 26px;
  --font: "Baloo Bhaijaan 2", "Segoe UI", Tahoma, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #7FD3FF; color: var(--ink); font-family: var(--font); }
body { user-select: none; -webkit-user-select: none; touch-action: manipulation; }
#app { position: fixed; inset: 0; }
.hidden { display: none !important; }

.screen { position: absolute; inset: 0; display: none; flex-direction: column; overflow: hidden; }
.screen.active { display: flex; }

/* أزرار */
.btn {
  font-family: var(--font); font-weight: 800; border: 0; cursor: pointer; color: #fff;
  border-radius: 999px; padding: 12px 22px; font-size: 20px; line-height: 1.2;
  box-shadow: 0 6px 0 rgba(0,0,0,.18); transition: transform .08s, box-shadow .08s, filter .15s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,.18); }
.btn:disabled { filter: grayscale(.8) opacity(.6); cursor: default; }
.btn.big { font-size: 26px; padding: 16px 34px; min-width: 240px; }
.btn.mid { font-size: 21px; padding: 12px 22px; }
.btn.small { font-size: 16px; padding: 8px 16px; }
.btn.primary { background: linear-gradient(#3DDC97, #1FB57A); }
.btn.pink { background: linear-gradient(#FF7CBF, #F0479A); }
.btn.sky { background: linear-gradient(#5CC2FF, #2E97E8); }
.btn.ghost { background: #fff; color: var(--ink); }
.btn.icon { width: 56px; height: 56px; padding: 0; font-size: 26px; background: #fff; color: var(--ink); }
.btn.icon.light { background: rgba(255,255,255,.9); }
.pill { background: #fff; border-radius: 999px; padding: 8px 16px; font-size: 22px; font-weight: 800; box-shadow: 0 4px 0 rgba(0,0,0,.12); white-space: nowrap; }

/* الرئيسية */
#screen-home { align-items: center; justify-content: center; background: linear-gradient(#7FD3FF, #C8F0FF 60%, #8EDB7A 60.2%, #5FC46A); }
.home-bg { position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 85% 14%, #FFE46B 0 46px, rgba(255,230,107,.3) 47px 64px, transparent 65px),
    radial-gradient(ellipse 70px 26px at 18% 18%, #fff 98%, transparent),
    radial-gradient(ellipse 90px 30px at 70% 30%, #fff 98%, transparent);
}
.home-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px; text-align: center; }
#home-hero { width: 220px; height: 220px; }
#logo { margin: -10px 0 0; font-size: 84px; line-height: 1; color: #fff; letter-spacing: 1px; cursor: pointer;
  text-shadow: 0 5px 0 #F0479A, 0 10px 0 rgba(0,0,0,.12); -webkit-text-stroke: 3px #F0479A; }
.tag { margin: 4px 0 10px; font-size: 22px; font-weight: 700; background: rgba(255,255,255,.75); padding: 4px 16px; border-radius: 999px; }
.home-actions { display: flex; flex-direction: column; gap: 14px; }
.points-pill { margin-top: 8px; }

/* شريط فوق */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); }
.bar h2 { margin: 0; font-size: 30px; color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.18); }

/* الخريطة */
#screen-map { background: linear-gradient(#7FD3FF, #DDF6FF); }
#screen-map.en { background: linear-gradient(#B59CFF, #FFE0F0); }
.world-tabs { display: flex; gap: 10px; padding: 0 16px; justify-content: center; flex-wrap: wrap; }
.world-tab { font-family: var(--font); font-weight: 800; font-size: 19px; border: 0; border-radius: 18px; padding: 10px 18px; background: rgba(255,255,255,.6); color: var(--ink); cursor: pointer; }
.world-tab span { display: block; font-size: 15px; opacity: .7; direction: ltr; }
.world-tab.active { background: #fff; box-shadow: 0 5px 0 rgba(0,0,0,.12); }
.world-tab.locked { opacity: .75; }
.map-path { flex: 1; overflow-y: auto; padding: 20px 16px 40px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.stage-row { display: flex; width: 100%; max-width: 560px; }
.stage-row:nth-child(4n+1) { justify-content: flex-start; padding-inline-start: 8%; }
.stage-row:nth-child(4n+2) { justify-content: center; }
.stage-row:nth-child(4n+3) { justify-content: flex-end; padding-inline-end: 8%; }
.stage-row:nth-child(4n+4) { justify-content: center; }
.stage {
  width: 150px; height: 150px; border-radius: 50%; border: 0; cursor: pointer; font-family: var(--font); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  box-shadow: 0 8px 0 rgba(0,0,0,.18); position: relative; transition: transform .1s;
}
.stage:active { transform: translateY(4px); }
.stage .num { font-size: 18px; font-weight: 700; opacity: .9; }
.stage .lets { font-size: 28px; font-weight: 800; line-height: 1.1; white-space: nowrap; }
.stage .lets.ltr { direction: ltr; font-size: 26px; }
.stage .badge { position: absolute; top: -6px; inset-inline-end: -6px; background: #fff; border-radius: 50%; width: 44px; height: 44px; display: grid; place-items: center; font-size: 24px; box-shadow: 0 3px 0 rgba(0,0,0,.15); }
.stage.locked { background: #C9CEDA !important; cursor: default; color: #7A8090; }
.stage.current { animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { transform: scale(1.06); } }
.c0 { background: linear-gradient(#FF8FB8, #FF5A8C); } .c1 { background: linear-gradient(#FFC15E, #FF9A2E); }
.c2 { background: linear-gradient(#A98BFF, #7F5AF0); } .c3 { background: linear-gradient(#5CC9FF, #2E9BEA); }
.c4 { background: linear-gradient(#5EE3A6, #22BE7D); } .c5 { background: linear-gradient(#FF8A80, #F0544A); }
.c6 { background: linear-gradient(#7DD8D0, #2FB2A6); }
.map-lock-msg { background: #fff; border-radius: var(--radius); padding: 22px; text-align: center; font-size: 22px; font-weight: 700; max-width: 480px; box-shadow: 0 6px 0 rgba(0,0,0,.1); }

/* المتجر */
#screen-shop { background: linear-gradient(#FFD1E8, #FFF4D6); }
#screen-shop .bar h2 { color: #F0479A; text-shadow: none; }
.shop-wrap { flex: 1; display: flex; gap: 16px; padding: 0 16px 16px; min-height: 0; }
.shop-preview { flex: 0 0 300px; background: #fff; border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 6px 0 rgba(0,0,0,.08); }
#shop-hero { width: 260px; height: 260px; }
.hint { font-size: 17px; margin: 0 12px 12px; text-align: center; opacity: .75; }
.shop-main { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.shop-cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; flex-shrink: 0; }
.cat { font-family: var(--font); font-weight: 800; font-size: 19px; border: 0; border-radius: 18px; padding: 8px 16px; background: rgba(255,255,255,.6); color: var(--ink); cursor: pointer; white-space: nowrap; }
.cat.active { background: #fff; box-shadow: 0 4px 0 rgba(0,0,0,.12); }
.shop-grid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; align-content: start; padding: 4px 2px 20px; }
.item { background: #fff; border-radius: 22px; padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; box-shadow: 0 5px 0 rgba(0,0,0,.08); border: 4px solid transparent; }
.item.worn { border-color: #3DDC97; }
.item canvas { width: 120px; height: 120px; }
.item .nm { font-size: 19px; font-weight: 800; }
.item .btn { width: 100%; font-size: 18px; padding: 9px 10px; }
.item .need { font-size: 14px; opacity: .7; }

/* اللعبة */
#screen-game { background: #7FD3FF; }
#game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hud { position: absolute; top: 0; inset-inline: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; padding-top: max(12px, env(safe-area-inset-top)); pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-letters { display: flex; gap: 6px; background: rgba(255,255,255,.85); border-radius: 999px; padding: 6px 12px; }
.hud-letters span { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; font-weight: 800; background: #EEE9F7; color: #9A93AE; }
.hud-letters span.done { background: #3DDC97; color: #fff; }
.hud-letters span.now { background: #FFD23F; color: var(--ink); }
.hud-letters.ltr { direction: ltr; }
.lane-btns { position: absolute; bottom: 18px; inset-inline-start: 14px; display: flex; flex-direction: column; gap: 12px; }
.btn.lane { width: 78px; height: 78px; padding: 0; font-size: 34px; background: rgba(255,255,255,.85); color: var(--ink); border-radius: 24px; }

.overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 14px; background: rgba(42,35,64,.35); z-index: 10; }
#quiz { background: rgba(42,35,64,.2); align-items: flex-end; }
.panel { background: #fff; border-radius: 32px; padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; max-width: 520px; width: 100%; box-shadow: 0 10px 0 rgba(0,0,0,.12); max-height: 100%; overflow-y: auto; }
.panel h3 { margin: 0; font-size: 32px; }
.panel .row { display: flex; gap: 10px; align-items: center; font-size: 19px; font-weight: 700; text-align: start; width: 100%; }
.panel .row input { width: 26px; height: 26px; }

.quiz-card { background: #fff; border-radius: 32px; padding: 14px 20px 16px; width: 100%; max-width: 640px; display: flex; flex-direction: column; align-items: center; gap: 8px; box-shadow: 0 10px 0 rgba(0,0,0,.12); animation: rise .35s ease-out; }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
.quiz-top { display: flex; align-items: center; justify-content: center; gap: 22px; }
.q-letter { font-size: 104px; font-weight: 800; line-height: 1; color: #FF5A8C; text-shadow: 0 5px 0 rgba(0,0,0,.1); min-width: 110px; text-align: center; }
.q-pic { display: flex; flex-direction: column; align-items: center; background: var(--soft); border-radius: 24px; padding: 8px 18px; }
.q-pic span { font-size: 76px; line-height: 1.1; }
.q-pic b { font-size: 34px; }
.q-say { margin: 0; font-size: 24px; font-weight: 700; }
.q-say b { color: var(--purple); }
.mic { width: 96px; height: 96px; border-radius: 50%; border: 0; font-size: 46px; cursor: pointer; background: linear-gradient(#FFE27A, #FFC21A); box-shadow: 0 6px 0 rgba(0,0,0,.15); }
.mic.listening { background: linear-gradient(#FF7C9C, #FF3D6E); animation: listen 0.9s infinite; }
.mic.ok { background: linear-gradient(#5EE3A6, #22BE7D); }
.mic.off { background: #DDD; }
@keyframes listen { 0%,100% { box-shadow: 0 0 0 0 rgba(255,61,110,.5), 0 6px 0 rgba(0,0,0,.15); } 50% { box-shadow: 0 0 0 22px rgba(255,61,110,0), 0 6px 0 rgba(0,0,0,.15); } }
.q-feedback { margin: 0; font-size: 23px; font-weight: 800; min-height: 1.3em; }
.q-feedback.good { color: #17A86A; } .q-feedback.try { color: #F07A00; }
.q-notice { margin: 0; font-size: 17px; background: #FFF1E0; border-radius: 14px; padding: 8px 12px; color: #9A4D00; font-weight: 700; }
.q-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.q-micbox { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.btn.parent { background: linear-gradient(#9C7BFF, #7651F0); font-size: 20px; }
.btn.parent small { font-size: 14px; opacity: .85; }
.btn.parent.glow { animation: pulse 1.2s infinite; }

.done-panel { position: relative; overflow: hidden; }
#done-hero { width: 170px; height: 170px; }
.done-sum { margin: 0; font-size: 22px; font-weight: 700; }
.done-unlock { margin: 0; font-size: 22px; font-weight: 800; color: var(--purple); background: #F1EBFF; padding: 8px 14px; border-radius: 16px; }
.parents-panel ul { text-align: start; font-size: 18px; margin: 0; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 6px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 999px; font-size: 20px; font-weight: 700; z-index: 50; box-shadow: 0 6px 18px rgba(0,0,0,.25); max-width: 92vw; text-align: center; }

/* موبايل */
@media (max-width: 720px) {
  .shop-wrap { flex-direction: column; }
  .shop-preview { flex: 0 0 auto; flex-direction: row; padding: 6px; }
  #shop-hero { width: 150px; height: 150px; }
  .shop-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .item canvas { width: 96px; height: 96px; }
  .stage { width: 124px; height: 124px; }
  .bar h2 { font-size: 24px; }
}
@media (max-height: 560px) {
  #home-hero { width: 140px; height: 140px; }
  #logo { font-size: 60px; }
  .btn.big { font-size: 22px; padding: 12px 26px; }
  .q-letter { font-size: 80px; }
  .q-pic span { font-size: 54px; }
  .mic { width: 76px; height: 76px; font-size: 36px; }
  .btn.lane { width: 64px; height: 64px; }
  .quiz-card { padding: 10px 16px 12px; gap: 6px; }
}
@media (max-height: 700px) {
  .q-letter { font-size: 84px; }
  .q-pic span { font-size: 58px; }
  .q-pic b { font-size: 28px; }
  .mic { width: 80px; height: 80px; font-size: 38px; }
}
@media (max-width: 480px) {
  .hud-letters span { width: 32px; height: 32px; font-size: 18px; }
  .q-letter { font-size: 84px; min-width: 80px; }
  .btn.big { min-width: 210px; }
}

/* موبايل عمودي: بطاقة السؤال فوق، عشان الطريق والحرف العملاق يبينوا تحت */
@media (orientation: portrait) and (max-width: 760px) {
  #quiz { align-items: flex-start; padding-top: calc(84px + env(safe-area-inset-top)); }
  .quiz-top { gap: 12px; }
  .q-letter { font-size: 76px; min-width: 70px; }
  .q-pic { padding: 6px 12px; }
  .q-pic span { font-size: 52px; }
  .q-pic b { font-size: 26px; }
  .mic { width: 76px; height: 76px; font-size: 36px; }
  .q-say { font-size: 19px; }
  .q-feedback { font-size: 20px; }
  .q-actions .btn.mid { font-size: 18px; padding: 10px 16px; }
}

/* ===================== النسخة ٢ ===================== */
.home-top { position: absolute; top: 0; inset-inline: 0; display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; padding-top: max(14px, env(safe-area-inset-top)); z-index: 2; }
.home-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.btn.gold { background: linear-gradient(#FFD45E, #F2A818); color: #4A2E00; }
.btn.gold.owned { background: linear-gradient(#5EE3A6, #22BE7D); color: #fff; }
.btn.icon.off { opacity: .55; filter: grayscale(1); }
.muted { opacity: .75; margin: 0; font-size: 17px; }

/* خريطة: ألوان حسب العالم */
#screen-map[data-world="en"] { background: linear-gradient(#B59CFF, #FFE0F0); }
#screen-map[data-world="arw"] { background: linear-gradient(#FFC48A, #FFF1DC); }
#screen-map[data-world="enw"] { background: linear-gradient(#7FD8C8, #E6FFF8); }
.world-tabs { overflow-x: auto; flex-wrap: nowrap; justify-content: flex-start; padding-bottom: 6px; scrollbar-width: none; }
.world-tab { flex-shrink: 0; }
.stage .num { font-size: 15px; }
.stage .lets.emo { font-size: 26px; letter-spacing: 2px; }
.stage .stars { position: absolute; bottom: -14px; font-size: 26px; color: #FFC21A; text-shadow: 0 2px 0 rgba(0,0,0,.2); letter-spacing: 1px; }
.stage .stars i { color: rgba(255,255,255,.7); font-style: normal; }
.stage.pay { filter: saturate(.75); }
.stage.pay::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 4px dashed rgba(255,215,90,.9); }

/* بانر «لاقِ الحرف» / «هيا نكتب» */
.banner { position: absolute; top: calc(78px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); background: #fff; border-radius: 24px; padding: 8px 18px; display: flex; align-items: center; gap: 12px; box-shadow: 0 6px 0 rgba(0,0,0,.12); z-index: 5; animation: pop .35s ease-out; white-space: nowrap; max-width: 94vw; }
.banner span { font-size: 20px; font-weight: 800; }
.banner b { font-size: 46px; line-height: 1; color: #FF5A8C; }
.banner b.emo { font-size: 38px; }
.banner small { font-size: 15px; opacity: .7; }
@keyframes pop { from { transform: translateX(-50%) scale(.6); opacity: 0; } }
.hud-emo { font-style: normal; font-size: 30px; margin-inline-end: 4px; }
.hud-count { align-self: center; font-size: 15px; font-weight: 800; opacity: .6; margin-inline-start: 4px; }

/* السؤال */
.q-letter.word { font-size: 76px; min-width: 0; padding: 0 6px; }
.q-choices { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.choice { font-family: var(--font); border: 0; background: var(--soft); border-radius: 22px; padding: 8px 14px; min-width: 110px; cursor: pointer; display: flex; flex-direction: column; align-items: center; box-shadow: 0 5px 0 rgba(0,0,0,.1); transition: transform .1s; }
.choice span { font-size: 60px; line-height: 1.1; }
.choice b { font-size: 22px; color: var(--ink); }
.choice:active { transform: translateY(3px); }
.choice.right { background: #C9F7DF; }
.choice.wrong { background: #FFD3D3; animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }

/* نهاية المرحلة */
.done-rating { display: flex; gap: 6px; }
.done-rating span { font-size: 54px; color: #E3DDF0; line-height: 1; }
.done-rating span.on { color: #FFC21A; text-shadow: 0 4px 0 #E09A00; animation: starIn .5s both; }
@keyframes starIn { from { transform: scale(0) rotate(-90deg); } 70% { transform: scale(1.3); } }
.gift { font-family: var(--font); border: 0; background: linear-gradient(#FFE27A, #FFB21A); border-radius: 24px; padding: 8px 22px; cursor: pointer; display: flex; align-items: center; gap: 10px; font-size: 44px; box-shadow: 0 6px 0 rgba(0,0,0,.15); animation: wiggle 1.2s infinite; }
.gift span { font-size: 22px; font-weight: 800; color: #5A3300; }
.gift.opened { animation: none; transform: scale(1.15); opacity: .6; }
@keyframes wiggle { 0%,100% { transform: rotate(0); } 20% { transform: rotate(-6deg); } 40% { transform: rotate(6deg); } 60% { transform: rotate(0); } }
.gift-result { margin: 0; font-size: 22px; font-weight: 800; color: #E07A00; background: #FFF4D6; border-radius: 16px; padding: 8px 14px; }
.done-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* العمر */
.age-panel { max-width: 620px; }
.age-opts { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.age-opt { font-family: var(--font); border: 0; cursor: pointer; background: var(--soft); border-radius: 26px; padding: 16px 18px; width: 240px; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 6px 0 rgba(0,0,0,.1); color: var(--ink); }
.age-opt span { font-size: 64px; }
.age-opt b { font-size: 30px; }
.age-opt small { font-size: 17px; font-weight: 700; opacity: .8; }
.age-opt em { font-style: normal; font-size: 15px; opacity: .7; }
.age-opt:active { transform: translateY(3px); }

/* بوابة الأهل */
.gate-q { font-size: 40px; font-weight: 800; margin: 0; }
.gate-opts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.gate-opts .btn { min-width: 74px; font-size: 26px; }

/* الشراء والدخول */
.pay-panel h3 { font-size: 28px; }
#pay-hero { width: 130px; height: 130px; }
.pay-list { list-style: none; margin: 0; padding: 0; text-align: start; font-size: 18px; font-weight: 700; display: flex; flex-direction: column; gap: 4px; }
.price { display: flex; flex-direction: column; align-items: center; }
.price b { font-size: 46px; color: #17A86A; direction: ltr; line-height: 1; }
.price span { font-size: 16px; opacity: .7; }
.login-panel input { width: 100%; font-family: var(--font); font-size: 22px; padding: 12px 16px; border-radius: 16px; border: 3px solid #E3DDF0; text-align: center; margin-bottom: 10px; }
.login-panel input:focus { outline: none; border-color: var(--purple); }
#login-code { letter-spacing: 8px; font-size: 28px; }
#login-step1, #login-step2 { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; }

/* للأهل */
.parents-panel { max-width: 560px; align-items: stretch; text-align: start; }
.parents-panel h3 { text-align: center; }
.p-section { background: #F8F5FF; border-radius: 18px; padding: 10px 14px; }
.p-section h4 { margin: 0 0 6px; font-size: 19px; }
.p-section p { margin: 4px 0; font-size: 17px; }
.p-section select { font-family: var(--font); font-size: 17px; border-radius: 10px; padding: 4px 8px; margin-inline-start: auto; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.chip { display: inline-block; min-width: 34px; text-align: center; border-radius: 10px; padding: 0 8px; margin: 2px; font-weight: 800; font-size: 20px; }
.chip.ok { background: #C9F7DF; } .chip.need { background: #FFE0C2; }
.small-note { font-size: 15px !important; opacity: .8; }

/* متجر: التقوية */
.item.upg { justify-content: space-between; }
.upg-ico { width: 90px; height: 90px; border-radius: 50%; display: grid; place-items: center; font-size: 48px; background: #fff; border: 6px solid var(--c); }
.lv { font-size: 22px; color: #FFB21A; letter-spacing: 3px; direction: ltr; }
.lv i { color: #E3DDF0; font-style: normal; }

.shop-cats, .world-tabs { scrollbar-width: none; }
.shop-cats::-webkit-scrollbar, .world-tabs::-webkit-scrollbar { display: none; }

/* شريط التحديث */
.update-bar { position: fixed; top: max(10px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 60; background: #2A2340; color: #fff; padding: 8px 10px 8px 16px; border-radius: 999px; font-size: 18px; font-weight: 700; display: flex; gap: 10px; align-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.25); white-space: nowrap; }

@media (max-width: 480px) {
  .banner b { font-size: 36px; } .banner span { font-size: 17px; } .banner small { display: none; }
  .choice { min-width: 92px; } .choice span { font-size: 48px; }
  .age-opt { width: 100%; }
}
@media (max-height: 720px) {
  #done-hero { width: 110px; height: 110px; } .done-rating span { font-size: 44px; }
  .done-panel { gap: 8px; padding: 18px; }
  .q-choices .choice span { font-size: 50px; }
}
@media (max-height: 560px) {
  .done-rating span { font-size: 40px; } #done-hero { width: 90px; height: 90px; }
  .gift { font-size: 32px; } .banner { top: 66px; }
}

/* أكمل الكلمة */
.hud-letters span.given { background: #FFFFFF; color: var(--ink); box-shadow: inset 0 0 0 2px #E3DDF0; }
.banner b.pattern { letter-spacing: 6px; color: var(--ink); }
.banner i.blank { font-style: normal; color: #FF5A8C; display: inline-block; min-width: 28px; border-bottom: 4px solid #FF5A8C; }

/* الأسماء + نموذج الشراء */
.hello { margin: 0; font-size: 24px; font-weight: 800; background: rgba(255,255,255,.85); padding: 2px 16px; border-radius: 999px; }
.hero-name { font-family: var(--font); font-weight: 800; font-size: 20px; border: 0; cursor: pointer; background: #fff; color: #7A3CF0; padding: 4px 16px; border-radius: 999px; box-shadow: 0 4px 0 rgba(0,0,0,.1); margin-top: -8px; }
.shop-preview .hero-name { margin: 0 0 6px; }
.names-panel #names-hero { width: 120px; height: 120px; }
.name-field { display: flex; flex-direction: column; gap: 4px; width: 100%; font-size: 20px; font-weight: 800; text-align: start; }
.name-field input, .pay-form input { width: 100%; font-family: var(--font); font-size: 20px; padding: 10px 14px; border-radius: 14px; border: 3px solid #E3DDF0; text-align: center; }
.name-field input:focus, .pay-form input:focus { outline: none; border-color: var(--purple); }
.pay-form { width: 100%; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.pay-form .muted { font-size: 15px; }
.pay-done { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pay-done p { margin: 0; font-size: 18px; }
.big-ok { font-size: 28px !important; font-weight: 800; color: #17A86A; }

#screen-home .hero-name { margin: -6px 0 12px; }
