@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&display=swap');
/* Islamic 3D theme — presentation only. Loaded last; no JS hooks, ids or logic are changed.
   Palette (split-complementary): emerald + teal base, gold accent, cream neutral, terracotta for destructive. */
:root{
 --green:#0f5a4b;--deep:#0a2f2a;--lime:#f0d58a;--paper:#faf6ea;--ink:#12302b;--muted:#5c6e66;--border:#e3d9ba;
 --emerald:#0b3d35;--teal:#1b8379;--turq:#56c7b6;--gold:#c9a14a;--gold-2:#f0d58a;--gold-3:#8f6a1f;--sand:#f1e8cd;--terra:#b0533e;
 --star-tile:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23c9a14a' stroke-opacity='.34' stroke-width='1'%3E%3Crect x='14' y='14' width='36' height='36'/%3E%3Crect x='14' y='14' width='36' height='36' transform='rotate(45 32 32)'/%3E%3Ccircle cx='32' cy='32' r='6'/%3E%3C/g%3E%3C/svg%3E");
 --star-big:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cg fill='none' stroke='%23c9a14a' stroke-width='1.2'%3E%3Crect x='40' y='40' width='120' height='120'/%3E%3Crect x='40' y='40' width='120' height='120' transform='rotate(45 100 100)'/%3E%3Crect x='62' y='62' width='76' height='76'/%3E%3Crect x='62' y='62' width='76' height='76' transform='rotate(45 100 100)'/%3E%3Ccircle cx='100' cy='100' r='96'/%3E%3Ccircle cx='100' cy='100' r='38'/%3E%3C/g%3E%3C/svg%3E");
 --octagram:polygon(50% 0,61% 20%,85% 15%,80% 39%,100% 50%,80% 61%,85% 85%,61% 80%,50% 100%,39% 80%,15% 85%,20% 61%,0 50%,20% 39%,15% 15%,39% 20%);
}
@keyframes spin{to{transform:rotate(360deg)}}
@keyframes rise{from{opacity:0;transform:translateY(28px) rotateX(-12deg)}}
@keyframes ringspin{to{transform:rotateY(-360deg)}}
@keyframes globespin{from{transform:rotateZ(23deg) rotateY(0)}to{transform:rotateZ(23deg) rotateY(360deg)}}
@keyframes bob{0%,100%{transform:translateY(-7px) rotateX(-17deg) rotateZ(-10deg)}50%{transform:translateY(9px) rotateX(-17deg) rotateZ(-10deg)}}
@keyframes twinkle{from{opacity:.25}to{opacity:1}}
@keyframes slide{to{background-position:128px 0}}
@keyframes halo{0%{box-shadow:0 0 0 0 #f0d58acc,0 0 14px #f0d58a}100%{box-shadow:0 0 0 22px #f0d58a00,0 0 14px #f0d58a}}
@keyframes shine{0%,62%{left:-60%}100%{left:140%}}
@keyframes drift{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}

/* ---------- base ---------- */
body{background:radial-gradient(1100px 560px at 88% -8%,#bfe6dc70,transparent 62%),radial-gradient(800px 480px at -8% 34%,#f0d58a45,transparent 62%),var(--paper);color:var(--ink)}
body::before{content:'';position:fixed;inset:0;z-index:-1;pointer-events:none;background:var(--star-tile);background-size:64px;opacity:.55;-webkit-mask-image:linear-gradient(#000,#0000 85%);mask-image:linear-gradient(#000,#0000 85%)}
h1,h2{font-family:Amiri,Manrope,serif}
.eyebrow{color:var(--gold-3);letter-spacing:2.4px}
.eyebrow:before{content:'✦';margin-right:8px;color:var(--gold)}

/* ---------- header / footer ---------- */
header{border-bottom:0;background:linear-gradient(#fffdf5e6,#fffdf500)}
header:after{content:'';position:absolute;left:6%;right:6%;bottom:0;height:1px;background:linear-gradient(90deg,#0000,var(--gold),#0000)}
.brand-icon{width:46px;height:46px;border-radius:15px;background:linear-gradient(145deg,#1b8379,#0a2f2a);color:var(--gold-2);box-shadow:inset 0 1px 0 #ffffff55,0 6px 14px #0a2f2a55,0 0 0 2px var(--gold)}
.brand-icon svg{width:28px;height:28px;animation:spin 40s linear infinite}
.icon-button{background:linear-gradient(#fffdf5,#f1e8cd);border-color:#d8c88e;box-shadow:0 3px 0 #d3c28a;border-radius:14px}
nav{background:#fffdf6;border-color:#dccb92;border-radius:16px;box-shadow:0 18px 40px #0a2f2a30}
footer{border-top:0;background:linear-gradient(#0000,#0a2f2a12);position:relative}
footer:before{content:'✦  ✦  ✦';position:absolute;top:-9px;left:50%;transform:translateX(-50%);color:var(--gold);letter-spacing:10px;font-size:12px;background:var(--paper);padding:0 14px;line-height:1}
footer>span{color:var(--gold-3)}

/* ---------- buttons: pressable 3D keys ---------- */
.primary:not(.focus-icon){position:relative;overflow:hidden;background:linear-gradient(180deg,#16806b,#0b4338);border:1px solid #072a24;border-radius:12px;box-shadow:inset 0 1px 0 #ffffff38,0 4px 0 #072a24,0 12px 22px #0a2f2a40;transition:transform .15s,box-shadow .15s,filter .2s}
.primary:not(.focus-icon):hover{background:linear-gradient(180deg,#1a937b,#0d4f42);transform:translateY(-1px);filter:saturate(1.1)}
.primary:not(.focus-icon):active{transform:translateY(3px);box-shadow:inset 0 1px 0 #ffffff30,0 1px 0 #072a24,0 4px 8px #0a2f2a40}
.primary:not(.focus-icon):disabled{box-shadow:inset 0 1px 0 #ffffff20,0 4px 0 #072a2455;filter:grayscale(.5)}
.primary:not(.focus-icon):not(:disabled):after{content:'';position:absolute;top:0;bottom:0;left:-60%;width:36%;background:linear-gradient(100deg,#0000,#ffffff3d,#0000);transform:skewX(-20deg);animation:shine 5.5s ease-in-out infinite;pointer-events:none}
.secondary:not(.focus-icon){background:linear-gradient(180deg,#fffcf1,#efe4c4);color:var(--green);border:1px solid #d8c88e;border-radius:12px;box-shadow:inset 0 1px 0 #fff,0 3px 0 #d3c28a,0 8px 16px #8f6a1f1f;transition:transform .15s,box-shadow .15s}
.secondary:not(.focus-icon):hover{transform:translateY(-1px)}
.secondary:not(.focus-icon):active{transform:translateY(2px);box-shadow:0 1px 0 #d3c28a}
.text-button{color:var(--green)}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline-color:var(--gold)}

/* ---------- hero ---------- */
.welcome{position:relative;isolation:isolate}
.welcome:before{content:'';position:absolute;z-index:-1;left:-14%;top:-8%;width:640px;height:640px;background:var(--star-big) center/contain no-repeat;opacity:.42;animation:spin 45s linear infinite;pointer-events:none}
.welcome h1{font-weight:700;letter-spacing:-.5px;line-height:1.1;font-size:clamp(42px,4.8vw,70px);color:var(--emerald);margin:20px 0}
.welcome h1:after{content:'';display:block;width:110px;height:4px;margin-top:20px;border-radius:4px;background:linear-gradient(90deg,var(--gold),var(--gold-2),#0000)}
.intro{color:var(--muted)}
.hero-copy>*{animation:rise .85s cubic-bezier(.2,.8,.2,1) backwards}
.hero-copy>:nth-child(2){animation-delay:.1s}.hero-copy>:nth-child(3){animation-delay:.2s}.hero-copy>:nth-child(4){animation-delay:.3s}.hero-copy>:nth-child(5){animation-delay:.4s}
.hero-note>span:first-child{color:var(--gold)}

.hero-art{--R:200px;--W:128px;--H:148px;--g:150px;height:540px;border-radius:230px 230px 24px 24px;perspective:1500px;background:radial-gradient(ellipse at 50% 42%,#1d8a7e 0,#0e4a42 40%,#06211e 100%);box-shadow:inset 0 0 0 2px var(--gold),inset 0 0 0 9px #06211e,inset 0 0 0 10px #c9a14a88,0 34px 60px -10px #0a2f2a66;animation:rise 1s .2s cubic-bezier(.2,.8,.2,1) backwards}
.hero-art:before{content:'';position:absolute;left:50%;top:50%;width:420px;height:420px;transform:translate(-50%,-50%);background:radial-gradient(circle,#f0d58a50,#0000 66%);pointer-events:none}
.art-grid{background-image:var(--star-tile);background-size:64px;opacity:.75;mask-image:linear-gradient(#0000,#000 40%,#000)}
.stars{position:absolute;inset:0;pointer-events:none;background:radial-gradient(1.6px 1.6px at 12% 22%,var(--gold-2),#0000),radial-gradient(1.2px 1.2px at 80% 16%,#fff,#0000),radial-gradient(1.8px 1.8px at 66% 34%,var(--gold-2),#0000),radial-gradient(1.2px 1.2px at 24% 62%,#fff,#0000),radial-gradient(1.6px 1.6px at 90% 58%,var(--gold-2),#0000),radial-gradient(1.2px 1.2px at 8% 82%,#fff,#0000),radial-gradient(1.6px 1.6px at 52% 10%,var(--gold-2),#0000),radial-gradient(1.2px 1.2px at 74% 86%,#fff,#0000);animation:twinkle 3.6s ease-in-out infinite alternate}
.moon{position:absolute;top:84px;right:22%;width:36px;height:36px;border-radius:50%;box-shadow:-11px 5px 0 0 var(--gold-2);filter:drop-shadow(0 0 8px #f0d58a99);animation:drift 7s ease-in-out infinite}
.art-label{color:var(--gold-2);opacity:.85;letter-spacing:3px;z-index:3}
.art-coordinate{color:#9fd8cd;z-index:3}
.label-top{top:42px}

.stage{position:absolute;left:50%;top:50%;width:0;height:0;transform-style:preserve-3d;transform:rotateX(-17deg) rotateZ(-10deg);animation:bob 8s ease-in-out infinite}
.globe{position:absolute;left:0;top:0;width:0;height:0;transform-style:preserve-3d;transform:rotateZ(10deg) rotateX(17deg)}
.globe-body{position:absolute;left:calc(var(--g)/-2);top:calc(var(--g)/-2);width:var(--g);height:var(--g);border-radius:50%;overflow:hidden;background:radial-gradient(circle at 34% 28%,#8ae8d8 0,#2aa595 22%,#12665c 52%,#0a3a35 78%,#06211e 100%);box-shadow:inset -18px -20px 44px #031512d0,inset 10px 10px 30px #c8f8ee55,0 0 70px #56c7b650,0 0 0 1px #f0d58a77}
.globe-body:before{content:'';position:absolute;inset:0;background:var(--star-tile);background-size:64px;opacity:.9;animation:slide 12s linear infinite}
.globe-body:after{content:'';position:absolute;inset:0;border-radius:50%;background:radial-gradient(circle at 50% 50%,#0000 44%,#031512a0 100%),radial-gradient(circle at 30% 24%,#ffffff40,#0000 36%)}
.wire{position:absolute;left:0;top:0;width:0;height:0;transform-style:preserve-3d;animation:globespin 26s linear infinite}
.wire i{position:absolute;left:calc(var(--g)/-2);top:calc(var(--g)/-2);width:var(--g);height:var(--g);border:1px solid #f0d58a88;border-radius:50%;transform:rotateY(var(--a,0deg))}
.wire .l{--s:calc(var(--g)*var(--r));width:var(--s);height:var(--s);left:calc(var(--s)/-2);top:calc(var(--s)/-2);transform:rotateX(90deg) translateZ(calc(var(--g)*var(--y)/2));border-color:#f0d58a66}
.kaabah{position:absolute;left:calc(var(--g)*.16);top:calc(var(--g)*-.2);width:calc(var(--g)*.1);height:calc(var(--g)*.1);transform:translateZ(calc(var(--g)/2 + 4px));background:linear-gradient(145deg,#2a2a2a,#050505);border:1px solid var(--gold-2);animation:halo 2.6s ease-out infinite}
.kaabah:after{content:'';position:absolute;left:0;right:0;top:26%;height:14%;background:var(--gold)}

.ring{position:absolute;left:0;top:0;width:0;height:0;transform-style:preserve-3d;animation:ringspin 38s linear infinite}
.ring-card{position:absolute;left:calc(var(--W)/-2);top:calc(var(--H)/-2);width:var(--W);height:var(--H);transform-style:preserve-3d;transform:rotateY(calc(var(--i)*40deg)) translateZ(var(--R));border-radius:calc(var(--W)/2) calc(var(--W)/2) 10px 10px}
.ring-card:after{content:'';position:absolute;inset:0;border-radius:inherit;transform:rotateY(180deg);backface-visibility:hidden;-webkit-backface-visibility:hidden;border:2px solid #c9a14a99;background:var(--star-tile),linear-gradient(#0d4a41,#06211e);background-size:32px,auto}
.ring-card .face{position:absolute;inset:0;border-radius:inherit;backface-visibility:hidden;-webkit-backface-visibility:hidden;border:2px solid var(--gold);display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:6px;padding-bottom:13%;color:var(--gold-2);background:var(--star-tile),linear-gradient(170deg,#18806f,#0a3a35);background-size:32px,auto;box-shadow:inset 0 0 0 4px #0a2f2a66,0 10px 24px #0008}
.ring-card .face:before{content:'';position:absolute;inset:7px;border:1px solid #f0d58a66;border-radius:inherit}
.ring-card .face b{font-size:calc(var(--W)*.3);line-height:1;font-weight:400}
.ring-card .face span{font:800 calc(var(--W)*.082)/1 Manrope,sans-serif;letter-spacing:.18em}
.ring-card:nth-child(3n+2) .face{color:var(--emerald);background:var(--star-tile),linear-gradient(170deg,#fff7dd,#e8d089);background-size:32px,auto}
.ring-card:nth-child(3n+2) .face:before{border-color:#8f6a1f66}
.ring-card:nth-child(3n) .face{color:#06211e;background:var(--star-tile),linear-gradient(170deg,#7fe3d2,#1b8379);background-size:32px,auto}

/* ---------- feature cards ---------- */
.feature-row{border-top:0;gap:24px;perspective:900px;padding:56px 0 64px}
.feature-row article,.feature-row article+article{position:relative;background:linear-gradient(160deg,#fffdf6,#f1e8cd);border:1px solid #dccb92;border-radius:22px 22px 12px 12px;padding:34px 26px 28px;box-shadow:inset 0 1px 0 #fff,0 2px 0 #cdb877,0 22px 32px -14px #0a2f2a48;transform-style:preserve-3d;transition:transform .5s cubic-bezier(.2,.8,.2,1),box-shadow .5s;animation:rise .9s cubic-bezier(.2,.8,.2,1) backwards;animation-delay:.5s}
.feature-row article:nth-child(2){animation-delay:.65s}.feature-row article:nth-child(3){animation-delay:.8s}
.feature-row article:hover{transform:rotateX(6deg) rotateY(-9deg) translateY(-8px);box-shadow:inset 0 1px 0 #fff,0 2px 0 #cdb877,0 34px 40px -14px #0a2f2a60}
.feature-row article:nth-child(2):hover{transform:rotateX(6deg) translateY(-8px)}
.feature-row article:nth-child(3):hover{transform:rotateX(6deg) rotateY(9deg) translateY(-8px)}
.feature-row article:before{content:'';position:absolute;top:-20px;right:22px;width:46px;height:46px;background:linear-gradient(145deg,var(--gold-2),#b78a2c);clip-path:var(--octagram);animation:spin 36s linear infinite;transform:translateZ(40px)}
.feature-row article>span{display:block;color:var(--gold-3);transform:translateZ(26px)}
.feature-row h3{transform:translateZ(22px);color:var(--emerald)}
.feature-row p{transform:translateZ(12px)}

/* ---------- finder workspace ---------- */
.workspace-heading h1{letter-spacing:-.3px;font-weight:700;color:var(--emerald)}
.no-compass{background:linear-gradient(#fff7dd,#f0e0a8);color:var(--gold-3);border:1px solid #dccb92}
.steps li{border-bottom-color:#e3d9ba}
.steps b{border:0;clip-path:var(--octagram);width:30px;height:30px;background:#e8dec0;color:var(--muted)}
.steps .active{border-color:var(--gold)}
.steps .active b{background:linear-gradient(145deg,#16806b,#0a3a35);color:var(--gold-2);animation:drift 3.2s ease-in-out infinite}
.finder-active .steps{background:linear-gradient(#fffdf5,#faf6ea)}
.map-card{border-color:#dccb92;border-radius:18px;box-shadow:0 22px 40px -18px #0a2f2a55}
.map-footer{background:#fffdf6}
.dot{background:var(--gold)}
.location-card{background:linear-gradient(160deg,#fffdf6,#f1e8cd);border:1px solid #dccb92;border-radius:18px;box-shadow:inset 0 1px 0 #fff,0 18px 30px -16px #0a2f2a45}
.badge{background:#f0d58a77;color:var(--gold-3)}
.landmark-item{border-color:#e3d9ba;border-radius:12px;background:#fffdf6;transition:transform .2s,box-shadow .2s}
.landmark-item:hover{transform:translateY(-2px);box-shadow:0 10px 18px -8px #0a2f2a40}
.landmark-item.selected{border-color:var(--gold);background:#fff7dd}
.landmark-item .landmark-icon{background:linear-gradient(145deg,#fff1c4,#e8d089);color:var(--emerald)}
input{border-color:#d8c88e;background:#fffdf8}
#notice{background:#fff3cf;border-color:#dccb92}
.map-tool,.map-search-entry{border:1px solid #d8c88e;background:linear-gradient(#fffdf5,#f1e8cd);color:var(--green);border-radius:15px;box-shadow:inset 0 1px 0 #fff,0 4px 0 #d3c28a,0 10px 18px #0a2f2a30;transition:transform .15s,box-shadow .15s}
.map-tool:hover:not(:disabled),.map-search-entry:hover{transform:translateY(-2px)}
.map-tool:active:not(:disabled),.map-search-entry:active{transform:translateY(3px);box-shadow:0 1px 0 #d3c28a}
.map-tool-wrap>span{background:#fffdf6ee;color:var(--emerald);border:1px solid #e3d9ba}
.map-flow{background:#fffdf6f5;border:1px solid #dccb92;border-radius:20px;box-shadow:0 18px 40px -12px #0a2f2a55}
.map-flow>span{color:var(--gold-3)}
.map-flow h2{font-weight:700;color:var(--emerald)}
.map-reset{border-color:var(--terra);color:var(--terra);background:#fffdf6}
.map-result{background:linear-gradient(180deg,#16806b,#0b4338);border-color:var(--gold-2);box-shadow:0 4px 0 #072a24,0 12px 24px #0a2f2a55}
.user-marker{background:var(--teal);border-color:#fff;box-shadow:0 0 0 8px #1b837930}
.map-marker{background:#fffdf4;color:var(--gold-3);border-color:var(--gold)}

/* ---------- dialogs ---------- */
dialog,.map-dialog,.access-dialog{border:1px solid #dccb92;border-radius:22px;background:linear-gradient(#fffdf6,#f8f1dc);box-shadow:0 30px 90px #0a2f2a60}
dialog::backdrop{background:#06211e88;backdrop-filter:blur(3px)}
dialog h2{font-weight:700;color:var(--emerald)}
.popup-close{border-color:#d8c88e;background:#fffdf6}
.map-dialog#alignment-popup,#alignment-popup.focus-dialog{background:radial-gradient(circle at 50% 30%,#fffdf4,#eadfbd)}
.alignment-panel h2{font-weight:700;color:var(--emerald)}
.mode-option{border-color:#e3d9ba;background:#fffdf6;border-radius:12px}
.mode-option:has(input:checked){border-color:var(--gold);background:#fff7dd}
.verification-panel{background:linear-gradient(160deg,#fffdf6,#f1e8cd);border-color:#dccb92;border-radius:18px}

/* ---------- direction dial (visuals only; geometry untouched) ---------- */
.direction-card{background:radial-gradient(circle at 50% 38%,#fffdf4,#e8dfc0);border-color:#dccb92;box-shadow:inset 0 1px 0 #fff,0 22px 40px -18px #0a2f2a55}
.direction-ring{border:2px solid var(--gold)}
.direction-ring:before{border-color:#c9a14a99}
.direction-ring:after{content:'';position:absolute;inset:-10px;border-radius:50%;pointer-events:none;background:repeating-conic-gradient(from -1deg,var(--gold) 0 2deg,#0000 2deg 15deg);-webkit-mask:radial-gradient(circle,#0000 calc(100% - 9px),#000 calc(100% - 8px));mask:radial-gradient(circle,#0000 calc(100% - 9px),#000 calc(100% - 8px))}
.direction-origin{border-color:#fffdf4;background:linear-gradient(145deg,#16806b,#0a2f2a);box-shadow:0 0 0 2px var(--gold),0 6px 12px #0a2f2a66}
.direction .qibla-line{filter:drop-shadow(0 0 6px #c9a14acc)}
.direction .qibla-line>span{border:1px solid var(--gold)}
#alignment-popup .focus-toolbar{background:#fffdf6f2;border-color:#d8c88e;border-radius:22px;box-shadow:0 8px 0 -2px #d3c28a,0 16px 30px #0a2f2a40}
.focus-icon:hover,.focus-icon[aria-expanded=true]{background:#f0e0a8!important;color:var(--emerald)!important}
#alignment-popup .focus-toolbar #lock,#alignment-popup .focus-toolbar #prayer{background:linear-gradient(180deg,#16806b,#0b4338);color:var(--gold-2);box-shadow:inset 0 1px 0 #ffffff38,0 3px 0 #072a24}
#alignment-popup .focus-toolbar #reset-directions,.focus-prayer#prayer-screen #reset-prayer{color:var(--terra)}
#alignment-popup.focus-dialog .popup-close,#alignment-popup.focus-dialog .focus-info,.focus-prayer#prayer-screen #exit-prayer,.focus-prayer#prayer-screen #reset-prayer,.focus-prayer#prayer-screen .focus-info{border-color:#d8c88e;background:#fffdf6f2;box-shadow:0 3px 0 #d3c28a}
#alignment-popup.focus-dialog .alignment-panel{background:#fffdf6fa;border-color:#dccb92}
.prayer-active #prayer-angle{color:var(--emerald)}

/* ---------- direction dial: tilted 3D disc (transform on the container only; JS line geometry untouched) ---------- */
.direction-card,.focus-prayer#prayer-screen{perspective:1100px;perspective-origin:50% 30%}
.direction{transform-style:preserve-3d;transform:rotateX(34deg) translateY(-2%);transform-origin:50% 55%;transition:transform .6s cubic-bezier(.2,.8,.2,1)}
.direction:hover{transform:rotateX(18deg) translateY(-1%)}
.direction:before{content:'';position:absolute;left:12%;right:12%;top:12%;bottom:12%;border-radius:50%;background:radial-gradient(circle,#0a2f2a30 40%,#0000 72%);transform:translateZ(-46px) scale(1.1);filter:blur(10px);pointer-events:none;z-index:0}
/* glass disc: clear centre so the map underneath stays visible; only rim, ticks and a faint sheen are solid */
.direction-ring{background:radial-gradient(circle at 50% 30%,#ffffff2e 0,#ffffff0d 45%,#0000 70%);box-shadow:0 1px 0 #b78a2c,0 2px 0 #b78a2c,0 3px 0 #a67c25,0 4px 0 #a67c25,0 5px 0 #8f6a1f,0 6px 0 #8f6a1f,0 7px 0 #7a5a1a,0 8px 8px #0a2f2a55}
.direction-ring:before{background:none;box-shadow:none}
.direction .reference-line{background:linear-gradient(90deg,#9db386,#6b8556);box-shadow:0 3px 0 #4f6640,0 8px 10px #0a2f2a55}
.direction .qibla-line{background:linear-gradient(90deg,#1b8379,#0a3a35 60%,#06211e);box-shadow:0 0 0 5px #174b4007,0 4px 0 #031512,0 10px 12px #0a2f2a77}
.direction-origin{box-shadow:0 0 0 2px var(--gold),0 3px 0 2px #8f6a1f,0 9px 12px #0a2f2a88}
.result-map{opacity:.85!important}
.map-dialog .direction-card,#alignment-popup.focus-dialog .direction-card{background:transparent}
/* Focus (map only) on the direction and prayer screens */
.map-only .direction{transform:none!important}
.map-only .direction-ring,.map-only .qibla-line,.map-only .reference-line,.map-only .extra-reference,.map-only .direction-origin,.map-only .direction:before,.map-only .dial-left,.map-only .dial-right,.map-only .direction-legend,.map-only .direction-message,.map-only .card-top,.map-only .focus-toolbar,.map-only .focus-info:not(.focus-map-toggle),.map-only #exit-prayer,.map-only #reset-prayer,.map-only #prayer-screen>h1,.map-only>p,.map-only .alignment-panel{display:none!important}
.map-only .result-map{opacity:1!important}
.focus-map-toggle{right:70px!important}
.focus-map-toggle[aria-pressed=true]{background:#f0e0a8!important}
@media(max-height:500px) and (orientation:landscape){#alignment-popup.focus-dialog .focus-map-toggle{right:130px!important;top:10px!important}.focus-prayer#prayer-screen .focus-map-toggle{right:10px!important;top:130px!important}}
@media(max-height:550px) and (orientation:landscape){.direction{transform:rotateX(22deg)}}

/* ---------- responsive hero ---------- */
@media(max-width:900px){.hero-art{--R:165px;--W:104px;--H:124px;--g:128px;height:450px;border-radius:190px 190px 22px 22px}.welcome:before{width:480px;height:480px}}
@media(max-width:650px){
 .hero-art{--R:118px;--W:76px;--H:92px;--g:94px;height:370px;border-radius:150px 150px 18px 18px}
 .welcome h1{font-size:42px;letter-spacing:-.3px}
 .label-top{top:30px}.moon{top:64px;right:18%;width:28px;height:28px;box-shadow:-9px 4px 0 0 var(--gold-2)}
 .brand-icon{width:38px;height:38px;border-radius:12px}.brand-icon svg{width:22px;height:22px}
 header:after{left:5%;right:5%}.welcome:before{left:-40%;width:380px;height:380px}
 .feature-row{padding:40px 0 48px}.feature-row article+article{padding:34px 26px 28px;border:1px solid #dccb92}
}

/* ---------- accessibility: honour reduced motion ---------- */
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}

/* ---------- v4: label mid-arrow, highlighted destination, zoom buttons, safer 3D tilt ---------- */
.direction-card,.focus-prayer#prayer-screen{perspective:2200px}
.direction{transform:translateY(-1%) rotateX(26deg) scale(.94)}
.direction:hover{transform:translateY(-1%) rotateX(14deg) scale(.96)}
@media(max-height:550px) and (orientation:landscape){.direction{transform:rotateX(18deg) scale(.94)}}
/* Qibla label sits beside the middle of the shaft, never on the arrowhead */
.direction .qibla-line>span{top:50%;left:16px;margin-top:-13px;white-space:nowrap}
/* destination highlight on the map (counter-rotated so the text stays upright) */
.result-target{overflow:visible!important;background:none!important;border:0!important}
.target-box{position:relative;width:0;height:0}
.target-box i{position:absolute;left:-17px;top:-17px;width:34px;height:34px;border-radius:50%;border:3px solid #bd801d;background:#f0d58a66;box-shadow:0 0 0 4px #fff9,0 0 16px #bd801dcc;animation:targetPulse 2s ease-out infinite}
.target-label{position:absolute;left:22px;top:-11px;white-space:nowrap;max-width:190px;overflow:hidden;text-overflow:ellipsis;background:#fffef3;color:#7a4f0c;border:1px solid #bd801d;border-radius:6px;padding:3px 7px;font:800 11px Manrope,sans-serif;box-shadow:0 2px 6px #0003;transform:rotate(calc(0deg - var(--map-rotation,0deg)));transform-origin:0 50%}
.target-label:empty{display:none}
@keyframes targetPulse{0%{box-shadow:0 0 0 4px #fff9,0 0 0 0 #bd801dcc}100%{box-shadow:0 0 0 4px #fff9,0 0 0 20px #bd801d00}}
/* zoom buttons */
.dial-zoom{position:absolute;left:12px;top:50%;transform:translateY(-50%);z-index:45;display:flex;flex-direction:column;border:1px solid #d8c88e;border-radius:14px;overflow:hidden;background:#fffdf6f2;box-shadow:0 3px 0 #d3c28a,0 8px 16px #0a2f2a30}
.dial-zoom button{width:44px;height:44px;border:0;background:none;color:var(--emerald);font:700 24px/1 Manrope,sans-serif}
.dial-zoom button+button{border-top:1px solid #e3d9ba}
.dial-zoom button:active{background:#f0e0a8}
#prayer-screen:not(.focus-prayer) .dial-zoom,#prayer-screen[hidden] .dial-zoom{display:none}
