/* ============================================================================
 * Hikari — The Reiki Sanctuary :: Iridescent Celestial Prism Stylesheet
 * Styled in the signature midnight-indigo, gold-filigree & glass DNA of VGExplorer
 * ========================================================================== */
:root {
  --ink: #07091e;
  --glass: rgba(11, 14, 46, 0.74);
  --glass-strong: rgba(9, 12, 40, 0.93);
  --gold: #f2c75c;
  --gold-deep: #d79a2b;
  --line: rgba(242, 199, 92, 0.34);
  --cream: #f7efd9;
  --muted: #b8c4ea;
  --serif: 'Cinzel', 'Palatino Linotype', Palatino, Georgia, serif;
  --sans: 'Source Sans 3', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  --vista-op: 0.72;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: #07091e;
  color: var(--cream);
  font-family: var(--sans);
  user-select: none;
  -webkit-user-select: none;
}

button { font-family: inherit; }
.hidden { display: none !important; }
.muted-sm { font-size: 13px; color: var(--muted); line-height: 1.48; margin: 0 0 8px; }
.eyebrow { letter-spacing: 0.2em; font-size: 11px; color: var(--gold); text-transform: uppercase; font-weight: 700; }

/* ---------- Vista Backdrop & WebGL Canvas ---------- */
#vistaWrap {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 35%, #1d154a 0%, #090b24 72%);
  pointer-events: none;
}
#vistaImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: var(--vista-op);
  transform: scale(1.04);
  transition: opacity 0.9s ease;
  animation: vista-breathe 26s ease-in-out infinite alternate;
}
@keyframes vista-breathe {
  from { transform: scale(1.02); }
  to   { transform: scale(1.08); }
}
#vistaVignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 68% 68% at 50% 48%, rgba(8, 10, 32, 0.16) 0%, rgba(6, 8, 24, 0.76) 100%),
    linear-gradient(180deg, rgba(6, 8, 26, 0.45) 0%, transparent 25%, transparent 72%, rgba(5, 7, 22, 0.75) 100%);
}
canvas#gl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 5;
  touch-action: none;
  outline: none;
  cursor: grab;
}
canvas#gl:active { cursor: grabbing; }

