/* Luxury Qibla Page Styling */
	.qibla-container { display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; overflow: hidden; }

	/* Ambient background glow */
	.qibla-aura {
		position: absolute; width: 600px; height: 600px; border-radius: 50%;
		background: radial-gradient(circle, rgba(245,158,11,0.07) 0%, rgba(5,150,105,0.04) 40%, rgba(0,0,0,0) 70%);
		top: 50%; left: 50%; transform: translate(-50%, -50%);
		pointer-events: none; z-index: 0; transition: background 0.6s ease;
	}
	.qibla-container.aligned .qibla-aura {
		background: radial-gradient(circle, rgba(16,185,129,0.15) 0%, rgba(5,150,105,0.08) 50%, rgba(0,0,0,0) 70%);
	}

	/* Luxury Compass Instrument (330px x 330px) */
	.compass-instrument {
		position: relative; width: 330px; height: 330px;
		margin: 0 auto 1.8rem; z-index: 2; border-radius: 50%;
	}

	/* Fixed Top Sight Notch (12 o'clock targeting) */
	.sight-notch {
		position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
		z-index: 25; display: flex; flex-direction: column; align-items: center; gap: 3px;
	}
	.sight-pointer {
		width: 0; height: 0;
		border-left: 8px solid transparent; border-right: 8px solid transparent;
		border-top: 14px solid var(--gold-light);
		filter: drop-shadow(0 0 8px rgba(245,158,11,0.8));
		transition: all 0.4s ease;
	}
	.compass-instrument.aligned .sight-pointer {
		border-top-color: #10b981;
		filter: drop-shadow(0 0 14px rgba(16,185,129,1));
	}
	.sight-line {
		width: 2px; height: 22px; background: linear-gradient(to bottom, var(--gold-light), transparent);
		transition: background 0.4s ease;
	}
	.compass-instrument.aligned .sight-line {
		background: linear-gradient(to bottom, #10b981, transparent);
	}

	/* Glass Bezel Ring */
	.bezel-ring {
		position: absolute; inset: 0; border-radius: 50%;
		border: 2px solid var(--line);
		background: radial-gradient(circle, rgba(20,20,28,0.7) 0%, rgba(10,10,15,0.88) 100%);
		backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
		box-shadow: 0 25px 60px rgba(0,0,0,0.6), inset 0 0 25px var(--line-soft);
		transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
	}
	.compass-instrument.aligned .bezel-ring {
		border-color: rgba(16,185,129,0.7);
		box-shadow: 0 0 60px rgba(16,185,129,0.35), inset 0 0 30px rgba(16,185,129,0.12);
	}

	/* Rotatable Dial Face (Rotates with device heading) */
	.compass-dial-face {
		position: absolute; inset: 0; border-radius: 50%;
		transition: transform 0.25s cubic-bezier(0.1, 0.85, 0.25, 1);
	}

	/* Ticks Perfectly Placed Inside Perimeter (Radius = 165px) */
	.dial-tick {
		position: absolute; top: 10px; left: 50%;
		width: 1.5px; height: 7px; background: var(--line);
		transform-origin: center 155px;
		transform: translateX(-50%) rotate(var(--tick-angle, 0deg));
	}
	.dial-tick.med { height: 11px; background: var(--text-muted); width: 2px; }
	.dial-tick.major { height: 15px; background: var(--gold-light); width: 2px; }

	/* Cardinal Markers inside bezel */
	.cardinal-lbl {
		position: absolute; font-weight: 800; font-size: 0.85rem;
		color: var(--text-muted); transform: translate(-50%, -50%);
		letter-spacing: 1px;
	}
	.cardinal-lbl.N { top: 34px; left: 50%; color: #ef4444; font-size: 1rem; }
	.cardinal-lbl.E { right: 24px; top: 50%; }
	.cardinal-lbl.S { bottom: 20px; left: 50%; }
	.cardinal-lbl.W { left: 34px; top: 50%; }

	/* KAABA EMBLEM MARKER (Positioned inside perimeter at Qibla bearing) */
	.kaaba-target-wrapper {
		position: absolute; top: 8px; left: 50%;
		width: 38px; height: 38px; margin-left: -19px;
		transform-origin: center 157px;
		transform: translateX(-50%) rotate(0deg);
		z-index: 18; transition: transform 0.3s ease;
	}
	.kaaba-target-node {
		display: flex; flex-direction: column; align-items: center; gap: 3px;
	}
	.kaaba-3d-box {
		width: 34px; height: 34px; border-radius: 8px;
		background: linear-gradient(145deg, #181824 0%, #0a0a10 100%);
		border: 2px solid var(--gold-light);
		display: flex; align-items: center; justify-content: center;
		box-shadow: 0 0 20px rgba(245,158,11,0.6);
		position: relative; transition: all 0.4s ease;
	}
	.compass-instrument.aligned .kaaba-3d-box {
		border-color: #10b981;
		box-shadow: 0 0 30px rgba(16,185,129,0.9);
		transform: scale(1.15);
	}
	.kaaba-3d-box .kiswa-gold-band {
		position: absolute; top: 8px; left: 0; right: 0; height: 4px;
		background: linear-gradient(90deg, #f59e0b, #fbbf24, #f59e0b);
	}
	.kaaba-3d-box .kaaba-gold-door {
		position: absolute; bottom: 3px; right: 7px; width: 6px; height: 10px;
		background: var(--gold-light); border-radius: 2px 2px 0 0;
	}
	.kaaba-target-arrow {
		width: 0; height: 0;
		border-left: 5px solid transparent; border-right: 5px solid transparent;
		border-top: 8px solid var(--gold-light);
		transition: border-top-color 0.4s ease;
	}
	.compass-instrument.aligned .kaaba-target-arrow {
		border-top-color: #10b981;
	}

	/* Center Pivot */
	.center-pivot {
		position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
		width: 18px; height: 18px; border-radius: 50%;
		background: radial-gradient(circle, #f59e0b 0%, #d97706 100%);
		border: 3px solid #0f0f15;
		box-shadow: 0 0 16px rgba(245,158,11,0.7); z-index: 15;
		transition: all 0.4s ease;
	}
	.compass-instrument.aligned .center-pivot {
		background: radial-gradient(circle, #10b981 0%, #059669 100%);
		box-shadow: 0 0 22px rgba(16,185,129,0.9);
	}

	/* Info Glass Card */
	.qibla-info-card {
		position: relative; z-index: 2; text-align: center;
		background: var(--line-soft); border: 1px solid var(--line-soft);
		border-radius: 22px; padding: 22px 30px; width: 100%; max-width: 440px;
		backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
		box-shadow: 0 15px 40px rgba(0,0,0,0.4);
	}

	.bearing-reading {
		font-size: 3.2rem; font-weight: 800; line-height: 1;
		background: linear-gradient(135deg, #ffffff 30%, var(--gold-light) 100%);
		-webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
		letter-spacing: -1px; margin-bottom: 8px;
	}

	.status-indicator-pill {
		display: inline-flex; align-items: center; gap: 8px;
		padding: 7px 18px; border-radius: 30px; font-size: 0.85rem; font-weight: 700;
		background: var(--line-soft); color: var(--text-muted);
		border: 1px solid var(--line); margin-bottom: 14px;
		transition: all 0.4s ease;
	}
	.status-indicator-pill.aligned {
		background: rgba(16,185,129,0.18); color: #10b981;
		border-color: rgba(16,185,129,0.5);
		box-shadow: 0 0 25px rgba(16,185,129,0.35);
	}

	.qibla-grid-metrics {
		display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
		margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft);
	}
	.metric-tile {
		text-align: center; background: rgba(0,0,0,0.25); padding: 10px 14px; border-radius: 14px;
		border: 1px solid var(--line-soft);
	}
	.metric-tile .m-label {
		font-size: 0.68rem; color: var(--text-muted); font-weight: 600;
		text-transform: uppercase; letter-spacing: 0.6px;
	}
	.metric-tile .m-value {
		font-size: 0.95rem; color: #ffffff; font-weight: 700; margin-top: 3px;
	}

	@media (max-width: 576px) {
		.compass-instrument { width: 280px; height: 280px; }
		.dial-tick { transform-origin: center 130px; top: 8px; }
		.kaaba-target-wrapper { transform-origin: center 132px; top: 8px; }
		.cardinal-lbl.N { top: 28px; }
		.cardinal-lbl.E { right: 18px; }
		.cardinal-lbl.S { bottom: 16px; }
		.cardinal-lbl.W { left: 28px; }
		.bearing-reading { font-size: 2.6rem; }
	}
