/* Soul Values Mandala. Light skies only; --psm-bg and --psm-halo follow the chosen sky and colour. */
/* Full-width page without the theme's title and sidebar, as the profiler pages (tools.css). */
body.ptl-page { background: #F7FAFD !important; overflow-x: hidden; }
body.ptl-page .wp-block-post-title { display: none !important; }
body.ptl-page .entry-content > #psm-app, body.ptl-page .wp-block-post-content > #psm-app, body.ptl-page .is-layout-constrained > #psm-app { max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; }
body.ptl-page .entry-content, body.ptl-page #main-content { width: 100% !important; max-width: none !important; padding: 0 !important; margin: 0 !important; background: transparent !important; }

.psm, .psm-viewer {
  /* page colours from docs/brand/purnam-colours.json; the mandalas keep their own */
  --psm-bg: #F7FAFD; --psm-halo: #FFFDF8; --psm-ink: #09304D; --psm-soft: rgba(9,48,77,.68); --psm-line: rgba(9,48,77,.12);
  --psm-panel: rgba(255,255,255,.9); --psm-gold: #FFBD59; --psm-gold-ink: #09304D; --psm-accent: #005495;
  --psm-display: "Playfair Display", "Iowan Old Style", Georgia, serif; --psm-body: Lato, "Helvetica Neue", Arial, sans-serif;
  --psm-c1: rgba(204,236,255,.75); --psm-c2: rgba(80,149,179,.2); --psm-c3: rgba(255,223,174,.55);
}
.psm {
  position: relative; min-height: 100vh; background: var(--psm-bg); isolation: isolate; color: var(--psm-ink);
  font-family: var(--psm-body); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased;
  transition: background-color .8s ease;
}
.psm *, .psm *::before, .psm *::after { box-sizing: border-box; }
:where(.psm) :where(button, input, textarea) { font: inherit; color: inherit; }
.psm :focus-visible { outline: 2px solid var(--psm-accent); outline-offset: 3px; border-radius: 6px; }
.psm [hidden] { display: none !important; }

.psm-crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; letter-spacing: .04em; color: var(--psm-soft); }
.psm-crumbs a { color: var(--psm-accent); text-decoration: none; }
.psm-crumbs a:hover { text-decoration: underline; }
.psm-crumbs span[aria-hidden] { opacity: .5; }
.psm-top { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
.psm-top-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.psm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 999px; cursor: pointer; font-weight: 700; font-size: 14px; line-height: 1.2; letter-spacing: .02em; text-decoration: none; }
.psm-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.psm-btn-gold { border: 0; background: #005495; color: #fff; }
.psm-btn-gold:hover { background: #09304D; }
.psm-btn-blue { border: 0; background: #005495; color: #fff; }
.psm-btn-blue:hover { background: #09304D; }
.psm-btn-ghost { border: 1px solid var(--psm-line); background: rgba(255,255,255,.55); color: var(--psm-ink); }
.psm-btn:disabled { opacity: .55; cursor: progress; }
.psm-wide { width: 100%; }
.psm-form .psm-link { justify-self: center; }
.psm-link { border: 0; background: none; padding: 0; color: var(--psm-accent); text-decoration: underline; cursor: pointer; }

.psm-main { container: psm / inline-size; }
.psm-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.psm-intro, .psm-card { width: 100%; max-width: 560px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.psm-intro:empty, .psm-card:empty { display: none; }
.psm-intro { padding-top: 28px; text-align: center; }
.psm-eyebrow { margin: 0 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: var(--psm-accent); }
.psm-title { margin: 0 0 12px; font-family: var(--psm-display); font-weight: 500; font-size: clamp(32px, 4.4vw, 46px); line-height: 1.12; text-wrap: balance; color: var(--psm-ink); }
.psm-lede { margin: 0; color: var(--psm-soft); font-size: 17px; line-height: 1.6; text-wrap: pretty; }
.psm-card { padding-bottom: 32px; }

.psm-stage { position: relative; width: 100%; height: min(78vh, 820px, 118vw); min-height: 360px; touch-action: manipulation; transition: height .5s ease; }
.psm[data-mode="signin"] .psm-stage, .psm[data-mode="create"] .psm-stage, .psm[data-mode="loading"] .psm-stage { height: min(62vh, 640px); }
.psm-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: pointer; }
.psm-stage, .psm-stage * { -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.psm-stage :focus:not(:focus-visible) { outline: none; }
.psm-labels { position: absolute; inset: 0; pointer-events: none; }
.psm-val { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); pointer-events: auto; white-space: nowrap; border: 0; background: none; padding: 4px 8px; cursor: pointer;
  font-family: var(--psm-display); font-size: clamp(15px, 1.9vw, 21px); line-height: 1.2; letter-spacing: .01em; color: var(--psm-ink);
  text-shadow: 0 0 12px var(--psm-halo), 0 0 4px var(--psm-halo), 0 0 2px var(--psm-halo); opacity: 0; transition: opacity 1.2s ease, letter-spacing .6s ease; }
.psm-val.shown { opacity: 1; }
.psm-val:hover, .psm-val.lit { letter-spacing: .06em; }
.psm-core { font-style: italic; font-weight: 500; text-shadow: none; padding: 0; white-space: pre-line; text-align: center; line-height: 1.08; }
.psm-hint { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 10px auto 28px; padding: 8px 14px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; font-family: var(--psm-body); font-size: 14px; line-height: 20px; letter-spacing: .02em; color: #9A6B1F; transition: background-color .3s ease; }
.psm-hint:hover { background: rgba(255,189,89,.14); }
.psm-hint:focus { outline: none; }
.psm-hint:focus-visible { box-shadow: 0 0 0 3px rgba(0,84,149,.3); }
.psm-tap { display: block; width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; overflow: visible; }
.psm-tap-ring { transform-origin: 12px 12px; animation: psm-tap 2.6s ease-out infinite; }
@keyframes psm-tap { 0% { transform: scale(.55); opacity: 1; } 70%, 100% { transform: scale(1.05); opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .psm-tap-ring { animation: none; } }
.psm-ripple { position: absolute; z-index: 2; width: 160px; height: 160px; margin: -80px 0 0 -80px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,255,255,.55) 0, rgba(255,223,174,.35) 40%, rgba(255,223,174,0) 70%); border: 1.5px solid rgba(255,255,255,.7);
  animation: psm-ripple 1.5s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes psm-ripple { from { transform: scale(.15); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }
.psm-stage.is-redrawing canvas { cursor: progress; }
@media (prefers-reduced-motion: reduce) { .psm-ripple { animation-duration: .01s; } }
.psm[data-mode="signin"] .psm-hint, .psm[data-mode="loading"] .psm-hint, .psm[data-mode="create"] .psm-hint { display: none; }
/* while a link opens, nothing from the sign-in screen shows */
.psm-stage { transition: height .5s ease, opacity .6s ease; }
.psm[data-mode="loading"] .psm-stage, .psm[data-mode="loading"] .psm-card { opacity: 0; }
.psm-opening { text-align: center; padding: 48px 0; }

.psm-form { display: grid; gap: 14px; padding: 22px; border-radius: 20px; background: var(--psm-panel); box-shadow: 0 18px 50px rgba(9,48,77,.08); }
.psm-form > label, .psm-field label { font-size: 14px; line-height: 1.4; color: var(--psm-soft); }
.psm-field { display: grid; gap: 8px; }
.psm-text { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--psm-line); border-radius: 12px; background: #fff; font-size: 16px; line-height: 1.4; }
textarea.psm-text { min-height: 76px; resize: vertical; font-family: var(--psm-display); font-style: italic; }
.psm-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.psm-msg { margin: 0; min-height: 1.4em; font-size: 14px; line-height: 1.5; color: var(--psm-accent); }
.psm-msg:empty { min-height: 0; }
.psm-small { margin: 0; font-size: 13px; line-height: 1.5; color: var(--psm-soft); }
.psm-sent { padding: 24px; border-radius: 20px; background: var(--psm-panel); text-align: center; }
.psm-sent h2 { margin: 0 0 10px; font-family: var(--psm-display); font-weight: 500; font-size: 26px; line-height: 1.2; }
.psm-sent p { margin: 0 0 12px; line-height: 1.6; }
.psm-sup { display: grid; gap: 8px; }
.psm-then { display: flex; align-items: center; gap: 14px; margin: 0; }
.psm-then img { flex: 0 0 96px; width: 96px; height: 96px; object-fit: cover; border-radius: 14px; }
.psm-then figcaption { font-size: 14px; line-height: 1.5; color: var(--psm-soft); }
.psm-sup-row { display: flex; gap: 8px; }
.psm-sup-row .psm-text { min-width: 0; }
.psm-del { flex: 0 0 46px; border: 1px solid var(--psm-line); border-radius: 12px; background: #fff; cursor: pointer; color: var(--psm-soft); font-size: 18px; }
.psm-del:disabled { opacity: .3; cursor: default; }
.psm-add { justify-self: start; min-height: 40px; border: 1px dashed var(--psm-line); border-radius: 999px; padding: 7px 16px; background: transparent; cursor: pointer; color: var(--psm-soft); font-size: 14px; }
.psm-note, .psm-invite { margin: 0 auto; padding: 16px 20px; border-radius: 16px; background: var(--psm-panel); text-align: center; line-height: 1.6; }
.psm-invite p { margin: 0 0 12px; }

.psm-words { max-width: 640px; margin: 0 auto; padding: 8px max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); text-align: center; }
.psm-words blockquote { border: 0 !important; padding: 0 !important; background: none !important; quotes: none; margin: 0; font-family: var(--psm-display); font-style: italic; font-size: clamp(22px, 3.2vw, 30px); line-height: 1.35; text-wrap: balance; }
.psm-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 640px; margin: 0 auto; padding: 28px max(16px, env(safe-area-inset-right, 0px)) 32px max(16px, env(safe-area-inset-left, 0px)); border-top: 1px solid var(--psm-line); }
.psm-actions[hidden] { display: none; }
.psm-actions .psm-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 12px 24px; }
.psm-actions .psm-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.psm-btn-blue { border: 0; background: #005495; color: #fff; box-shadow: 0 10px 24px -12px rgba(0,84,149,.6); }
.psm-btn-blue:hover { background: #09304D; }
.psm-actions:not([hidden]) + .psm-passage { border-top: 0; padding-top: 8px; }
.psm-passage { max-width: 640px; margin: 0 auto; padding: 28px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); border-top: 1px solid var(--psm-line); }
.psm-passage { text-align: center; }
.psm-passage p { max-width: 34em; margin: 0 auto 14px; color: var(--psm-soft); font-size: 16px; line-height: 1.7; text-wrap: pretty; }
.psm[data-mode="loading"] .psm-passage, .psm[data-mode="signin"] .psm-passage { display: none; }

/* studio: a side panel on desktop, a bottom sheet on phones */
.psm-studio { position: fixed; z-index: 100001; left: 0; right: 0; bottom: 0; max-height: 62vh; display: flex; flex-direction: column;
  background: var(--psm-panel); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--psm-line); border-radius: 22px 22px 0 0;
  padding-bottom: env(safe-area-inset-bottom, 0px); transform: translateY(105%); visibility: hidden; transition: transform .45s cubic-bezier(.2,.8,.2,1), visibility 0s linear .45s; }
.psm-studio.open { transform: none; visibility: visible; transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.psm-studio header, .psm-sheet header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 8px; }
.psm-studio h2, .psm-sheet h2 { margin: 0; font-family: var(--psm-display); font-weight: 400; font-size: 22px; line-height: 1.2; }
.psm-x { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; font-size: 24px; line-height: 1; color: var(--psm-soft); }
.psm-scroll { overflow: auto; padding: 4px 18px 18px; display: grid; gap: 22px; }
.psm-group { display: grid; gap: 10px; }
.psm-group > span { font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--psm-soft); }
.psm-forms { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.psm-form-btn { display: grid; gap: 6px; justify-items: center; padding: 8px 2px; border: 1px solid var(--psm-line); border-radius: 14px; background: transparent; cursor: pointer; font-size: 12px; line-height: 1.2; }
.psm-form-btn canvas { width: 100%; max-width: 64px; aspect-ratio: 1; border-radius: 50%; }
.psm-form-btn[aria-pressed="true"] { border-color: var(--psm-accent); box-shadow: inset 0 0 0 1px var(--psm-accent); }
.psm-swatches, .psm-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.psm-sw { width: 40px; height: 40px; padding: 0; border: 2px solid transparent; border-radius: 50%; cursor: pointer; }
.psm-sw[aria-pressed="true"] { border-color: var(--psm-ink); transform: scale(1.08); }
.psm-chip { min-height: 40px; padding: 7px 14px; border: 1px solid var(--psm-line); border-radius: 999px; background: transparent; cursor: pointer; font-size: 14px; }
.psm-chip[aria-pressed="true"] { background: var(--psm-ink); color: #fff; border-color: var(--psm-ink); }
.psm-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.psm-row input[type=range] { flex: 1 1 160px; min-width: 0; height: 6px; margin: 0; padding: 0; border: 0; border-radius: 999px; box-shadow: none;
  -webkit-appearance: none; appearance: none; background: linear-gradient(90deg, #CCECFF, #5095B3 60%, #005495); cursor: pointer; }
.psm-row input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid #005495; box-shadow: 0 2px 6px rgba(9,48,77,.2); }
.psm-row input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid #005495; box-shadow: 0 2px 6px rgba(9,48,77,.2); }
.psm-reroll { display: inline-flex; align-items: center; gap: 8px; justify-self: start; }
.psm-reroll svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.psm-studio footer { padding: 12px 18px 16px; border-top: 1px solid var(--psm-line); }
.psm-studio-open .psm-stage { height: min(40vh, 520px); min-height: 260px; }
@media (min-width: 1200px) {
  .psm-studio { top: 0; left: auto; width: 380px; max-height: none; border-radius: 0; border-width: 0 0 0 1px; transform: translateX(105%); }
  .psm-studio header { padding: 30px 24px 12px; }
  .psm-studio:not(.is-under-menu) { box-shadow: -18px 0 40px -24px rgba(9,48,77,.35); }
  .psm-studio-open .psm-stage { height: min(78vh, 820px); }
  .psm { transition: background-color .8s ease, padding .45s cubic-bezier(.2,.8,.2,1); }
}
@container psm (min-width: 880px) {
  .psm[data-mode="signin"] .psm-grid, .psm[data-mode="create"] .psm-grid, .psm[data-mode="viewer"] .psm-grid { max-width: 1240px; margin: 0 auto; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-areas: "stage intro" "stage card"; align-items: center; column-gap: 24px; }
  .psm[data-mode="signin"] .psm-intro, .psm[data-mode="create"] .psm-intro, .psm[data-mode="viewer"] .psm-intro { grid-area: intro; align-self: end; text-align: left; margin: 0; }
  .psm[data-mode="signin"] .psm-card, .psm[data-mode="create"] .psm-card, .psm[data-mode="viewer"] .psm-card { grid-area: card; align-self: start; margin: 0; padding-top: 18px; }
  .psm[data-mode="signin"] .psm-stage, .psm[data-mode="create"] .psm-stage, .psm[data-mode="viewer"] .psm-stage { grid-area: stage; height: min(80vh, 760px); }
  .psm[data-mode="viewer"] .psm-invite { text-align: left; }
}

/* keep & share */
.psm-sheet-back { position: fixed; inset: 0; z-index: 100002; background: rgba(9,48,77,.28); }
.psm-sheet { position: fixed; z-index: 100003; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto;
  border-radius: 22px; background: #FFFCF7; box-shadow: 0 30px 80px rgba(9,48,77,.22); }
.psm-keep { display: grid; gap: 10px; padding: 4px 18px 20px; }
.psm-keep-row { display: grid; gap: 4px; width: 100%; padding: 14px 16px; border: 1px solid var(--psm-line); border-radius: 16px; background: #fff; text-align: left; cursor: pointer; }
.psm-keep-row b { font-weight: 700; font-size: 16px; line-height: 1.3; }
.psm-keep-row span { font-size: 14px; line-height: 1.45; color: var(--psm-soft); overflow-wrap: anywhere; }
.psm-keep-row:disabled { opacity: .6; cursor: progress; }
.psm-share { cursor: default; }
.psm-share .psm-row, .psm-share-on { margin-top: 8px; }
.psm-share-on { display: grid; gap: 10px; }

.psm-toast { position: fixed; z-index: 100004; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); padding: 10px 18px; border-radius: 999px; background: var(--psm-ink); color: #fff; font-size: 14px; line-height: 1.4; opacity: 0; pointer-events: none; transition: opacity .3s ease, transform .3s ease; }
.psm-toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 560px) {
  .psm-why li { max-width: none; }
  .psm[data-mode="signin"] .psm-stage, .psm[data-mode="create"] .psm-stage, .psm[data-mode="viewer"] .psm-stage { height: min(96vw, 440px); min-height: 300px; }
  .psm-quote { padding: 26px 22px; }
}
@media (max-width: 440px) {
  .psm-forms { grid-template-columns: repeat(3, 1fr); }
  .psm-top-actions { flex-wrap: nowrap; }
  .psm-crumbs span[aria-current] { display: none; }
  .psm-crumbs span[aria-hidden] { display: none; }
  .psm-top-actions .psm-btn { padding: 10px 14px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .psm, .psm-stage, .psm-studio, .psm-toast, .psm-val { transition: none; }
}

/* living background: three soft lights in the mandala's colours, drifting slowly */
.psm-aura { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
.psm-aura i { position: absolute; display: block; border-radius: 50%; filter: blur(70px); animation: psm-drift 42s ease-in-out infinite alternate; }
.psm-aura i:nth-child(1) { width: 60vmax; height: 60vmax; left: -18vmax; top: -10vmax; background: var(--psm-c1); }
.psm-aura i:nth-child(2) { width: 52vmax; height: 52vmax; right: -16vmax; top: 30vh; background: var(--psm-c2); animation-duration: 55s; animation-delay: -12s; }
.psm-aura i:nth-child(3) { width: 46vmax; height: 46vmax; left: 25%; top: 120vh; background: var(--psm-c3); animation-duration: 64s; animation-delay: -30s; }
@keyframes psm-drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(7vmax, 5vmax) scale(1.12); } 100% { transform: translate(-4vmax, 9vmax) scale(.95); } }

.psm-join { margin: 14px 0 0; font-size: 14px; line-height: 1.6; color: var(--psm-soft); text-align: center; }
.psm-join a, .psm-note a { color: var(--psm-accent); }

/* about soul values */
.psm-learn { max-width: 1080px; margin: 0 auto; padding: 40px max(16px, env(safe-area-inset-right, 0px)) 112px max(16px, env(safe-area-inset-left, 0px)); }
/* a quiet break between the course passage and the next section: a line on each side meeting the lotus at its middle */
.psm-divider { display: flex; align-items: center; gap: 12px; width: min(440px, 82%); margin: 8px auto 12px; }
.psm-divider i { flex: 1; height: 2px; }
.psm-divider i:first-child { background: linear-gradient(90deg, transparent, rgba(201,133,42,.85)); }
.psm-divider i:last-child { background: linear-gradient(90deg, rgba(201,133,42,.85), transparent); }
.psm-divider span { flex: none; width: 48px; height: 36px; background: url("img/lotus-mark.svg") center / contain no-repeat; }
.psm[data-mode="loading"] .psm-divider { display: none; }
.psm-learn-head { max-width: 640px; margin: 0 auto 32px; text-align: center; }
.psm-learn h2, .psm-gallery h2 { margin: 0 0 14px; font-family: var(--psm-display); font-weight: 500; font-size: clamp(30px, 4vw, 42px); line-height: 1.15; text-wrap: balance; }
.psm-learn h3 { margin: 0 0 16px; font-family: var(--psm-display); font-weight: 500; font-size: 24px; line-height: 1.25; }
.psm-why { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 0; padding: 0; list-style: none; }
.psm-why li { --tone: #3399CC; --wash: #E3F3FF; flex: 1 1 180px; max-width: 250px; display: grid; gap: 10px; align-content: start; padding: 20px 22px; border-radius: 22px;
  background: linear-gradient(165deg, var(--wash) 0%, rgba(255,255,255,.92) 62%); border: 1px solid color-mix(in srgb, var(--tone) 22%, transparent);
  box-shadow: 0 14px 34px color-mix(in srgb, var(--tone) 14%, transparent); transition: transform .5s cubic-bezier(.2,.8,.2,1), box-shadow .5s ease; }
.psm-why li:hover { transform: translateY(-5px); box-shadow: 0 22px 44px color-mix(in srgb, var(--tone) 22%, transparent); }
.psm-why li:nth-child(2) { --tone: #E59A1F; --wash: #FFEFD4; }
.psm-why li:nth-child(3) { --tone: #005495; --wash: #E2ECF7; }
.psm-why li:nth-child(4) { --tone: #D44BA0; --wash: #FCEAF4; }
.psm-why li:nth-child(5) { --tone: #5095B3; --wash: #E3F1F6; }
.psm-why b { display: flex; align-items: center; gap: 12px; font-family: var(--psm-display); font-weight: 500; font-size: 19px; line-height: 1.3; }
.psm-why b::before { content: ""; flex: 0 0 16px; display: block; width: 16px; height: 16px; margin: 0 2px; border-radius: 0 62% 0 62%; transform: rotate(45deg);
  background: linear-gradient(135deg, #fff 0%, var(--tone) 85%); box-shadow: 0 0 0 6px color-mix(in srgb, var(--tone) 12%, transparent), 0 6px 16px color-mix(in srgb, var(--tone) 35%, transparent); animation: psm-glow 6s ease-in-out infinite; }
.psm-why li:nth-child(2) b::before { animation-delay: -1.2s; } .psm-why li:nth-child(3) b::before { animation-delay: -2.4s; } .psm-why li:nth-child(4) b::before { animation-delay: -3.6s; } .psm-why li:nth-child(5) b::before { animation-delay: -4.8s; }
@keyframes psm-glow { 0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone) 12%, transparent), 0 3px 8px color-mix(in srgb, var(--tone) 30%, transparent); } 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--tone) 16%, transparent), 0 4px 12px color-mix(in srgb, var(--tone) 40%, transparent); } }
.psm-why span { font-size: 15px; line-height: 1.6; color: var(--psm-soft); }
.psm-quote { /* the lighter parchment of the Auroville page's founding-message card */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .33 0 0 0 0 .18 0 0 0 .055 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(90% 70% at 50% 0%, rgba(255,223,174,.42), rgba(255,223,174,0) 70%), radial-gradient(60% 60% at 0% 100%, rgba(230,190,140,.15), rgba(230,190,140,0) 70%),
    linear-gradient(180deg, #FFFCF7 0%, #FFF8EE 65%, #FFF3E4 100%);
  border: 1px solid rgba(201,133,42,.25); box-shadow: 0 24px 50px -30px rgba(120,80,20,.35), inset 0 0 0 1px rgba(201,133,42,.18), inset 0 0 45px rgba(201,150,80,.08); }
.psm-quote::before { content: ""; position: absolute; left: 50%; top: 12px; width: 58px; height: 34px; transform: translateX(-50%); background: url("img/lotus-mark.svg") center / contain no-repeat; }
.psm-quote { position: relative; margin: 56px auto; max-width: 720px; padding: 56px 40px 32px; border-radius: 26px; text-align: center; overflow: hidden; }
.psm-quote p { position: relative; margin: 0; font-family: var(--psm-display); font-style: italic; font-size: clamp(21px, 2.6vw, 27px); line-height: 1.35; text-wrap: balance; }

.psm-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 18px; }
.psm-steps, .psm-helps { padding: 30px 28px; border-radius: 28px; border: 1px solid rgba(0,84,149,.1); box-shadow: 0 16px 40px rgba(9,48,77,.07); }
.psm-steps { background: linear-gradient(170deg, #E7F4FF 0%, rgba(255,255,255,.94) 55%); }
.psm-helps { background: linear-gradient(170deg, #FFF1DA 0%, rgba(255,255,255,.94) 55%); }
.psm-steps ol { margin: 0; padding: 0; list-style: none; counter-reset: psm; display: grid; gap: 14px; }
.psm-steps li { counter-increment: psm; display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; font-size: 16px; line-height: 1.55; }
.psm-steps li::before { content: counter(psm); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #CCECFF; color: #005495; font-weight: 700; font-size: 14px; line-height: 1; }
.psm-mother { margin: 26px 0 0; padding: 18px 0 0; border-top: 1px solid rgba(0,84,149,.14); }
.psm-mother blockquote { margin: 0 0 10px; font-family: var(--psm-display); font-style: italic; font-size: 18px; line-height: 1.5; color: var(--psm-ink); }
.psm-mother figcaption { font-size: 13px; line-height: 1.5; color: var(--psm-soft); }
.psm-helps dl { margin: 0; display: grid; gap: 6px; }
.psm-helps dt { font-family: var(--psm-display); font-size: 19px; line-height: 1.3; }
.psm-helps dd { margin: 0 0 14px; font-size: 15px; line-height: 1.6; color: var(--psm-soft); }

/* community gallery */
.psm-gallery { max-width: 1080px; margin: 0 auto; padding: 8px max(16px, env(safe-area-inset-right, 0px)) 112px max(16px, env(safe-area-inset-left, 0px)); text-align: center; }
.psm-gallery h2 { margin-bottom: 0; }
.psm-gdots { display: none; }
.psm-gallery h2::after { content: ""; display: block; width: 180px; height: 12px; margin: 22px auto 0;
  background: radial-gradient(circle, #FFBD59 0 3px, transparent 3.5px) center / 12px 12px no-repeat,
    linear-gradient(90deg, transparent, rgba(255,189,89,.85) 30%, rgba(0,84,149,.35) 50%, rgba(255,189,89,.85) 70%, transparent) center / 100% 1px no-repeat; }
.psm-gallery-grid { position: relative; width: 100%; aspect-ratio: 1 / 0.86; margin-top: 64px; }
.psm-orb { position: absolute; left: var(--l); top: var(--t); width: var(--w); display: grid; justify-items: center; gap: 16px; padding: 0; border: 0; background: none; cursor: zoom-in;
  animation: psm-float 9s ease-in-out var(--delay, 0s) infinite alternate; }
.psm-plate { position: relative; display: block; width: 100%; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 50% 42%, #FFFFFF 0%, #FFFDF8 55%, #F4F8FC 100%);
  box-shadow: 0 0 0 1px rgba(0,84,149,.08), 0 0 0 7px rgba(255,255,255,.65), 0 0 0 8px rgba(255,189,89,.28), 0 22px 46px rgba(9,48,77,.13);
  transition: transform .6s cubic-bezier(.2,.8,.2,1), box-shadow .6s ease; }
.psm-plate canvas { position: absolute; inset: 3%; width: 94%; height: 94%; }
.psm-orb:hover .psm-plate, .psm-orb:focus-visible .psm-plate { transform: translateY(-6px) scale(1.03);
  box-shadow: 0 0 0 1px rgba(0,84,149,.1), 0 0 0 7px rgba(255,255,255,.8), 0 0 0 8px rgba(255,189,89,.45), 0 34px 60px rgba(9,48,77,.2); }
.psm-orb:focus-visible { outline: none; }
.psm-orb:focus-visible .psm-gcap b { text-decoration: underline; }
@keyframes psm-float { 0% { transform: translateY(0); } 100% { transform: translateY(-14px); } }
.psm-gcap { display: grid; gap: 2px; line-height: 1.35; }
.psm-gcap b { font-family: var(--psm-display); font-weight: 500; font-size: 18px; }
.psm-gcap span { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--psm-soft); }
.psm-gcore { font-family: var(--psm-display); font-style: italic; }
.psm-viewer { position: fixed; inset: 0; z-index: 100005; display: grid; place-items: center; padding: 20px; background: rgba(9,48,77,.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); overflow-y: auto; }
.psm-viewer-card { position: relative; width: min(560px, 100%); margin: auto; padding: 22px 22px 26px; border-radius: 28px; background: #fff; text-align: center; box-shadow: 0 40px 90px rgba(9,48,77,.3); }
.psm-viewer-card .psm-x { position: absolute; right: -14px; top: -14px; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; font-size: 20px; background: #fff; color: #09304D; box-shadow: 0 6px 18px rgba(9,48,77,.22); }
.psm-viewer-card .psm-x:hover { background: #fff; }
.psm-viewer-card .psm-x:focus { outline: none; }
.psm-viewer-card .psm-x:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(0,84,149,.35), 0 4px 14px rgba(9,48,77,.18); }
.psm-viewer-card canvas { display: block; width: 100%; aspect-ratio: 1; border-radius: 20px; }
.psm-viewer-cap { padding-top: 14px; }
.psm-viewer-cap h3 { margin: 0 0 8px; font-family: var(--psm-display); font-weight: 500; font-size: 24px; line-height: 1.25; }
.psm-viewer-cap p:last-child { margin: 0; font-size: 16px; line-height: 1.55; color: var(--psm-soft); }
.psm-viewer-cap .psm-eyebrow { margin-bottom: 6px; }
.psm-gname { flex: 1 1 140px; min-height: 44px; }
.psm[data-mode="loading"] .psm-learn { display: none; }
@media (prefers-reduced-motion: reduce) { .psm-aura i, .psm-why b::before, .psm-orb { animation: none; } .psm-plate { transition: none; } .psm-why li { transition: none; } }

@media (max-width: 560px) {
  /* gallery: a swipeable row on phones (after the base gallery rules so it wins) */
  .psm-gallery-grid { display: flex; gap: 32px; width: auto; overflow-x: auto; margin: 24px -16px 0; padding: 14px 11% 18px; scroll-padding: 0 11%; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .psm-gdots { display: flex; justify-content: center; gap: 10px; margin-top: 6px; }
  .psm-gdots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: rgba(0,84,149,.22); cursor: pointer; transition: width .35s ease, background .35s ease; }
  .psm-gdots button.on { width: 22px; background: #005495; }
  .psm-gallery-grid::-webkit-scrollbar { display: none; }
  .psm-gallery-grid { -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); }
  .psm-passage p { font-size: 15.5px; line-height: 1.75; }
  .psm-gallery-grid { aspect-ratio: auto; }
  .psm-orb { position: static; flex: 0 0 78%; width: auto; scroll-snap-align: center; animation: none; }
  .psm-why li { max-width: none; }
  .psm[data-mode="owner"]:not(.psm-studio-open) .psm-stage { height: min(96vw, 460px); min-height: 300px; }
  .psm-stage { width: calc(100% - 32px); margin-left: auto; margin-right: auto; }
}

/* ---------- guided tour: the page's own blues and white, a gold step count ---------- */
.psm-help { flex: none; align-self: center; width: 44px; height: 44px; padding: 0; border: 1px solid rgba(0,84,149,.22); border-radius: 50%; background: #fff; color: #005495; font: 700 18px/1 "Playfair Display", Georgia, serif; cursor: pointer; }
.psm-help:hover { background: #F2F8FC; }
.psm-help[hidden] { display: none; }
.psm-tour { position: fixed; inset: 0; z-index: 100008; opacity: 0; transition: opacity .3s ease; font-family: Lato, "Helvetica Neue", Arial, sans-serif; }
.psm-tour.on { opacity: 1; }
.psm-tour-spot { position: fixed; border-radius: 16px; box-shadow: 0 0 0 9999px rgba(9,48,77,.58), 0 0 0 2px #CCECFF, 0 0 26px 6px rgba(80,149,179,.55); transition: left .45s cubic-bezier(.4, 0, .2, 1), top .45s cubic-bezier(.4, 0, .2, 1), width .45s cubic-bezier(.4, 0, .2, 1), height .45s cubic-bezier(.4, 0, .2, 1); pointer-events: none; }
.psm-tour-card { position: fixed; box-sizing: border-box; padding: 18px 20px 14px; border-radius: 18px; background: #fff; color: #09304D; box-shadow: 0 20px 50px -18px rgba(9,48,77,.6); transition: left .45s cubic-bezier(.4, 0, .2, 1), top .45s cubic-bezier(.4, 0, .2, 1); }
.psm-tour-count { margin: 0 0 4px; font-size: 11px; line-height: 1.4; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: #C9852A; }
.psm-tour-card h2 { margin: 0 0 6px; font: 500 21px/1.25 "Playfair Display", Georgia, serif; color: #09304D; }
.psm-tour-text { margin: 0 0 14px; font-size: 15px; line-height: 1.55; color: #4E5B66; }
.psm-tour-nav { display: flex; align-items: center; gap: 8px; }
.psm-tour-nav span { flex: 1; }
.psm-tour-nav button { min-height: 40px; padding: 8px 16px; border-radius: 999px; font: 700 14px/1.2 Lato, sans-serif; cursor: pointer; border: 1px solid rgba(0,84,149,.22); background: transparent; color: #09304D; }
.psm-tour-nav .psm-tour-skip { border: 0; padding: 8px 6px; color: #6B7682; font-weight: 400; }
.psm-tour-nav .psm-tour-next { border: 0; background: #005495; color: #fff; box-shadow: 0 8px 18px -10px rgba(0,84,149,.7); }
.psm-tour-nav .psm-tour-next:hover { background: #09304D; }
.psm-tour-nav button[hidden] { display: none; }
.psm-tour-nav button:focus-visible { outline: 3px solid #5095B3; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .psm-tour, .psm-tour-spot, .psm-tour-card { transition: none; } }
/* phones: Keep & share and "?" on the first row, Customise across the second, both rows the same width */
@media (max-width: 560px) {
  .psm-actions { display: grid; grid-template-columns: auto auto auto; justify-content: center; }
  .psm-actions #psm-keep { grid-column: 1; grid-row: 1; justify-content: center; }
  .psm-actions #psm-help { grid-column: 2; grid-row: 1; }
  .psm-actions #psm-sound { grid-column: 3; grid-row: 1; }
  .psm-actions #psm-make { grid-column: 1 / -1; grid-row: 2; justify-content: center; }
}

/* sound on/off beside the tour button; the same chimes and setting as the certificate */
.psm-sound { display: grid; place-items: center; }
.psm-sound svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.psm-sound .x, .psm-sound.is-off .w1, .psm-sound.is-off .w2 { display: none; }
.psm-sound.is-off .x { display: inline; }
.psm-sound[hidden] { display: none; }
@media (max-width: 360px) {
  .psm-actions { gap: 8px; }
  .psm-actions .psm-btn { white-space: nowrap; padding: 12px 16px; }
  .psm-actions .psm-help { width: 40px; height: 40px; }
}

/* Taps and double-taps never select text: no blue highlight on buttons, artwork or labels. Fields stay selectable. */
.psm-app, .psm-app *, .psm-tour, .psm-tour *, .ptl-loader, .ptl-loader * { -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }
.psm-app input, .psm-app textarea, .psm-app select, .psm-app [contenteditable], .psm-tour input, .psm-tour textarea, .psm-tour select, .psm-tour [contenteditable], .ptl-loader input, .ptl-loader textarea, .ptl-loader select, .ptl-loader [contenteditable] { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
/* anything that responds to a tap shows the hand */
.psm[data-mode="owner"] .psm-stage, .psm[data-mode="viewer"] .psm-stage { cursor: pointer; }
.psm-app button, .psm-app [role="button"], .psm-app label[for], .psm-app summary, .psm-tour button, .ptl-loader button { cursor: pointer; }
.psm-app button:disabled { cursor: default; }

/* the gallery viewer sits on <body>, outside .psm */
.psm-viewer, .psm-viewer * { box-sizing: border-box; }
.psm-viewer { font-family: var(--psm-body); font-size: 16px; line-height: 1.55; color: var(--psm-ink); -webkit-font-smoothing: antialiased; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.psm-viewer button { font: inherit; color: inherit; }
.psm-viewer[hidden] { display: none; }