/* ---------- Splash / Title Card (Exact VGExplorer Craft) ---------- */
#splash {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(200, 107, 255, 0.18), transparent 68%),
    radial-gradient(ellipse 55% 45% at 50% 52%, rgba(242, 199, 92, 0.14), transparent 70%),
    linear-gradient(165deg, #06081a 0%, #101540 48%, #050716 100%);
  transition: opacity 0.9s ease, visibility 0.9s ease;
  cursor: pointer;
}
#splash.fade-out { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-card { text-align: center; padding: 0 24px; animation: splash-rise 1.05s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes splash-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.splash-crest {
  font-size: 3.4rem; line-height: 1; margin-bottom: 1rem;
  filter: drop-shadow(0 0 24px rgba(242, 199, 92, 0.55));
  animation: splash-fade 0.9s ease-out 0.05s both;
}
.splash-title {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(2.3rem, 7vw, 4.1rem); letter-spacing: 0.18em; text-transform: uppercase; margin: 0;
  background: linear-gradient(180deg, #fff8e6 0%, #f2c75c 55%, #b98926 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  text-shadow: 0 2px 30px rgba(242, 199, 92, 0.25);
  animation: splash-fade 0.9s ease-out 0.15s both;
}
.splash-rule {
  width: min(260px, 62vw); height: 1px; margin: 1.15rem auto 1rem;
  background: linear-gradient(90deg, transparent, rgba(242, 199, 92, 0.82), transparent);
  animation: splash-widen 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.32s both;
}
@keyframes splash-widen {
  from { opacity: 0; transform: scaleX(0.2); }
  to   { opacity: 1; transform: none; }
}
.splash-tagline {
  font-size: 0.9rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: rgba(247, 239, 217, 0.68);
  animation: splash-fade 0.6s ease-out 0.1s both;
}
.splash-credit { margin-top: 2.3rem; display: flex; flex-direction: column; gap: 0.35rem; animation: splash-fade 0.6s ease-out 0.15s both; }
.splash-by { font-size: 0.65rem; letter-spacing: 0.34em; text-transform: uppercase; color: rgba(255, 255, 255, 0.48); }
.splash-author { font-family: var(--serif); font-size: 1.18rem; letter-spacing: 0.16em; color: rgba(255, 246, 227, 0.98); }
.splash-version {
  margin-top: 1.35rem; font-family: ui-monospace, Consolas, monospace;
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.12em; color: #ffd166;
  background: rgba(0, 0, 0, 0.55); padding: 5px 14px; border-radius: 6px;
  border: 1px solid rgba(255, 209, 102, 0.45); display: inline-block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  animation: splash-fade 0.6s ease-out 0.2s both;
}
@keyframes splash-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Gilded Frame Welcome Overlay (#title) ---------- */
#title {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 28%, #2b1d54 0%, #111338 56%, #060818 100%);
  transition: opacity 0.7s ease, visibility 0.7s ease;
}
#title.out { opacity: 0; visibility: hidden; pointer-events: none; }
#credit {
  position: absolute; top: max(10px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  width: 92vw; font-size: clamp(10.5px, 1.4vw, 12px); color: rgba(235, 225, 210, 0.65);
  letter-spacing: 0.05em; text-align: center;
}
#frame {
  position: absolute;
  width: min(82vw, 940px);
  height: min(50dvh, 490px);
  top: clamp(38px, 6.5dvh, 66px);
  padding: 2vmin;
  border-radius: 4px;
  background: linear-gradient(135deg, #8a6424 0%, #e8c26a 18%, #9b7128 35%, #f0d084 52%, #8a6424 70%, #d6ad55 86%, #7a571d 100%);
  box-shadow: 0 30px 80px rgba(0,0,0,0.75), inset 0 0 0 2px rgba(60,40,10,0.6);
}
#frame::before {
  content: ''; position: absolute; inset: 1vmin;
  border: 2px solid rgba(80,55,15,0.65);
  box-shadow: inset 0 0 0 1px rgba(255,230,160,0.42); pointer-events: none;
}
#frame .mat { position: relative; width: 100%; height: 100%; overflow: hidden; background: #0e1740; box-shadow: inset 0 0 22px rgba(0,0,0,0.8); }
#paintImg { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity 0.45s ease; }

