/* حمام السطح — a warm rooftop sunset; the flock, the loft and the hawk are drawn on the canvas */
:root { --ink: #fff; --muted: #e8d6b6; --card: rgba(40, 26, 14, .9); --line: rgba(255, 255, 255, .14); --gold: #ffd166; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: #241505; }
body { min-height: 100vh; color: var(--ink); font-family: "Baloo Bhaijaan 2", system-ui, sans-serif; overflow-x: hidden;
  background: radial-gradient(circle at 18% 10%, #ffd16626, transparent 42%), radial-gradient(circle at 85% 88%, #a9731f22, transparent 45%), linear-gradient(170deg, #5a3a16, #2e1c08 62%, #1b1005); }
.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; }
.card { 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, .5); }
.home { text-align: center; }
.home-art { width: min(240px, 66%); aspect-ratio: 1; border-radius: 26px; object-fit: cover; box-shadow: 0 10px 26px rgba(0, 0, 0, .55); }
.home h1 { margin: 8px 0 0; font-size: 42px; color: var(--gold); text-shadow: 0 3px 0 #553408, 0 0 24px #ffd16655; }
.home p { margin: 2px 0 8px; color: var(--muted); font-weight: 600; }
.stars-line 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, .3); line-height: 1.9; font-weight: 600; font-size: 14.5px; }
.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(135deg, #f6d98a, #c9962f); color: #2e1c04; box-shadow: 0 5px 0 #7d5a12; }
.btn-main:active { transform: translateY(3px); box-shadow: 0 2px 0 #7d5a12; }
.btn-ghost { background: rgba(255, 255, 255, .1); border: 1px solid var(--line); }
.map-head { display: flex; align-items: center; gap: 10px; }
.map-head h2 { flex: 1; margin: 0; font-size: 26px; color: var(--gold); }
.total { font-weight: 800; background: rgba(0, 0, 0, .3); padding: 4px 12px; border-radius: 999px; }
.levels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 12px; }
.lv { aspect-ratio: 1; border: 0; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: linear-gradient(140deg, #c9962f, #7d5a12); box-shadow: inset 0 -4px 0 #0005, inset 0 3px 0 #ffffff33, 0 3px 0 #0006; font-weight: 800; }
.lv b { font-size: 21px; line-height: 1; text-shadow: 0 2px 2px #0006; }
.lv small { font-size: 10px; letter-spacing: -1px; min-height: 13px; color: #fff3c4; }
.lv.lock { background: rgba(255, 255, 255, .09); box-shadow: none; color: #fff9; }
body.playing .page { display: none; }
.play { position: fixed; inset: 0; z-index: 5; display: flex; flex-direction: column; padding: env(safe-area-inset-top) 0 calc(8px + env(safe-area-inset-bottom));
  background: #2e1c08; }
.hud { display: flex; align-items: center; gap: 8px; padding: 8px 10px 2px; }
.hbtn { flex: none; width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0, 0, 0, .32); font-size: 20px; font-weight: 800; }
.hmid { flex: 1; text-align: center; line-height: 1.25; min-width: 0; }
.hmid > b { display: block; font-size: 17px; color: var(--gold); }
.hmid small { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.hmid small b { color: #fff; }
.stage { flex: 1; min-height: 0; position: relative; touch-action: none; user-select: none; -webkit-user-select: none; }
#cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; direction: ltr; }
.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(12, 7, 2, .82); }
.modal { width: min(380px, 100%); padding: 18px 16px; border-radius: 24px; background: #33210f; border: 1px solid var(--line); text-align: center; box-shadow: 0 20px 50px rgba(0, 0, 0, .6); }
.modal h2 { margin: 0 0 6px; color: var(--gold); }
.modal p { margin: 4px 0; font-weight: 700; }
.res-stars { font-size: 44px; letter-spacing: 6px; }
.res-stars i { font-style: normal; display: inline-block; animation: starIn .5s cubic-bezier(.3, 1.8, .5, 1) backwards; }
.res-stars i:nth-child(2) { animation-delay: .25s; } .res-stars i:nth-child(3) { animation-delay: .5s; }
@keyframes starIn { from { transform: scale(0) rotate(-90deg); } }
.sinan-credit { text-align: center; margin-top: 18px; color: var(--muted); font-size: 12px; letter-spacing: 1px; }
.sinan-credit b { color: var(--gold); }
