/* غرفة الهروب — the player app. Night at al-Aqsa: a deep sky, gold light, parchment for the riddles and the map. */
@font-face { font-family: Digits; src: url(/fonts/MontserratDigits-wght.ttf); font-weight: 100 900; unicode-range: U+0030-0039, U+002D-002F, U+003A; font-display: swap; }
@font-face { font-family: Letters; src: url(/fonts/ReadexLatin-wght.ttf); font-weight: 160 700; unicode-range: U+0041-005A, U+0061-007A; font-display: swap; }
@font-face { font-family: Latin; src: url(/fonts/ReadexLatin-wght.ttf); font-weight: 160 700; font-display: swap; }
@font-face { font-family: Kufi; src: url(/fonts/NotoKufiArabic-wght.ttf); font-weight: 100 900; font-display: swap; }
@font-face { font-family: Ruqaa; src: url(/fonts/ArefRuqaa-Bold.ttf); font-weight: 700; font-display: swap; }
:root {
  --night: #070d22; --night2: #101c3f; --gold: #e6c06a; --gold2: #f6dfa0; --goldd: #b8913d; --sand: #f6ecd6; --sand2: #ead9b4;
  --ink: #2b2118; --soft: #a9b1c8; --white: #f7f3ea; --green: #0b6a42; --green2: #0f8553; --red: #c8232b;
  --glass: rgba(255,255,255,.055); --glass2: rgba(255,255,255,.09); --line: rgba(230,192,106,.22); --line2: rgba(255,255,255,.1);
  --r: 20px; --tabs: 74px; --safe: env(safe-area-inset-bottom);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { background: var(--night); color: var(--white); overflow-x: clip; }
body { font-family: Digits, Letters, Kufi, system-ui, sans-serif; font-size: 15px; line-height: 1.75; min-height: 100vh; min-height: 100dvh; overflow-x: clip; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }

/* ---------- the sky behind everything: stars, a crescent, the Dome at the foot */
.sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background: radial-gradient(120% 70% at 50% 0%, #1b2a5c 0%, #0d1735 45%, #070d22 100%); }
.sky canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.sky .moon { position: absolute; top: 46px; inset-inline-start: 34px; width: 44px; height: 44px; border-radius: 50%; box-shadow: -10px 6px 0 0 #fbefc9; transform: rotate(-20deg); opacity: .95; }
.sky .moon::after { content: ''; position: absolute; inset: -30px; border-radius: 50%; background: radial-gradient(circle, rgba(251,239,201,.18), transparent 65%); }
.sky .dome { position: absolute; left: 50%; bottom: -2px; width: min(820px, 150vw); transform: translateX(-50%); opacity: .5;
  -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent 100%); mask-image: linear-gradient(180deg, #000 40%, transparent 100%); }
.sky .mist { position: absolute; left: 0; right: 0; bottom: 0; height: 40vh;
  background: linear-gradient(180deg, rgba(7,13,34,0) 0%, rgba(7,13,34,.75) 70%, var(--night) 100%); }
body.inapp .sky .dome { opacity: .16; }

/* ---------- layout */
.app { position: relative; z-index: 1; width: min(100%, 620px); margin: 0 auto; padding: 18px 16px calc(var(--tabs) + 28px + var(--safe)); }
.view { animation: rise .45s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.top .logo { height: 30px; }
.top .team { margin-inline-start: auto; text-align: end; line-height: 1.35; }
.top .team b { display: block; font-weight: 700; font-size: 14px; max-width: 46vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .team span { font-size: 12px; color: var(--soft); }
.ttl { font-weight: 800; font-size: 22px; line-height: 1.4; }
.sub { color: var(--soft); font-size: 14px; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 12px; letter-spacing: .3px; color: var(--gold); }
.kicker::before { content: ''; width: 18px; height: 1.5px; background: currentColor; opacity: .7; }
.card { background: var(--glass); border: 1px solid var(--line2); border-radius: var(--r); padding: 18px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.card + .card { margin-top: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 22px; border: 0; border-radius: 999px; cursor: pointer;
  font-weight: 700; font-size: 16px; color: #241a0e; background: linear-gradient(180deg, var(--gold2), var(--gold)); box-shadow: 0 10px 26px rgba(230,192,106,.25), inset 0 1px 0 rgba(255,255,255,.6);
  transition: transform .12s, box-shadow .2s, opacity .2s; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; }
.btn.wide { width: 100%; }
.btn.ghost { background: transparent; color: var(--white); border: 1px solid var(--line); box-shadow: none; }
.btn.green { background: linear-gradient(180deg, var(--green2), var(--green)); color: #fff; box-shadow: 0 10px 26px rgba(11,106,66,.35); }
.btn svg { width: 20px; height: 20px; flex: 0 0 auto; }
.btn.small { min-height: 40px; font-size: 14px; padding: 0 16px; }
.link { background: none; border: 0; color: var(--gold); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- landing / team code */
.hero { text-align: center; padding: 6vh 4px 0; }
.hero .logo { height: 40px; margin: 0 auto 26px; }
.hero h1 { font-family: Ruqaa, Kufi, serif; font-weight: 700; font-size: clamp(54px, 15vw, 84px); line-height: 1.25; color: var(--gold2);
  text-shadow: 0 0 30px rgba(230,192,106,.35); }
.hero .lead { font-size: 16px; color: var(--sand); margin-top: 4px; }
.hero .welcome { margin: 22px auto 0; max-width: 460px; font-size: 14px; color: var(--soft); }
.codebox { margin: 30px auto 0; max-width: 420px; text-align: center; }
.codebox label { display: block; font-weight: 600; font-size: 14px; color: var(--sand); margin-bottom: 12px; }
.digits { display: flex; justify-content: center; gap: 8px; direction: ltr; }
.digits input { width: 48px; height: 60px; border-radius: 14px; border: 1.5px solid var(--line); background: rgba(255,255,255,.06); text-align: center;
  font-size: 26px; font-weight: 700; color: var(--gold2); outline: none; transition: border-color .15s, background .15s, transform .15s; caret-color: var(--gold); }
.digits input:focus { border-color: var(--gold); background: rgba(230,192,106,.1); }
.digits.bad input { border-color: #e5484d; animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.codebox .msg { min-height: 1.6em; margin-top: 10px; font-size: 13px; color: #ff9a9e; }
.codebox .btn { margin-top: 8px; width: 100%; }
.how { margin: 34px auto 0; max-width: 460px; text-align: start; }
.how summary { cursor: pointer; font-weight: 600; color: var(--gold); list-style: none; text-align: center; }
.how summary::-webkit-details-marker { display: none; }
.how ol { counter-reset: s; list-style: none; margin-top: 14px; display: grid; gap: 10px; }
.how li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; font-size: 14px; color: var(--sand); }
.how li::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); color: var(--gold); font-weight: 700; }

/* ---------- journey */
.progress { display: grid; grid-template-columns: 92px 1fr; gap: 16px; align-items: center; }
.ring { position: relative; width: 92px; height: 92px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; }
.ring .bg { stroke: rgba(255,255,255,.08); }
.ring .fg { stroke: var(--gold); stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.2,.7,.2,1); filter: drop-shadow(0 0 6px rgba(230,192,106,.5)); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 20px; line-height: 1; }
.ring b small { display: block; font-weight: 500; font-size: 11px; color: var(--soft); margin-top: 3px; text-align: center; }
.progress .what b { font-weight: 700; font-size: 17px; display: block; }
.progress .what span { color: var(--soft); font-size: 13px; }

/* the riddle: a parchment card */
.scroll { position: relative; margin-top: 16px; padding: 26px 22px 20px; border-radius: 6px 6px 18px 18px; color: var(--ink);
  background: radial-gradient(120% 90% at 20% 0%, #fbf3df 0%, var(--sand) 55%, var(--sand2) 100%);
  box-shadow: 0 24px 60px rgba(0,0,0,.45), inset 0 0 0 1px rgba(120,90,40,.25), inset 0 0 50px rgba(150,110,50,.18); }
.scroll::before, .scroll::after { content: ''; position: absolute; left: -6px; right: -6px; height: 16px; border-radius: 10px;
  background: linear-gradient(180deg, #c9a660, #8f6c2c); box-shadow: 0 3px 8px rgba(0,0,0,.35); }
.scroll::before { top: -8px; } .scroll::after { bottom: -8px; }
.scroll .rhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.scroll h3 { font-family: Ruqaa, Kufi, serif; font-weight: 700; font-size: 30px; line-height: 1.3; color: #5b3d14; }
.scroll .num { font-weight: 700; font-size: 12px; color: #7b5a26; border: 1px solid rgba(123,90,38,.4); border-radius: 999px; padding: 1px 10px; white-space: nowrap; }
.scroll .rtext { margin-top: 10px; font-size: 17px; line-height: 2; white-space: pre-line; font-weight: 500; }
.scroll .rimg { margin-top: 14px; border-radius: 10px; border: 1px solid rgba(120,90,40,.25); }
.scroll .hintbox { margin-top: 14px; padding: 10px 14px; border-radius: 10px; background: rgba(123,90,38,.1); border: 1px dashed rgba(123,90,38,.45); font-size: 14px; color: #5b3d14; }
.scroll .ractions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.scroll .ractions .btn.ghost { color: #5b3d14; border-color: rgba(123,90,38,.45); }
.scroll .placeholder { color: #8a7350; font-style: normal; }

/* steps so far */
.steps { margin-top: 22px; }
.steps h4 { font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.steplist { display: grid; gap: 10px; }
.stepitem { display: grid; grid-template-columns: 46px 1fr 50px; gap: 12px; align-items: center; width: 100%; text-align: start; cursor: pointer;
  background: var(--glass); border: 1px solid var(--line2); border-radius: 16px; padding: 10px 12px 10px 14px; transition: background .15s, border-color .15s; }
.stepitem:hover { background: var(--glass2); border-color: var(--line); }
.stepitem .n { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: var(--gold2); background: rgba(230,192,106,.1); border: 1px solid var(--line); }
.stepitem b { display: block; font-weight: 700; font-size: 15px; }
.stepitem span { font-size: 12px; color: var(--soft); }
.stepitem .pz svg { width: 50px; height: auto; filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); }
.stepitem .t { min-width: 0; }
.stepitem .t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { text-align: center; color: var(--soft); font-size: 14px; padding: 18px; }

/* ---------- the station: four boxes opened one after another */
.sheet { position: fixed; inset: 0; z-index: 30; overflow-y: auto; overscroll-behavior: contain; background: rgba(5,9,24,.96);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade .25s ease both; }
@keyframes fade { from { opacity: 0; } }
.sheet .inner { width: min(100%, 620px); margin: 0 auto; padding: 16px 16px calc(40px + var(--safe)); }
.sheet .bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 10px 0; background: linear-gradient(180deg, rgba(5,9,24,.98) 70%, rgba(5,9,24,0)); }
.sheet .bar .close { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line2); background: var(--glass); display: grid; place-items: center; cursor: pointer; }
.sheet .bar .close svg { width: 20px; height: 20px; }
.sheet .bar .dots { margin-inline-start: auto; display: flex; gap: 6px; }
.sheet .bar .dots i { width: 26px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.12); transition: background .3s; }
.sheet .bar .dots i.on { background: var(--gold); }
.unlock { text-align: center; padding: 10px 0 8px; }
.unlock .badge { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px; border-radius: 999px; background: rgba(230,192,106,.12); border: 1px solid var(--line); color: var(--gold2); font-weight: 600; font-size: 13px; }
.unlock h2 { margin-top: 10px; font-weight: 800; font-size: clamp(26px, 8vw, 36px); line-height: 1.35; }
.unlock .rays { position: relative; height: 150px; margin-top: 4px; }
.unlock .rays::before { content: ''; position: absolute; left: 50%; top: 50%; width: 260px; height: 260px; transform: translate(-50%, -50%);
  background: conic-gradient(from 0deg, rgba(230,192,106,.0), rgba(230,192,106,.25), rgba(230,192,106,0) 12%, rgba(230,192,106,.18) 25%, rgba(230,192,106,0) 37%, rgba(230,192,106,.22) 50%, rgba(230,192,106,0) 62%, rgba(230,192,106,.18) 75%, rgba(230,192,106,0) 87%, rgba(230,192,106,.25));
  border-radius: 50%; -webkit-mask-image: radial-gradient(circle, #000 20%, transparent 70%); mask-image: radial-gradient(circle, #000 20%, transparent 70%); animation: spin 18s linear infinite; }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.unlock .rays .jigsaw { position: relative; height: 140px; width: auto; margin: 0 auto; animation: pop .9s cubic-bezier(.2,1.4,.4,1) both .15s; filter: drop-shadow(0 10px 24px rgba(0,0,0,.6)); }
@keyframes pop { from { transform: scale(.3) rotate(-25deg); opacity: 0; } }
.box { margin-top: 16px; border-radius: var(--r); border: 1px solid var(--line2); background: var(--glass); overflow: hidden; }
.box > header { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.box > header .bn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #241a0e; background: var(--gold); flex: 0 0 auto; }
.box > header b { font-weight: 700; font-size: 16px; }
.box > header span { display: block; font-size: 12px; color: var(--soft); line-height: 1.4; }
.box .bc { padding: 0 16px 18px; }
.box.locked { border-style: dashed; background: transparent; }
.box.locked > header .bn { background: rgba(255,255,255,.1); color: var(--soft); }
.box.locked .bc { display: none; }
.box .open { width: 100%; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.novideo { display: grid; place-items: center; text-align: center; aspect-ratio: 16 / 7; border-radius: 14px; border: 1px dashed var(--line); color: var(--soft); font-size: 14px; padding: 16px; }
.about p { margin-top: 10px; font-size: 16px; line-height: 2; color: var(--sand); }
.about p:first-child { margin-top: 0; }
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: 82%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin-top: 14px; padding-bottom: 6px; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; scroll-snap-align: start; }
.piecebox { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; }
.piecebox .jigsaw.single { width: 120px; height: auto; filter: drop-shadow(0 8px 20px rgba(0,0,0,.6)); }
.piecebox p { font-size: 14px; color: var(--sand); }
.mini { margin-top: 14px; }

/* ---------- the jigsaw */
.jigsaw { display: block; width: 100%; height: auto; }
.jigsaw .board { fill: rgba(5,9,24,.65); stroke: var(--line); stroke-width: 2; }
.jigsaw .hole { fill: rgba(255,255,255,.035); stroke: rgba(230,192,106,.35); stroke-width: 1.6; stroke-dasharray: 5 5; }
.jigsaw .num { fill: rgba(230,192,106,.55); font: 700 26px Digits, Kufi, sans-serif; dominant-baseline: central; text-anchor: middle; }
.jigsaw .edge { fill: none; stroke: rgba(255,248,230,.55); stroke-width: 1.2; }
.jigsaw .pc.focus { animation: piecein .9s cubic-bezier(.2,1.2,.4,1) both; transform-box: fill-box; transform-origin: center; }
.jigsaw .pc.focus .edge { stroke: var(--gold2); stroke-width: 3.5; filter: drop-shadow(0 0 6px rgba(246,223,160,.9)); }
@keyframes piecein { from { opacity: 0; transform: scale(1.15); } }
.canvasview .jigsaw { filter: drop-shadow(0 30px 60px rgba(0,0,0,.55)); }
.canvasview .cap { text-align: center; margin-top: 14px; color: var(--soft); font-size: 14px; }
.complete .jigsaw .edge { stroke: transparent; }

/* ---------- the map (parchment) */
.mapwrap { position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #e9dcbd; height: min(72vh, 760px); touch-action: none; }
.mapwrap svg { width: 100%; height: 100%; display: block; cursor: grab; user-select: none; -webkit-user-select: none; }
.mapwrap .ctrl { position: absolute; top: 12px; inset-inline-end: 12px; display: grid; gap: 8px; }
.mapwrap .ctrl button { width: 40px; height: 40px; border-radius: 12px; border: 1px solid rgba(90,60,20,.25); background: rgba(255,250,236,.92); color: #4a3517; font-size: 20px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 14px rgba(60,40,10,.2); }
.mapnote { margin-top: 12px; font-size: 13px; color: var(--soft); text-align: center; }
.aqsamap .paper { fill: #efe3c6; }
.aqsamap .grid { stroke: rgba(120,90,40,.08); stroke-width: 1; }
.aqsamap .pave { stroke: rgba(120,90,40,.12); stroke-width: .8; }
.aqsamap .quarter { fill: rgba(150,110,60,.12); stroke: rgba(120,90,40,.3); stroke-width: 1; stroke-dasharray: 4 4; }
.aqsamap .cemetery { fill: rgba(90,110,60,.12); stroke: rgba(90,110,60,.3); stroke-dasharray: 3 4; }
.aqsamap .court { fill: #f4ead0; }
.aqsamap .tree.olive { fill: #8fa064; opacity: .75; }
.aqsamap .tree.cypress { fill: #4f6b3e; opacity: .8; }
.aqsamap .platform { fill: #eadbb5; stroke: #b4955c; stroke-width: 2; }
.aqsamap .arch { fill: #f8f0db; stroke: #9b7c45; stroke-width: 1.4; }
.aqsamap .bldg { fill: #dccaa0; stroke: #7d6236; stroke-width: 1.6; }
.aqsamap .bldg.rock { fill: #3f7f9a; stroke: #24536a; stroke-width: 2.2; }
.aqsamap .bldg.small { fill: #d6c193; }
.aqsamap .bldg.qibli { fill: #d8c49a; }
.aqsamap .porch { fill: #c9b285; stroke: #7d6236; stroke-width: 1.2; }
.aqsamap .under { fill: rgba(125,98,54,.12); stroke: #7d6236; stroke-width: 1.4; stroke-dasharray: 6 4; }
.aqsamap .dome { stroke: rgba(70,50,20,.5); stroke-width: 1.2; }
.aqsamap .water { fill: #8fc3d8; stroke: #4c8aa3; stroke-width: 1.4; }
.aqsamap .wall { fill: none; stroke: #6d5128; stroke-width: 9; stroke-linejoin: round; }
.aqsamap .buraq { stroke: #b8913d; stroke-width: 11; stroke-linecap: round; }
.aqsamap .gate circle { fill: #f4ead0; stroke: #6d5128; stroke-width: 2.4; }
.aqsamap .minaret circle { fill: #f4ead0; stroke: #6d5128; stroke-width: 2; }
.aqsamap .minaret .mt { fill: #6d5128; stroke: none; }
.aqsamap .lb { font-family: Kufi, sans-serif; font-weight: 600; font-size: 15px; fill: #4a3517; paint-order: stroke; stroke: #f4ead0; stroke-width: 4px; stroke-linejoin: round; }
.aqsamap .lb.big { font-weight: 800; font-size: 19px; }
.aqsamap .lb.sm { font-size: 12.5px; }
.aqsamap .lb.tiny { font-size: 11px; font-weight: 500; }
.aqsamap .lb.gt { font-size: 12px; fill: #6d5128; }
.aqsamap .lb.out { fill: #7d6236; font-weight: 700; }
.aqsamap .lb.gold { fill: #8a6a22; font-weight: 800; }
.aqsamap .lb.lt { stroke: #dccaa0; }
.aqsamap .compass circle { fill: rgba(255,250,236,.7); stroke: #7d6236; stroke-width: 1.5; }
.aqsamap .compass path { fill: #7d6236; }
.aqsamap .scale path { stroke: #6d5128; stroke-width: 2; fill: none; }
.aqsamap .pin { cursor: pointer; }
.aqsamap .pin .glow { fill: rgba(230,192,106,.55); }
.aqsamap .pin .drop { fill: #0b6a42; stroke: #f6dfa0; stroke-width: 2.4; }
.aqsamap .pin.latest .drop { fill: #c8232b; }
.aqsamap .pin.latest .glow { animation: glowp 1.8s ease-in-out infinite; }
@keyframes glowp { 50% { opacity: .2; } }
.aqsamap .pin .pn { fill: #fff; font: 800 15px Digits, Kufi, sans-serif; }
.aqsamap.picking { cursor: crosshair; }
.aqsamap .picked circle:first-child { fill: rgba(200,35,43,.25); stroke: #c8232b; stroke-width: 2.5; }
.aqsamap .picked circle:last-child { fill: #c8232b; }

/* ---------- teams */
.teams { display: grid; gap: 10px; }
.teamrow { display: grid; grid-template-columns: 30px 64px 1fr; gap: 12px; align-items: center; width: 100%; text-align: start; cursor: pointer;
  background: var(--glass); border: 1px solid var(--line2); border-radius: 16px; padding: 10px 12px; transition: background .15s, border-color .15s; }
.teamrow:hover { background: var(--glass2); border-color: var(--line); }
.teamrow.me { border-color: var(--gold); background: rgba(230,192,106,.08); }
.teamrow .rank { font-weight: 800; color: var(--gold); text-align: center; }
.teamrow .thumb { width: 64px; }
.teamrow b { display: block; font-weight: 700; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.teamrow .bar2 { height: 6px; border-radius: 3px; background: rgba(255,255,255,.1); margin-top: 6px; overflow: hidden; }
.teamrow .bar2 i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--gold), var(--gold2)); }
.teamrow span { font-size: 12px; color: var(--soft); }
.modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 18px; background: rgba(3,6,16,.8); animation: fade .2s ease both; }
.modal .panel { width: min(100%, 480px); max-height: 92vh; overflow: auto; border-radius: 24px; padding: 18px; background: #0d1631; border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.modal .panel h3 { font-weight: 800; font-size: 18px; margin-bottom: 4px; }
.modal .panel .acts { display: flex; gap: 10px; margin-top: 16px; }
.modal .panel .acts .btn { flex: 1; }
.notice { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center; }
.notice .ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: rgba(230,192,106,.12); color: var(--gold); }
.notice .ic svg { width: 28px; height: 28px; }

/* ---------- scanner */
.scanner { position: relative; border-radius: var(--r); overflow: hidden; background: #000; aspect-ratio: 3 / 4; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scanner .frame { position: absolute; inset: 18%; border-radius: 22px; box-shadow: 0 0 0 999px rgba(0,0,0,.45); border: 2px solid var(--gold); }
.manual { display: flex; gap: 8px; margin-top: 14px; }
.manual input { font-family: Latin, Kufi, sans-serif; flex: 1; min-width: 0; height: 50px; border-radius: 14px; border: 1.5px solid var(--line); background: rgba(255,255,255,.06); padding: 0 14px; font-size: 18px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase; direction: ltr; text-align: center; color: var(--gold2); outline: none; }
.manual input:focus { border-color: var(--gold); }

/* ---------- bottom tabs */
.tabs { position: fixed; z-index: 20; left: 50%; bottom: calc(12px + var(--safe)); transform: translateX(-50%); width: min(calc(100% - 24px), 520px);
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px; border-radius: 22px; background: rgba(13,22,49,.86); border: 1px solid var(--line2);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 16px 40px rgba(0,0,0,.45); }
.tabs button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 4px 6px; border: 0; border-radius: 16px; background: none; cursor: pointer;
  color: var(--soft); font-weight: 600; font-size: 12px; line-height: 1.3; transition: background .15s, color .15s; }
.tabs button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs button.on { color: var(--gold2); background: rgba(230,192,106,.12); }

/* ---------- finale */
.finale { text-align: center; }
.finale h2 { font-family: Ruqaa, Kufi, serif; font-size: 44px; line-height: 1.3; color: var(--gold2); }
.finale p { color: var(--sand); margin-top: 6px; }

/* ---------- logo intro and the page loading bar */
#intro { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: radial-gradient(120% 90% at 50% 47%, #fff 0%, #f8f7f3 62%, #eeebe4 100%); transition: opacity .6s ease; }
#intro.out { opacity: 0; pointer-events: none; }
.loadbar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 70; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .2s; }
.loadbar.on { opacity: 1; }
.loadbar::before { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; background: linear-gradient(90deg, transparent, var(--gold), transparent); animation: lb 1.1s ease-in-out infinite; }
@keyframes lb { from { right: -40%; } to { right: 100%; } }
.toast { position: fixed; z-index: 80; left: 50%; bottom: calc(var(--tabs) + 30px + var(--safe)); transform: translate(-50%, 10px); max-width: 90vw; padding: 10px 18px; border-radius: 14px;
  background: #f6ecd6; color: var(--ink); font-weight: 600; font-size: 14px; box-shadow: 0 14px 34px rgba(0,0,0,.4); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 900px) { .app { width: min(100%, 680px); padding-top: 28px; } .tabs { width: 520px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- added with the app script */
svg.i { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.c { text-align: center; }
.kicker.c { justify-content: center; }
.kicker.c::after { content: ''; width: 18px; height: 1.5px; background: currentColor; opacity: .7; }
body.wait .app, body.wait .tabs { opacity: 0; }
.app, .tabs { transition: opacity .6s ease; }
body.locked { overflow: hidden; }
.sky .tw { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff8e1; box-shadow: 0 0 6px 1px rgba(255,240,200,.75); animation: tw 4s ease-in-out infinite; }
@keyframes tw { 50% { opacity: .12; transform: scale(.5); } }
.motes { position: fixed; inset: 0; z-index: 45; width: 100%; height: 100%; pointer-events: none; }

.hero .kicker { margin-bottom: 4px; }
.hero .lost { margin-top: 12px; font-size: 12.5px; color: var(--soft); }
.pending { display: flex; align-items: center; gap: 12px; max-width: 420px; margin: 22px auto 0; padding: 12px 16px; border-radius: 16px; text-align: start;
  background: rgba(230,192,106,.12); border: 1px solid var(--gold); animation: glowb 2.4s ease-in-out infinite; }
.pending svg { width: 30px; height: 30px; color: var(--gold2); flex: 0 0 auto; }
.pending b { display: block; font-weight: 700; color: var(--gold2); }
.pending span { font-size: 13px; color: var(--sand); }
@keyframes glowb { 50% { box-shadow: 0 0 24px rgba(230,192,106,.3); } }
.soon { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; font-size: 13px; color: var(--soft); }
.soon svg { width: 18px; height: 18px; color: var(--gold); flex: 0 0 auto; }
.how summary { display: flex; align-items: center; justify-content: center; gap: 8px; }
.how summary svg { width: 20px; height: 20px; }

.vhead { margin-bottom: 16px; }
.vhead .sub { margin-top: 4px; }
.card.notice.wait .ic { animation: glowb 2.4s ease-in-out infinite; }
.card.notice b { display: block; font-weight: 700; }
.card.offline { text-align: center; margin-top: 30vh; }
.card.offline .btn { margin-top: 14px; }
.progress .what { min-width: 0; }

.scroll .ractions .btn svg { width: 20px; height: 20px; }
.answer { display: flex; align-items: center; gap: 8px; margin: 14px 0 12px; padding: 10px 14px; border-radius: 12px; background: rgba(11,106,66,.18); border: 1px solid rgba(15,133,83,.5); font-size: 14px; }
.answer svg { width: 22px; height: 22px; color: #5fd49b; flex: 0 0 auto; }
.done { text-align: center; padding: 6px 0 14px; }
.done h3 { font-family: Ruqaa, Kufi, serif; font-size: 40px; line-height: 1.3; color: var(--gold2); }
.done p { color: var(--sand); }
.onmap { margin-top: 14px; }
.onmap svg { width: 18px; height: 18px; }
.box .next { margin-top: 18px; }
.box.opening { animation: boxin .6s cubic-bezier(.2,.8,.2,1) both; border-color: var(--line); }
@keyframes boxin { from { opacity: .3; transform: translateY(12px); } }
.box > header .bn svg { width: 16px; height: 16px; }
.box.locked > header b { color: var(--soft); }
.novideo > div { display: grid; justify-items: center; gap: 4px; }
.novideo svg { width: 34px; height: 34px; color: var(--gold); opacity: .8; }
.novideo b { color: var(--sand); font-weight: 600; }
.novideo span { font-size: 12.5px; }
.unlock.fresh h2 { animation: rise .7s .2s cubic-bezier(.2,.7,.2,1) both; }
.unlock .badge svg { width: 16px; height: 16px; }
.sheet .bar > b { font-weight: 700; font-size: 15px; }

.canvasview { position: relative; }
.v-canvas .canvasview { margin: 0 auto; max-width: 460px; cursor: pointer; }
.finale .canvasview { margin: 16px auto 10px; max-width: 380px; }
.finale > p { margin-top: 8px; }

.mapwrap .mapempty { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  color: #4a3517; background: rgba(255,250,236,.92); box-shadow: 0 4px 14px rgba(60,40,10,.2); white-space: nowrap; pointer-events: none; }
.mapwrap .ctrl button svg { width: 20px; height: 20px; }
.mapwrap .ctrl button { display: grid; place-items: center; }
.mapnote { display: flex; align-items: center; justify-content: center; gap: 8px; }
.mapnote svg { width: 16px; height: 16px; color: var(--gold); flex: 0 0 auto; }
.aqsamap .trail { fill: none; stroke: #c8232b; stroke-width: 3.2; stroke-dasharray: 1 9; stroke-linecap: round; opacity: .75; }

.teamrow .t { min-width: 0; }
.teamrow em { font-style: normal; font-size: 11px; font-weight: 600; color: #241a0e; background: var(--gold); border-radius: 999px; padding: 0 8px; margin-inline-start: 6px; vertical-align: 2px; }
.teamrow .thumb svg { width: 64px; height: auto; }

.modal .mhead { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.modal .mhead .ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(230,192,106,.12); color: var(--gold); flex: 0 0 auto; }
.modal .mhead .ic svg { width: 24px; height: 24px; }
.modal .mhead h3 { margin: 0; overflow-wrap: anywhere; }
.modal .mtext { color: var(--sand); font-size: 15px; }
.modal .code { font-weight: 800; font-size: 22px; letter-spacing: 3px; color: var(--gold2); }
.modal .sub { margin-top: 8px; }
.modal.teamcanvas .canvasview { margin-top: 8px; }
.scanpanel .scanner { margin: 6px 0 4px; }
.scanner .camwait { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; color: var(--soft); font-size: 13px; }
.scanner .camwait svg { width: 36px; height: 36px; }
.manual .btn { min-height: 50px; }
/* ---------- fixes after the first screenshots */
.top .team { background: none; border: 0; color: inherit; cursor: pointer; padding: 2px 0; font: inherit; text-align: end; }
.top .team:active { opacity: .7; }
body.inapp .sky .moon { display: none; }
.manual input::placeholder { letter-spacing: 0; font-weight: 500; color: rgba(246,223,160,.45); }