#titleText {
  position: absolute; left: 50%; bottom: max(14px, env(safe-area-inset-bottom), 2.5vh); transform: translateX(-50%);
  text-align: center; width: min(710px, 93vw);
  background: var(--glass-strong); border: 1px solid var(--line); border-radius: 16px;
  padding: clamp(14px, 2.2vw, 20px) clamp(16px, 3vw, 26px);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.68);
  max-height: 54dvh; overflow-y: auto;
}
#titleText h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(21px, 3.3vw, 34px); margin: 5px 0 6px; color: #fff6dc; }
#titleText p { margin: 0 0 11px; color: #dbe2fb; line-height: 1.44; font-size: clamp(13px, 1.65vw, 15px); }
.gallery-switch { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 0 0 8px; }
.gpick {
  border: 1px solid var(--line); background: rgba(24, 30, 78, 0.84); color: var(--muted);
  padding: 5px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700; cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.gpick:hover { color: var(--cream); background: rgba(42, 54, 122, 0.94); }
.gpick.on { background: rgba(242,199,92,0.22); color: var(--gold); border-color: var(--gold); }
.pill-steps { display: flex; gap: 7px; justify-content: center; flex-wrap: wrap; margin: 0 0 12px; }
.pill-step { font-size: 12px; color: #f6e7c2; background: rgba(242,199,92,0.12); border: 1px solid rgba(242,199,92,0.28); border-radius: 999px; padding: 4px 10px; }
.title-footer {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 12px; padding-top: 9px; border-top: 1px solid rgba(242, 199, 92, 0.18);
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(247, 239, 217, 0.68);
}
.title-footer .title-ver {
  font-family: ui-monospace, Consolas, monospace; letter-spacing: 0.08em; text-transform: none;
  font-size: 0.78rem; font-weight: 700; color: #ffd166; background: rgba(0, 0, 0, 0.45);
  padding: 3px 9px; border-radius: 6px; border: 1px solid rgba(255, 209, 102, 0.38);
}

/* ---------- Buttons & Chips ---------- */
.btn {
  border: 1px solid var(--line); background: rgba(28, 36, 92, 0.92); color: var(--cream);
  padding: 10px 18px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: transform 0.12s, background 0.12s, box-shadow 0.12s; min-height: 40px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn:hover { transform: translateY(-1px); background: rgba(44, 58, 128, 0.96); }
.btn.primary {
  background: linear-gradient(135deg, #f7d374, #dc9f2c); color: #1a1406; border-color: #ffe7a3;
  box-shadow: 0 8px 24px rgba(242,199,92,0.34); font-weight: 700;
}
.btn.primary:hover { box-shadow: 0 10px 30px rgba(242,199,92,0.52); }
.row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; align-items: center; }

.chip {
  pointer-events: auto; border: 1px solid var(--line); background: rgba(20, 26, 70, 0.88);
  color: var(--cream); padding: 6px 11px; border-radius: 999px; font-size: 12px; font-weight: 600;
  cursor: pointer; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; min-height: 36px;
  transition: background 0.15s, border-color 0.15s;
}
.chip:hover { background: rgba(40, 52, 118, 0.95); }
.chip.on { background: rgba(242,199,92,0.22); border-color: var(--gold); color: var(--gold); }
.chip kbd, .k { font-family: inherit; font-size: 10.5px; background: rgba(255,255,255,0.14); border-radius: 4px; padding: 1px 5px; color: #fff; }

/* ---------- Floating Sanctuary HUD ---------- */
#hud {
  position: fixed; inset: 0; z-index: 20; pointer-events: none;
  opacity: 0; transition: opacity 0.7s ease;
}
#hud.on { opacity: 1; }
#hud.on .panel { pointer-events: auto; }

#topBar {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
  pointer-events: none;
}

#statusPill {
  display: flex; align-items: center; gap: 10px;
  background: var(--glass); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 15px 7px 11px; backdrop-filter: blur(10px);
  max-width: min(360px, 52vw);
}
#statusPill .dot {
  width: 11px; height: 11px; flex: none; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 12px var(--gold);
}
.status-txt { display: flex; flex-direction: column; min-width: 0; }
.status-txt small { font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-txt strong { font-size: 13px; font-weight: 600; color: #fff6e3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

#tools { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

#hoverTip {
  position: fixed; z-index: 28; pointer-events: none;
  background: var(--glass-strong); border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 12px; font-size: 12px; font-weight: 700; color: #fff6dc;
  box-shadow: 0 10px 26px rgba(0,0,0,0.55); transform: translate(-50%, -140%); white-space: nowrap;
}

#sessionMiniPill {
  position: fixed; left: 50%; top: max(62px, calc(env(safe-area-inset-top) + 48px)); transform: translateX(-50%);
  z-index: 24; pointer-events: auto; cursor: pointer;
  display: flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: rgba(15, 22, 62, 0.92); border: 1px solid var(--gold); color: #fff6dc;
  font-size: 12.5px; font-weight: 700; box-shadow: 0 8px 26px rgba(0,0,0,0.55);
}
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #2ee89a; box-shadow: 0 0 10px #2ee89a; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.45; transform: scale(1.3); } }

/* ---------- Bottom Celestial Dock & Jewel Ring ---------- */
#bottomDock {
  position: absolute;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 20px);
  pointer-events: none;
}

