/* كيا بغداد — warm Baghdad street look around a top-down road canvas */
:root { --ink: #fff; --muted: #ffe7c2; --card: rgba(31, 42, 68, .9); --line: rgba(255, 255, 255, .16); --gold: #ffd23f; --orange: #ff8c1a; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: #1f2a44; }
body { min-height: 100vh; color: var(--ink); font-family: "Baloo Bhaijaan 2", system-ui, sans-serif; overflow-x: hidden;
  background: radial-gradient(circle at 80% 0, #ffb25b55, transparent 40%), linear-gradient(#1f2a44, #2e3c63 60%, #c9733a); }
.page { max-width: 560px; margin: 0 auto; padding: max(10px, env(safe-area-inset-top)) 14px calc(20px + env(safe-area-inset-bottom)); }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
[hidden] { display: none !important; }
.topline { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.icon { width: 42px; height: 42px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0, 0, 0, .3); font-size: 20px; }
.home { text-align: center; margin-top: 12px; padding: 16px; border-radius: 26px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 14px 34px rgba(0, 0, 0, .35); }
.home-art { width: min(240px, 66%); aspect-ratio: 1; border-radius: 26px; object-fit: cover; box-shadow: 0 10px 26px rgba(0, 0, 0, .45); }
.home h1 { margin: 8px 0 0; font-size: 40px; color: var(--gold); text-shadow: 0 3px 0 #7a3b00; }
.home p { margin: 2px 0 6px; color: var(--muted); font-weight: 600; }
.best b { color: var(--gold); }
.how { text-align: right; margin: 10px 0 0; padding: 10px 14px; list-style: none; border-radius: 16px; background: rgba(0, 0, 0, .25); line-height: 1.9; font-weight: 600; font-size: 15px; }
.btn { display: block; width: 100%; margin-top: 10px; border: 0; border-radius: 18px; padding: 13px; font-weight: 800; font-size: 19px; }
.btn-main { background: linear-gradient(#ffb347, #ff7b00); color: #3a1a00; box-shadow: 0 5px 0 #8a3f00; }
.btn-main:active { transform: translateY(3px); box-shadow: 0 2px 0 #8a3f00; }
.btn-ghost { background: rgba(255, 255, 255, .12); border: 1px solid var(--line); }
body.playing .page { display: none; }
.play { position: fixed; inset: 0; z-index: 5; display: flex; flex-direction: column; background: #111; padding: env(safe-area-inset-top) 0 0; }
.hud { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: rgba(20, 24, 40, .96); font-weight: 800; }
.hud #hearts { font-size: 17px; }
.hud-mid { flex: 1; display: flex; flex-direction: column; align-items: center; line-height: 1.15; min-width: 0; }
.hud-mid #stage { color: var(--gold); font-size: 15px; white-space: nowrap; }
.riders { font-size: 13px; color: var(--muted); }
.money { color: var(--gold); font-size: 16px; white-space: nowrap; }
#pauseBtn { width: 36px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .12); }
.stage { position: relative; flex: 1; min-height: 0; touch-action: none; user-select: none; -webkit-user-select: none; }
#cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.banner { position: absolute; left: 50%; top: 22%; transform: translate(-50%, -20px); opacity: 0; pointer-events: none; text-align: center; padding: 10px 22px; border-radius: 20px; background: rgba(20, 24, 40, .85); border: 2px solid var(--gold); transition: .3s; min-width: 60%; }
.banner.on { opacity: 1; transform: translate(-50%, 0); }
.banner b { display: block; font-size: 24px; color: var(--gold); }
.banner small { font-size: 14px; color: var(--muted); font-weight: 700; }
.ctls { direction: ltr; display: flex; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(20, 24, 40, .96); }
.ctl { flex: 1; height: 62px; border-radius: 18px; border: 2px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .12); font-size: 26px; font-weight: 800; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.ctl:active { transform: scale(.95); background: rgba(255, 255, 255, .25); }
.ctl.horn { flex: 1.3; background: linear-gradient(#ffb347, #ff7b00); color: #3a1a00; border-color: transparent; box-shadow: 0 4px 0 #8a3f00; font-size: 20px; }
.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(5, 8, 20, .8); }
.modal { width: min(400px, 100%); padding: 18px 16px; border-radius: 24px; background: #2b3658; border: 1px solid var(--line); text-align: center; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); }
.modal h2 { margin: 0 0 6px; color: var(--gold); }
.modal p { margin: 4px 0; font-weight: 700; }
.modal p b { color: var(--gold); }
.new-best { color: #7dff8a !important; }
.sinan-credit { text-align: center; margin-top: 18px; color: var(--muted); font-size: 12px; letter-spacing: 1px; }
.sinan-credit b { color: var(--gold); }
