/* Inside the temple: the ritual panel over the sanctum scene (js/sanctum.js). Uses the tokens in style.css. */
body.sanctum-open .hud, body.sanctum-open .darshan, body.sanctum-open .card, body.sanctum-open .toast { opacity: 0 !important; pointer-events: none !important; }
body.sanctum-open .hud * { pointer-events: none !important; }

.sanctum { position: fixed; inset: 0; z-index: 24; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.sanctum:active { cursor: grabbing; }
.sn-veil { position: absolute; inset: 0; background: #050302; opacity: 1; transition: opacity 1.1s ease; pointer-events: none; }
.sanctum.ready .sn-veil { opacity: 0; }
.sanctum.ready.blink .sn-veil { opacity: 0.9; transition-duration: 0.12s; }
/* a cut to another set (Shirdi to Dwarkamai): straight to black, a breath, then a slow fade up on the new place */
.sanctum.ready.cutting .sn-veil { opacity: 1; transition-duration: 0s; }
.sanctum.leaving .sn-veil, .sanctum.ready.leaving .sn-veil { opacity: 1; transition-duration: 0.5s; }

.sn-top { position: absolute; left: calc(12px + var(--safe-l)); right: calc(12px + var(--safe-r)); top: calc(10px + var(--safe-t)); display: flex; align-items: center; justify-content: space-between; gap: 10px; pointer-events: none; cursor: default; }
.sn-top > * { pointer-events: auto; }
.sn-place { display: grid; min-width: 0; padding: 7px 16px 8px; border-radius: 999px; background: var(--panel); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--line); }
.sn-place-k { font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.sn-place-n { font-family: var(--display); font-weight: 600; font-size: 19px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sn-exit { flex: none; background: var(--panel); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); padding: 9px 16px; font-size: 14px; }
.sn-exit:hover { border-color: var(--gold); }

.sn-panel { position: absolute; right: calc(16px + var(--safe-r)); bottom: calc(16px + var(--safe-b)); width: min(390px, calc(100vw - 32px)); max-height: calc(100% - 96px - var(--safe-t) - var(--safe-b)); border-radius: 22px; display: flex; flex-direction: column; cursor: default; }
.sn-body { overflow-y: auto; padding: 18px 22px 8px; touch-action: pan-y; scrollbar-width: thin; min-height: 0; }
.sn-kicker { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.sn-title { font-family: var(--display); font-weight: 600; font-size: 34px; line-height: 1.02; margin: 6px 0 8px; }
.sn-note { font-size: 14.5px; line-height: 1.6; color: #e3dccd; margin: 0 0 4px; }
.sn-panel .mantra { margin: 12px 0 6px; padding: 10px 14px; }
.sn-panel .m-deva { font-size: 24px; }
.sn-panel .m-latin { font-size: 19px; }
.sn-foot { padding: 10px 16px 14px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.sn-dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 2px; }
.sn-dot { width: 24px; height: 24px; padding: 0; border: 0; background: none; display: grid; place-items: center; border-radius: 50%; }
.sn-dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--gold); transition: width 0.3s, background 0.3s; }
.sn-dot.done::before { background: rgba(255, 154, 51, 0.55); border-color: transparent; }
.sn-dot.cur::before { width: 20px; border-radius: 6px; background: var(--saffron); border-color: transparent; box-shadow: 0 0 10px rgba(255, 154, 51, 0.7); }
.sn-actions { display: flex; gap: 8px; }
.sn-actions .ghost { flex: none; }
.sn-actions .ghost:disabled { opacity: 0.4; cursor: default; }
.sn-actions .primary { flex: 1; }
.sn-hint { font-size: 11.5px; color: var(--muted); text-align: center; }

@media (max-width: 720px) {
	.sn-panel { left: calc(10px + var(--safe-l)); right: calc(10px + var(--safe-r)); width: auto; bottom: calc(10px + var(--safe-b)); max-height: 46vh; border-radius: 20px; }
	.sn-body { padding: 14px 16px 6px; }
	.sn-title { font-size: 27px; margin: 4px 0 6px; }
	.sn-note { font-size: 14px; line-height: 1.5; }
	.sn-panel .mantra { margin: 8px 0 4px; padding: 8px 10px; }
	.sn-panel .m-deva { font-size: 20px; }
	.sn-panel .m-latin { font-size: 16px; }
	.sn-foot { padding: 8px 12px 12px; gap: 6px; }
	.sn-actions .primary, .sn-actions .ghost { padding: 10px 16px; font-size: 14px; }
	.sn-hint { display: none; }
	.sn-place { padding: 6px 12px 7px; }
	.sn-place-n { font-size: 16px; }
	.sn-exit { padding: 8px 12px; font-size: 13px; }
}
@media (hover: none) {
	.sn-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.sn-veil { transition-duration: 0.2s; }
}