#palette {
  display: flex; align-items: center; gap: 8px;
  background: var(--glass); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 13px; backdrop-filter: blur(10px);
}
#palette .lbl { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.palette-dots { display: flex; align-items: center; gap: 7px; }
.reiki-mini-sep { width: 1px; height: 16px; background: rgba(242,199,92,0.28); margin: 0 2px; }
.swatch {
  width: 21px; height: 21px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.42);
  background: var(--sw); box-shadow: 0 0 10px var(--sw); cursor: pointer; position: relative;
  transition: transform 0.2s, box-shadow 0.2s; padding: 0;
}
.swatch.reiki { border-radius: 6px; width: 20px; height: 20px; transform: rotate(45deg) scale(0.86); }
.swatch:hover { transform: scale(1.25); }
.swatch.reiki:hover { transform: rotate(45deg) scale(1.1); }
.swatch.on { transform: scale(1.32); border-color: #fff; box-shadow: 0 0 18px var(--sw), 0 0 0 2px rgba(255,255,255,0.65); }
.swatch.reiki.on { transform: rotate(45deg) scale(1.15); }
.swatch .tip {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  background: var(--glass-strong); border: 1px solid var(--line); border-radius: 6px;
  padding: 3px 8px; font-size: 11px; color: #fff6dc; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity 0.15s;
}
.swatch.reiki .tip { transform: translate(-50%, 0) rotate(-45deg); bottom: 32px; }
.swatch:hover .tip { opacity: 1; }

#dock {
  display: flex; gap: 5px; align-items: center; flex-wrap: nowrap;
  background: var(--glass-strong); border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 7px; backdrop-filter: blur(14px);
  box-shadow: 0 14px 40px rgba(0,0,0,0.62);
  overflow-x: auto; max-width: 100%;
}
.dock-btn {
  border: 1px solid transparent; background: transparent; color: var(--muted);
  border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  transition: background 0.16s, color 0.16s, border-color 0.16s;
}
.dock-btn:hover { color: var(--cream); background: rgba(255,255,255,0.06); }
.dock-btn.on {
  background: rgba(242,199,92,0.18); border-color: rgba(242,199,92,0.5); color: #fff4d2;
}

/* ---------- Chakra Discovery Slide-Over Card (#card) ---------- */
#card {
  position: fixed; z-index: 34; right: 18px; top: 50%; transform: translate(34px, -50%);
  width: min(440px, 92vw); max-height: 78dvh; overflow-y: auto;
  background: var(--glass-strong); border: 1px solid var(--line); border-radius: 18px;
  padding: 18px 20px; backdrop-filter: blur(16px);
  box-shadow: 0 30px 80px rgba(0,0,0,0.75); opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
#card.show { opacity: 1; transform: translate(0, -50%); pointer-events: auto; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-nav { display: flex; gap: 5px; }
#card h3 { font-family: var(--serif); font-weight: 500; font-size: 25px; margin: 6px 0 2px; color: #fff7df; }
.card-sub { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.card-yantra-row {
  display: flex; align-items: center; gap: 14px; padding: 11px; margin-bottom: 12px;
  border-radius: 14px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
}
.yantra-box {
  width: 82px; height: 82px; flex: none; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle, rgba(255,255,255,0.06), transparent 72%);
  border-radius: 50%;
}
.card-bowl-box { display: flex; flex-direction: column; gap: 7px; flex: 1; }
.freq-meta { font-size: 12px; color: #e2e8ff; line-height: 1.35; }
.csec { margin-bottom: 10px; font-size: 14px; line-height: 1.5; color: #e1e7fb; }
.csec b { color: var(--gold); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; display: block; margin-bottom: 2px; }
#card blockquote {
  margin: 12px 0 4px; padding: 10px 14px; border-left: 3px solid var(--gold);
  background: rgba(242,199,92,0.08); border-radius: 0 10px 10px 0;
  font-family: var(--serif); font-style: italic; font-size: 15px; line-height: 1.48; color: #fff6df;
}

/* ---------- Modals ---------- */
.modal {
  position: fixed; inset: 0; z-index: 70;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 7, 22, 0.74); backdrop-filter: blur(8px); padding: 12px;
}
.modal .box {
  width: min(780px, 95vw); max-height: 88dvh; overflow-y: auto;
  background: var(--glass-strong); border: 1px solid var(--line); border-radius: 18px;
  padding: 20px 24px; box-shadow: 0 30px 90px rgba(0,0,0,0.8);
}
.modal .box.box-wide { width: min(980px, 96vw); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.modal h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(22px, 3vw, 29px); margin: 0 0 4px; color: #fff6dc; }
.modal .sub { color: var(--muted); margin: 0; font-size: 13.5px; line-height: 1.45; }

.tabs, .prac-tabs { display: flex; gap: 6px; margin-bottom: 15px; flex-wrap: wrap; }
.tab {
  border: 1px solid var(--line); background: rgba(255,255,255,0.03); color: var(--muted);
  padding: 7px 13px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 600;
}
.tab.on { background: rgba(242,199,92,0.18); border-color: var(--gold); color: var(--gold); }

/* ---------- Guide / Settings ---------- */
.how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0 16px; }
.how-card { background: rgba(255,255,255,0.045); border: 1px solid rgba(242,199,92,0.24); border-radius: 12px; padding: 12px 13px; }
.how-card .ico { font-size: 22px; margin-bottom: 4px; }
.how-card h4 { margin: 0 0 4px; font-family: var(--serif); font-size: 15.5px; font-weight: 500; color: var(--gold); }
.how-card p { margin: 0; font-size: 13px; line-height: 1.42; color: #dbe3f7; }
.help-grid { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 13.5px; align-items: center; }
.help-grid .k { font-size: 11.5px; padding: 3px 8px; white-space: nowrap; justify-self: start; }
.settings {
  display: flex; gap: 18px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.1); font-size: 13.5px; color: var(--muted); align-items: center;
}
.settings label { display: flex; gap: 8px; align-items: center; }
.backup-bar {
  margin-top: 14px; padding: 12px 14px; border-radius: 12px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(242,199,92,0.22);
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
}
.backup-bar strong { display: block; color: #fff4d4; font-size: 14px; }
.backup-bar small { color: var(--muted); font-size: 12.5px; }

/* ---------- Session Conductor & Table Dim Mode ---------- */
.sess-preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 9px; margin-bottom: 14px; }
.preset-card {
  text-align: left; border: 1px solid rgba(242,199,92,0.25); background: rgba(255,255,255,0.035);
  border-radius: 12px; padding: 10px 12px; color: var(--cream); cursor: pointer;
}
.preset-card.on { border-color: var(--gold); background: rgba(242,199,92,0.12); }
.preset-card small { color: var(--gold); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; display: block; }
.preset-card strong { font-family: var(--serif); font-size: 15.5px; display: block; margin: 2px 0; }
.preset-card span { font-size: 12px; color: var(--muted); line-height: 1.35; display: block; }

.sess-runner {
  display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: center;
  padding: 14px; border-radius: 14px; background: rgba(255,255,255,0.04); border: 1px solid rgba(242,199,92,0.28);
  margin-bottom: 14px;
}
.sess-ring-wrap { position: relative; width: 170px; height: 170px; margin: 0 auto; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.sess-ring-svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.sess-time { font-family: var(--serif); font-size: 32px; font-weight: 700; color: #fff6dc; z-index: 1; }
.sess-step-count { font-size: 11.5px; color: var(--gold); z-index: 1; }
.sess-pos-list { max-height: 185px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.sess-pos-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 8px 11px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.025);
  cursor: pointer; font-size: 13px;
}
.sess-pos-item.on { border-color: var(--gold); background: rgba(242,199,92,0.12); color: #fff6dc; }
.sess-pos-item .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }

#tableDimOverlay {
  position: fixed; inset: 0; z-index: 95;
  background: #020308; display: flex; align-items: center; justify-content: center;
  padding: 24px; text-align: center;
}
.dim-mandala {
  position: absolute; width: min(72vmin, 520px); height: min(72vmin, 520px);
  opacity: 0.14; pointer-events: none; animation: slow-spin 70s linear infinite;
}
@keyframes slow-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.dim-inner { position: relative; z-index: 2; max-width: 600px; }
.dim-eyebrow { font-size: 11px; letter-spacing: 0.25em; color: rgba(242,199,92,0.58); text-transform: uppercase; }
.dim-clock { font-family: var(--serif); font-size: clamp(46px, 10vw, 82px); color: rgba(255, 224, 154, 0.86); margin: 10px 0 4px; }
.dim-pos-title { font-family: var(--serif); font-size: clamp(24px, 4.5vw, 36px); color: rgba(247, 239, 217, 0.88); margin: 0 0 6px; font-weight: 500; }
.dim-area { font-size: 14px; color: rgba(184, 196, 234, 0.72); margin-bottom: 14px; }
.dim-cue { font-size: 16px; line-height: 1.55; color: rgba(226, 232, 255, 0.74); margin: 0 auto 14px; max-width: 480px; }
.dim-progress { font-size: 12px; color: rgba(242,199,92,0.65); }

/* ---------- Self-Care Sanctuary ---------- */
.mood-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 9px; margin-bottom: 14px; }
.mood-card {
  border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.035); border-radius: 12px;
  padding: 11px 12px; text-align: left; color: var(--cream); cursor: pointer;
  transition: transform 0.14s, border-color 0.15s;
}
.mood-card:hover { transform: translateY(-1px); border-color: var(--mc); }
.mood-card.on { border-color: var(--mc); background: rgba(255,255,255,0.08); box-shadow: 0 0 18px rgba(0,0,0,0.4); }
.mood-card .emo { font-size: 22px; display: block; margin-bottom: 4px; }
.mood-card strong { font-size: 14px; display: block; }

.plan-box {
  border: 1px solid var(--line); background: rgba(255,255,255,0.04); border-radius: 14px; padding: 15px 17px;
}
.breath-stage {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 18px 12px; text-align: center;
}
.breath-lotus-wrap {
  position: relative; width: 220px; height: 220px; display: flex; align-items: center; justify-content: center; margin: 8px 0 14px;
}
.breath-mandala-img {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  mask-image: radial-gradient(circle, #000 56%, transparent 74%);
  -webkit-mask-image: radial-gradient(circle, #000 56%, transparent 74%);
  transform: scale(0.72);
  transition: transform 0.25s linear;
  filter: drop-shadow(0 0 24px rgba(56, 217, 255, 0.45));
}
.breath-phase-lbl {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-shadow: 0 2px 14px rgba(0,0,0,0.95); pointer-events: none;
}
.breath-phase-lbl strong { font-family: var(--serif); font-size: 20px; color: #fff7df; }
.breath-phase-lbl span { font-size: 13px; color: var(--gold); font-weight: 700; }

.precept-card {
  border: 1px solid rgba(255,255,255,0.1); border-left: 4px solid var(--pc);
  background: rgba(255,255,255,0.035); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px;
}
.precept-kanji { font-size: 16px; color: var(--gold); font-weight: 700; }
.precept-eng { font-family: var(--serif); font-size: 17px; margin: 3px 0 4px; color: #fff7e0; }

.pond-svg {
  width: 100%; height: 185px; border-radius: 14px;
  border: 1px solid rgba(56,217,255,0.28);
  background: radial-gradient(ellipse at 50% 35%, #192660 0%, #090d2a 75%);
  display: block; margin-bottom: 12px;
}

/* ---------- Sound Sanctuary ---------- */
.atm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 9px; margin-bottom: 15px; }
.atm-card {
  border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.035); border-radius: 12px;
  padding: 10px 12px; text-align: left; color: var(--cream); cursor: pointer;
}
.atm-card.on { border-color: var(--gold); background: rgba(242,199,92,0.14); }
.mixer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 16px; margin-bottom: 16px; }
.mixer-row { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.mixer-row label { display: flex; justify-content: space-between; color: #dbe2fb; }
.mixer-row input[type=range] { width: 100%; accent-color: var(--gold); }

.bowl-ring { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 10px 0; }
.bowl-pad {
  width: 92px; height: 92px; border-radius: 50%;
  border: 2px solid var(--bc); background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.16), rgba(10,14,44,0.92));
  color: #fff6dc; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 0 18px rgba(0,0,0,0.5), inset 0 0 14px rgba(255,255,255,0.08);
  transition: transform 0.14s, box-shadow 0.25s;
}
.bowl-pad:hover { transform: scale(1.06); }
.bowl-pad.ringing { animation: bowl-ring-pop 0.8s ease-out; box-shadow: 0 0 28px var(--bc), inset 0 0 22px var(--bc); }
@keyframes bowl-ring-pop { 0% { transform: scale(0.94); } 40% { transform: scale(1.1); } 100% { transform: scale(1); } }
.bowl-pad strong { font-family: var(--serif); font-size: 16px; color: var(--bc); }
.bowl-pad small { font-size: 10.5px; color: var(--muted); }

/* ---------- Practitioner Studio & Forms ---------- */
.prac-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.prac-card {
  background: rgba(255,255,255,0.035); border: 1px solid rgba(242,199,92,0.22);
  border-radius: 14px; padding: 14px 16px;
}
.prac-card label, .form-lbl { display: block; font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 9px; }
.prac-card input[type=text], .prac-card input[type=date], .prac-card select, .prac-card textarea,
.sc-form input[type=text], .sc-form textarea {
  width: 100%; margin-top: 4px; padding: 8px 10px; border-radius: 9px;
  border: 1px solid rgba(242,199,92,0.28); background: rgba(7, 10, 32, 0.88);
  color: var(--cream); font-family: inherit; font-size: 13.5px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-lbl { font-size: 12px; color: var(--muted); font-weight: 600; margin: 10px 0 5px; }

.sens-pills, .chakra-check-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.sens-pill, .chk-pill {
  border: 1px solid rgba(255,255,255,0.16); background: rgba(255,255,255,0.04); color: var(--cream);
  padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.sens-pill.on, .chk-pill.on { border-color: var(--sc, var(--cc, var(--gold))); background: rgba(255,255,255,0.12); color: #fff; }
.sens-pill .dot, .chk-pill i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.sens-hint {
  border-left: 3px solid var(--gold); padding: 6px 10px; background: rgba(255,255,255,0.04);
  border-radius: 0 8px 8px 0; font-size: 12px; color: #dbe2fb; margin: 8px 0;
}

.bodymap-wrap {
  background: radial-gradient(circle at 50% 45%, rgba(42, 48, 118, 0.35), rgba(7, 9, 28, 0.8));
  border: 1px solid rgba(242,199,92,0.22); border-radius: 12px; padding: 6px; margin: 8px 0;
}
.bodymap-svg { width: 100%; max-height: 290px; display: block; cursor: crosshair; }
.pin-summary { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.pin-tag {
  font-size: 11px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px;
  background: rgba(255,255,255,0.06); display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
}
.pin-tag i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

.saved-sessions { display: flex; flex-direction: column; gap: 6px; max-height: 180px; overflow-y: auto; }
.sess-item {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 9px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
}
.sess-item strong { display: block; font-size: 13px; }
.sess-item span { font-size: 11.5px; color: var(--muted); }
.sess-acts { display: flex; gap: 5px; }

/* Aftercare Preview Card */
.aftercare-card {
  background: linear-gradient(160deg, #0b0e2e 0%, #161b50 55%, #07091e 100%);
  border: 2px solid rgba(242,199,92,0.65); border-radius: 16px; padding: 20px 22px; text-align: center;
  box-shadow: 0 18px 50px rgba(0,0,0,0.65), inset 0 0 0 1px rgba(242,199,92,0.22);
}
.ac-top-crest { font-size: 28px; margin-bottom: 4px; }
.ac-studio { font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.ac-title { font-family: var(--serif); font-size: 22px; margin: 4px 0; color: #fff6dc; }
.ac-meta { font-size: 12.5px; color: var(--muted); }
.ac-rule { height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); margin: 12px auto; width: 72%; }
.ac-sec-lbl { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin: 10px 0 5px; }
.ac-chakras { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; margin-bottom: 6px; }
.ac-badge {
  font-size: 11.5px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--cc);
  background: rgba(255,255,255,0.06); display: inline-flex; align-items: center; gap: 5px;
}
.ac-badge i { width: 8px; height: 8px; border-radius: 50%; }
.ac-copy { font-size: 13px; line-height: 1.48; color: #e2e8ff; margin: 0 0 6px; }
.ac-quote {
  margin: 10px 0; padding: 8px 12px; border-left: 3px solid var(--gold);
  background: rgba(242,199,92,0.09); font-family: var(--serif); font-style: italic;
  font-size: 14px; color: #fff6df; text-align: left;
}
.ac-care-box {
  display: flex; justify-content: space-around; flex-wrap: wrap; gap: 8px;
  font-size: 11.5px; color: #dbe2fb; background: rgba(255,255,255,0.05);
  border-radius: 9px; padding: 7px 8px; margin-top: 10px;
}
.ac-footer {
  margin-top: 12px; padding-top: 9px; border-top: 1px solid rgba(242,199,92,0.22);
  display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); gap: 8px; flex-wrap: wrap;
}

/* Distance Altar & Symbols */
.dist-clock-box {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 10px; padding: 6px;
}
.dist-clock-box span { font-size: 11px; color: var(--muted); }
.dist-clock-box strong { font-family: var(--serif); font-size: 24px; color: var(--gold); }
.dist-altar {
  position: relative; width: 290px; height: 290px; margin: 10px auto 4px;
  display: flex; align-items: center; justify-content: center;
}
.dist-mandala {
  width: 220px; height: 220px; border-radius: 50%; object-fit: cover;
  mask-image: radial-gradient(circle, #000 58%, transparent 74%);
  -webkit-mask-image: radial-gradient(circle, #000 58%, transparent 74%);
}
.dist-mandala.spin-slow { animation: slow-spin 42s linear infinite; }
.dist-center-pill {
  position: absolute; background: rgba(9,12,40,0.88); border: 1px solid var(--gold);
  border-radius: 12px; padding: 5px 12px; text-align: center; pointer-events: none; max-width: 170px;
}
.dist-center-pill small { display: block; font-size: 9.5px; color: var(--gold); text-transform: uppercase; letter-spacing: 0.1em; }
.dist-center-pill strong { font-size: 12.5px; color: #fff; }
.lotus-candle {
  position: absolute; width: 34px; height: 34px; transform: translate(-50%, -50%);
  border-radius: 50%; border: 1px solid rgba(255,255,255,0.22); background: rgba(15,18,52,0.86);
  cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0.42;
  transition: opacity 0.2s, box-shadow 0.2s, transform 0.15s;
}
.lotus-candle.lit { opacity: 1; border-color: var(--gold); box-shadow: 0 0 18px rgba(255, 209, 102, 0.85); transform: translate(-50%, -50%) scale(1.1); }

.sym-notice {
  font-size: 12.5px; color: #f6e7c2; background: rgba(242,199,92,0.09);
  border: 1px solid rgba(242,199,92,0.28); border-radius: 10px; padding: 8px 12px;
}
.sym-head { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.sym-kanji { font-size: 32px; font-weight: 700; line-height: 1; }
.sym-canvas-wrap canvas {
  width: 100%; max-width: 340px; aspect-ratio: 1; display: block; margin: 0 auto;
  border-radius: 14px; border: 1px solid var(--line); touch-action: none; cursor: crosshair;
}

/* ---------- Toast ---------- */
#toast {
  position: fixed; left: 50%; top: 15%; transform: translate(-50%, 8px);
  z-index: 110; pointer-events: none; opacity: 0;
  background: var(--glass-strong); border: 1px solid var(--gold); border-radius: 999px;
  padding: 9px 20px; font-size: 13.5px; font-weight: 600; color: #fff6dc;
  box-shadow: 0 12px 36px rgba(0,0,0,0.65); transition: opacity 0.35s, transform 0.35s;
  max-width: 90vw; text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive Mobile & Tablet ---------- */
@media (max-width: 820px) {
  .prac-grid-2, .sess-runner, .how-steps { grid-template-columns: 1fr; }
  .chip .txt, .chip kbd, .swatch .tip, #palette .lbl { display: none; }
  #statusPill { max-width: 48vw; padding: 6px 11px; }
  #sessionMiniPill { top: auto; bottom: max(124px, calc(env(safe-area-inset-bottom) + 112px)); }
  #card {
    right: 50%; transform: translate(50%, -50%) !important; width: 92vw;
    max-height: 74dvh; padding: 16px;
  }
  #frame { height: min(36dvh, 300px); width: 92vw; top: 38px; }
  #titleText { max-height: 55dvh; padding: 13px 15px; }
  .dock-btn { padding: 7px 11px; font-size: 12px; }
  .modal .box { padding: 16px; }
}

@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
  .palette-dots { gap: 5px; }
  .swatch { width: 17px; height: 17px; }
  #dock { gap: 2px; padding: 4px 5px; }
  .dock-btn { flex-direction: column; gap: 2px; padding: 5px 8px; border-radius: 14px; }
  .dock-btn span:not(.ico) { font-size: 10px; }
}

/* ---------- Clean Print Mode for Client Aftercare Card ---------- */
@media print {
  body * { visibility: hidden !important; }
  #practitionerModal, #practitionerModal * { visibility: visible !important; }
  #practitionerModal {
    position: static !important; background: #fff !important; padding: 0 !important;
  }
  #practitionerModal .modal-head, #practitionerModal .prac-tabs, #practitionerModal .prac-card:first-child {
    display: none !important;
  }
  #aftercarePrintArea {
    position: fixed !important; inset: 12mm !important;
    background: #0b0e2e !important; color: #f7efd9 !important;
    -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important;
  }
}
