/* Chaotic Good Guild: shared styles for every page.
   The village scene is the homepage; every character is a door to a room page.
   Single committed night theme. */
:root {
  --night: #0d0418;
  --dusk: #1b0b33;
  --violet: #6000AE;
  --gold: #e9d701;
  --ink: #f3ecff;
  --muted: #b9a8d6;
  --ember: #d23a4a;
  --display: "Pirata One", "UnifrakturCook", Georgia, serif;
  --body: "Alegreya", Georgia, "Times New Roman", serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--night); color: var(--ink); font-family: var(--body); font-size: 18px; line-height: 1.55; }
a { color: var(--gold); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px clamp(16px, 4vw, 48px); background: var(--night); border-bottom: 1px solid rgba(233,215,1,.18); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { height: 92px; width: auto; display: block; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }
.brand-legacy b { font-family: var(--display); font-weight: 400; font-size: clamp(24px, 3.4vw, 34px); letter-spacing: .02em; line-height: 1; }
.brand-legacy b span { color: var(--gold); }
.join-btn { font-family: var(--display); font-size: 20px; color: var(--night); background: var(--gold); text-decoration: none; padding: 8px 18px; border-radius: 999px; white-space: nowrap; box-shadow: 0 0 0 3px rgba(96,0,174,.6); transition: transform .15s ease; }
.join-btn:hover { transform: translateY(-2px); }

/* Scene */
.scene-wrap { position: relative; background: var(--dusk); }
#scene { display: block; width: 100%; height: auto; }
.spot { cursor: pointer; outline: none; }
.spot .art { transition: filter .25s ease, transform .25s ease; transform-box: fill-box; transform-origin: center bottom; }
.spot:hover .art, .spot:focus-visible .art, .spot.active .art { filter: drop-shadow(0 0 10px rgba(233,215,1,.85)) drop-shadow(0 0 2px rgba(255,255,255,.6)); transform: translateY(-3px); }
.spot:focus-visible .hit { stroke: var(--gold); stroke-width: 3; stroke-dasharray: 8 6; }

/* Popup */
#tip { position: absolute; z-index: 5; width: min(300px, 80vw); background: rgba(13,4,24,.96); border: 2px solid var(--gold); border-radius: 14px; padding: 14px 16px 12px; box-shadow: 0 10px 40px rgba(0,0,0,.6), 0 0 0 4px rgba(96,0,174,.55); pointer-events: none; opacity: 0; transform: translateY(6px); transition: opacity .18s ease, transform .18s ease; }
#tip.show { opacity: 1; transform: translateY(0); }
#tip.touch { pointer-events: auto; }
#tip h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.05; color: var(--gold); text-wrap: balance; }
#tip .who { margin: 2px 0 8px; font-style: italic; color: var(--muted); font-size: 15px; }
#tip p { margin: 0 0 10px; font-size: 16px; line-height: 1.45; }
#tip .cta { font-family: var(--display); font-size: 18px; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; background: var(--violet); border: 0; border-radius: 999px; padding: 4px 14px; cursor: pointer; }

/* Intro + directory */
main { padding: clamp(28px, 5vw, 64px) clamp(16px, 4vw, 48px) 40px; max-width: 1200px; margin: 0 auto; }
.intro { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); align-items: start; }
.intro h1 { font-family: var(--display); font-weight: 400; font-size: clamp(40px, 6vw, 72px); line-height: .95; margin: 0 0 12px; text-wrap: balance; }
.intro h1 em { font-style: normal; color: var(--gold); }
.intro .how { color: var(--muted); max-width: 52ch; margin: 0; }
.mission { border-left: 3px solid var(--violet); padding-left: 20px; margin: 6px 0 0; max-width: 60ch; }
.mission p { margin: 0 0 10px; }
.mission cite { font-style: normal; font-family: var(--display); color: var(--gold); font-size: 20px; }

.places-h { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 4vw, 44px); margin: clamp(40px, 6vw, 72px) 0 16px; }
.places { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; list-style: none; padding: 0; margin: 0; }
.places a { display: flex; flex-direction: column; gap: 4px; height: 100%; text-decoration: none; color: var(--ink); background: linear-gradient(180deg, rgba(96,0,174,.22), rgba(96,0,174,.08)); border: 1px solid rgba(185,168,214,.25); border-radius: 12px; padding: 16px 16px 14px; transition: border-color .2s ease, transform .2s ease; }
.places a:hover { border-color: var(--gold); transform: translateY(-2px); }
.places .t { font-family: var(--display); font-size: 25px; line-height: 1.05; color: var(--gold); }
.places .w { font-style: italic; color: var(--muted); font-size: 15px; }
.places .d { font-size: 16px; line-height: 1.45; flex: 1; }

footer { text-align: center; color: var(--muted); font-size: 15px; padding: 28px 16px 40px; border-top: 1px solid rgba(233,215,1,.15); }
footer b { font-family: var(--display); font-weight: 400; color: var(--gold); font-size: 19px; }

@media (max-width: 760px) {
  .intro { grid-template-columns: 1fr; }
  .join-btn { font-size: 17px; padding: 6px 14px; }
  .brand img { height: 68px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Footer logo */
.foot-logo { height: 110px; width: auto; display: block; margin: 0 auto 8px; }
.foot-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; list-style: none; padding: 0; margin: 0 0 14px; }
.foot-nav a { color: var(--muted); text-decoration: none; }
.foot-nav a:hover { color: var(--gold); }

/* Room pages */
.room-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; max-width: 1200px; margin: 0 auto; padding: clamp(28px, 5vw, 64px) clamp(16px, 4vw, 48px); }
.vignette { position: relative; margin: 0; border-radius: 50% 50% 18px 18px / 34% 34% 18px 18px; overflow: hidden; border: 2px solid var(--gold); box-shadow: 0 0 0 6px rgba(96,0,174,.5), 0 30px 80px rgba(0,0,0,.6); background: var(--dusk); }
.vignette img { display: block; width: 100%; height: auto; }
.room-hero .who { font-style: italic; color: var(--muted); margin: 0 0 6px; font-size: 19px; }
.room-hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(44px, 7vw, 84px); line-height: .95; margin: 0 0 18px; color: var(--gold); text-wrap: balance; }
.room-hero .desc { font-size: clamp(19px, 2.1vw, 23px); line-height: 1.5; margin: 0 0 22px; max-width: 34ch; }
.raising { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 26px; padding: 12px 16px; border: 1px dashed rgba(233,215,1,.5); border-radius: 12px; color: var(--muted); font-size: 16px; max-width: 46ch; }
.raising svg { flex: none; width: 22px; height: 22px; margin-top: 2px; }
.back-btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 21px; background: var(--gold); color: var(--night); text-decoration: none; border-radius: 999px; padding: 8px 22px; box-shadow: 0 0 0 3px rgba(96,0,174,.6); transition: transform .15s ease; }
.back-btn:hover { transform: translateY(-2px); }
.top .back-link { font-family: var(--display); font-size: 20px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.top .back-link:hover { color: var(--gold); }

/* 404 */
.lost { text-align: center; max-width: 640px; margin: 0 auto; padding: clamp(48px, 10vw, 120px) 16px; }
.lost h1 { font-family: var(--display); font-weight: 400; font-size: clamp(44px, 8vw, 80px); line-height: 1; margin: 0 0 16px; color: var(--gold); }
.lost p { font-size: 20px; margin: 0 0 26px; }

@media (max-width: 760px) {
  .room-hero { grid-template-columns: 1fr; }
  .foot-logo { height: 84px; }
}

/* ---------- Alignment test ---------- */
/* Axis colors: Lawful red, Chaotic gold, Good purple, Evil black; Neutral silver */
.at { --law: #e0283f; --chaos: #e9d701; --good: #b06cff; --evil: #000; --neu: #cfc8dc; --muted: #ddd2f2; --card: #1c0a38; --edge: #8f6fd6; }
.at-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; }
.at-facts span { font-size: 14px; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: rgba(96,0,174,.45); border: 1px solid var(--edge); border-radius: 999px; padding: 4px 12px; }
.at-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0 0 18px; }
button.back-btn { border: 0; cursor: pointer; }
.at .back-btn { box-shadow: 0 0 0 3px rgba(96,0,174,.8), 0 8px 30px rgba(233,215,1,.35); }
.at-ghost { font-family: var(--display); font-size: 20px; color: #fff; background: rgba(96,0,174,.35); border: 2px solid var(--gold); border-radius: 999px; padding: 6px 20px; cursor: pointer; text-decoration: none; }
.at-ghost:hover { background: rgba(233,215,1,.15); color: var(--gold); }
.at-link { font: inherit; color: var(--gold); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.at-link:disabled { color: rgba(221,210,242,.35); cursor: default; text-decoration: none; }
.at-notice { font-size: 15px; color: var(--muted); max-width: 60ch; margin: 0; line-height: 1.5; }
.at-prev { margin: 0 0 16px; }

/* Test pages sit on a richer purple so a black aura reads clearly */
body:has(main.at) { background: radial-gradient(1100px 620px at 50% -8%, #5c25a6 0%, rgba(92,37,166,0) 70%), linear-gradient(180deg, #3d1777 0%, #2c0e5c 55%, #200846 100%) fixed; background-color: #2c0e5c; }
body:has(main.at) .top { background: rgba(20,6,40,.35); border-bottom-color: rgba(233,215,1,.3); }
body:has(main.at) footer { border-top-color: rgba(233,215,1,.3); }

/* Quiz card */
.at-quiz { max-width: 900px; margin: clamp(24px, 5vw, 56px) auto; padding: 0 clamp(16px, 4vw, 48px); }
.at-card { position: relative; background: linear-gradient(180deg, #24104a, #150828); border: 2px solid var(--edge); border-radius: 22px; padding: clamp(22px, 4vw, 44px); box-shadow: 0 0 0 4px rgba(96,0,174,.35), 0 0 60px rgba(176,108,255,.35), 0 30px 80px rgba(0,0,0,.55); }
.at-progress { height: 12px; border-radius: 999px; background: #0c0518; border: 1px solid #3d2470; overflow: hidden; }
.at-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--law), var(--good) 50%, var(--chaos)); box-shadow: 0 0 16px rgba(176,108,255,.8); transition: width .3s ease; }
.at-count { color: var(--gold); font-weight: 700; font-size: 15px; letter-spacing: .1em; text-transform: uppercase; margin: 16px 0 0; font-variant-numeric: tabular-nums; }
.at-statement { color: #fff; font-size: clamp(28px, 4.2vw, 46px); line-height: 1.2; margin: 14px 0 32px; min-height: 2.4em; text-wrap: balance; text-shadow: 0 2px 24px rgba(176,108,255,.45); }
.at-statement.at-in { animation: atIn .35s ease; }
@keyframes atIn { from { opacity: .2; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.at-scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.at-opt { display: flex; flex-direction: column; align-items: center; gap: 8px; font: inherit; font-size: 16px; font-weight: 600; line-height: 1.2; color: #fff; background: linear-gradient(180deg, #3a1a72, #2a0f55); border: 2px solid var(--edge); border-radius: 16px; padding: 16px 8px; cursor: pointer; box-shadow: 0 4px 0 #0c0518; transition: border-color .15s ease, background .15s ease, transform .1s ease, box-shadow .15s ease; }
.at-opt:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: 0 7px 0 #0c0518, 0 0 26px rgba(233,215,1,.45); }
.at-opt:active { transform: translateY(1px); box-shadow: 0 2px 0 #0c0518; }
.at-opt[aria-pressed="true"] { background: var(--gold); border-color: #fff6a8; color: #1a0a2e; box-shadow: 0 4px 0 #8a7a00, 0 0 30px rgba(233,215,1,.7); }
.at-opt[aria-pressed="true"] .at-key { background: #1a0a2e; color: var(--gold); }
.at-key { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: #1a0a2e; font-family: var(--display); font-size: 22px; line-height: 1; }
.at-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.at-tip { color: var(--muted); font-size: 14px; }

/* Result */
.at-result { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 60px); align-items: start; max-width: 1200px; margin: 0 auto; padding: clamp(28px, 5vw, 64px) clamp(16px, 4vw, 48px); }
.at-portrait { margin: 0; position: sticky; top: 16px; border: 3px solid var(--gold); border-radius: 20px; overflow: hidden; background: #f3dfae; box-shadow: 0 0 0 6px rgba(96,0,174,.75), 0 0 40px 10px var(--tint, rgba(233,215,1,.55)), 0 0 110px 34px var(--tint, rgba(233,215,1,.4)); }
.at-portrait img { display: block; width: 100%; height: auto; filter: saturate(1.08) contrast(1.12) brightness(1.05); }
.at-res-body h1 { font-family: var(--display); font-weight: 400; font-size: clamp(48px, 7vw, 92px); line-height: .95; margin: 0 0 10px; color: var(--gold); text-shadow: 0 0 30px rgba(233,215,1,.45), 0 3px 0 #3d0872; }
.at-res-body .who { font-style: italic; color: var(--muted); margin: 0 0 6px; font-size: 19px; }
.at-host { margin: 0 0 18px; color: var(--muted); font-size: 19px; }
.at-host b { color: #fff; }
.at-res-desc { color: #fff; font-size: clamp(18px, 1.8vw, 21px); line-height: 1.55; margin: 0 0 24px; max-width: 60ch; }
.at-axes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 26px; }
.at-axes div { background: var(--card); border: 2px solid var(--edge); border-radius: 14px; padding: 12px 14px; }
.at-axes dt { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.at-axes dd { margin: 4px 0 0; font-size: 19px; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
.at-meter { position: relative; display: block; height: 10px; margin-top: 10px; border-radius: 999px; background: linear-gradient(90deg, rgba(224,40,63,.35), rgba(255,255,255,.12) 50%, rgba(233,215,1,.35)); }
.at-meter.heart { background: linear-gradient(90deg, rgba(0,0,0,.85), rgba(255,255,255,.12) 50%, rgba(176,108,255,.4)); }
.at-meter::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: rgba(255,255,255,.7); }
.at-meter i { position: absolute; top: 0; bottom: 0; left: 50%; width: 0; border-radius: 999px; background: var(--neu); border: 1px solid rgba(255,255,255,.75); box-shadow: 0 0 12px currentColor; transition: left .9s ease, width .9s ease; }
.at-meter-ends { display: flex; justify-content: space-between; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; margin-top: 4px; font-weight: 700; }

/* The grid: edges glow with the axis colors, corners blend */
.at-gridwrap { position: relative; max-width: 460px; margin: 0 0 28px; padding: 30px 88px; }
.at-axis { position: absolute; font-size: 14px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; text-shadow: 0 0 12px currentColor; }
.at-axis-bottom, .at-evil { color: #fff !important; background: #000; border: 1px solid rgba(255,255,255,.6); border-radius: 6px; padding: 1px 8px; text-shadow: none; }
.at-axis-top { top: 2px; left: 50%; transform: translateX(-50%); color: var(--good); }
.at-axis-bottom { bottom: 2px; left: 50%; transform: translateX(-50%); color: var(--evil); }
.at-axis-left { left: 0; top: 50%; transform: translateY(-50%); color: var(--law); }
.at-axis-right { right: 0; top: 50%; transform: translateY(-50%); color: var(--chaos); }
.at-grid { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); aspect-ratio: 1; border: 2px solid rgba(255,255,255,.55); border-radius: 16px; overflow: hidden;
  background:
    linear-gradient(90deg, rgba(224,40,63,.75), rgba(224,40,63,0) 45%, rgba(233,215,1,0) 55%, rgba(233,215,1,.7)),
    linear-gradient(180deg, rgba(160,80,255,.8), rgba(160,80,255,0) 45%, rgba(0,0,0,0) 55%, rgba(0,0,0,.92)),
    #4a3d63;
  box-shadow: 0 0 40px rgba(176,108,255,.35), inset 0 0 30px rgba(0,0,0,.35); }
.at-cell { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: center; text-align: center; padding: 6px 4px; font-size: 13px; font-weight: 700; line-height: 1.15; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.9); text-decoration: none; border: 1px solid rgba(255,255,255,.18); transition: background .15s ease; }
.at-cell:hover { background: rgba(255,255,255,.14); }
.at-cell span { background: rgba(18,7,38,.72); border-radius: 6px; padding: 2px 6px; }
.at-cell.is-you { outline: 3px solid #fff; outline-offset: -3px; box-shadow: inset 0 0 10px rgba(255,255,255,.55); }
.at-marker { position: absolute; z-index: 2; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #fff6a8 45%, var(--gold) 70%); box-shadow: 0 0 0 3px #1a0a2e, 0 0 22px #fff, 0 0 40px var(--gold); left: 50%; top: 50%; transition: left .9s cubic-bezier(.2,.8,.2,1), top .9s cubic-bezier(.2,.8,.2,1); pointer-events: none; }
.at-marker::after { content: ""; position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; border: 2px solid #fff; animation: atPing 1.6s ease-out infinite; }
@keyframes atPing { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.at-sharenote { min-height: 1.4em; color: var(--muted); font-size: 15px; margin: -8px 0 14px; }
.at-hall { border: 2px solid var(--gold); border-radius: 16px; padding: 16px 18px; margin: 0 0 18px; background: linear-gradient(180deg, rgba(96,0,174,.55), rgba(96,0,174,.2)); box-shadow: 0 0 30px rgba(233,215,1,.2); }
.at-hall h2 { font-family: var(--display); font-weight: 400; font-size: 28px; margin: 0 0 4px; color: var(--gold); }
.at-hall p { margin: 0 0 8px; font-size: 17px; color: #fff; }

/* The nine cards, each edged in its two axis colors */
.places.at-nine { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-bottom: 48px; }
.at-nine a { position: relative; overflow: hidden; background: linear-gradient(135deg, color-mix(in srgb, var(--c1) 30%, transparent), color-mix(in srgb, var(--c2) 22%, #1c0a38)); border: 2px solid color-mix(in srgb, var(--c1) 60%, var(--c2)); }
.at-nine a:hover { border-color: #fff; box-shadow: 0 0 24px color-mix(in srgb, var(--c1) 55%, transparent); }
.at-nine .t { color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.at-nine .w { color: #fff; opacity: .85; }
.at > .places-h, .at > .places { max-width: 1200px; margin-left: auto; margin-right: auto; padding-left: clamp(16px, 4vw, 48px); padding-right: clamp(16px, 4vw, 48px); }
.at > .places-h { color: #fff; }

@media (max-width: 760px) {
  .at-scale { grid-template-columns: 1fr; }
  .at-opt { flex-direction: row; justify-content: flex-start; gap: 14px; padding: 12px 16px; font-size: 18px; }
  .at-tip { display: none; }
  .at-result { grid-template-columns: 1fr; }
  .at-portrait { position: static; max-width: 360px; }
  .at-axes { grid-template-columns: 1fr; }
  .at-gridwrap { padding: 28px 70px; }
  .at-axis { font-size: 11px; letter-spacing: .04em; }
  .at-cell { font-size: 11px; }
}

/* ---------- The Chaotic Good Spread ---------- */
body:has(main.sp) { background: radial-gradient(1100px 620px at 50% -8%, #4a1c8a 0%, rgba(74,28,138,0) 70%), linear-gradient(180deg, #2c0e5c 0%, #1a0838 60%, #120628 100%) fixed; background-color: #1a0838; }
.sp { max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px) 40px; }
.sp-intro { text-align: center; padding: clamp(24px, 4vw, 48px) 0 4px; }
.sp-intro .who { font-style: italic; color: var(--muted); margin: 0 0 6px; font-size: 19px; }
.sp-intro h1 { font-family: var(--display); font-weight: 400; font-size: clamp(44px, 7vw, 80px); line-height: .95; margin: 0 0 12px; color: var(--gold); text-wrap: balance; text-shadow: 0 0 30px rgba(233,215,1,.35); }
.sp-intro .desc { font-size: clamp(18px, 2vw, 21px); max-width: 46ch; margin: 0 auto; }
.sp-prompt { text-align: center; font-style: italic; font-size: 20px; color: var(--gold); min-height: 1.5em; margin: 18px 0 12px; }
.sp-stage { position: relative; width: min(100%, 680px); aspect-ratio: 1; margin: 0 auto; border-radius: 28px;
  background: radial-gradient(circle at 50% 50%, #5a1aa6 0%, #3d0b78 45%, #22064a 100%); border: 2px solid var(--gold);
  box-shadow: 0 0 0 6px rgba(96,0,174,.45), 0 0 80px rgba(176,108,255,.35), inset 0 0 60px rgba(0,0,0,.45); }
.sp-stage::before { content: ""; position: absolute; inset: 14px; border-radius: 20px; border: 1px dashed rgba(233,215,1,.35); pointer-events: none; }
.sp-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.sp-lines line, .sp-lines circle { fill: none; stroke: #e9d701; stroke-width: .55; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .55s ease; filter: drop-shadow(0 0 1.2px #ffe94a); }
.sp-lines circle { stroke-width: .3; opacity: .6; transition-duration: 1.2s; }
.sp-lines .on { stroke-dashoffset: 0; }
.sp-slot { position: absolute; aspect-ratio: 700 / 1200; transform: translate(-50%, -50%); border: 1.5px dashed rgba(233,215,1,.45); border-radius: 8% / 4.7%; display: grid; place-items: center; }
.sp-slotnum { font-family: var(--display); font-size: clamp(16px, 3vw, 26px); color: rgba(233,215,1,.55); }
.sp-deck, .sp-card { position: absolute; aspect-ratio: 700 / 1200; transform: translate(-50%, -50%); padding: 0; border: 0; background: none; cursor: pointer; }
.sp-deck { z-index: 3; transition: opacity .5s ease, transform .5s ease; }
.sp-deck.idle { animation: spBeckon 2.4s ease-in-out infinite; }
@keyframes spBeckon { 0%,100% { filter: drop-shadow(0 0 6px rgba(233,215,1,.4)); } 50% { filter: drop-shadow(0 0 22px rgba(233,215,1,.95)); } }
.sp-deck.gone { opacity: 0; transform: translate(-50%, -50%) scale(.85); pointer-events: none; }
.sp-stackcard { position: absolute; inset: 0; transform: translate(calc(var(--i) * -1.2px), calc(var(--i) * -1.6px)); border-radius: 6% / 3.5%; box-shadow: 0 4px 10px rgba(0,0,0,.45); }
.sp-stackcard svg, .sp-face svg { display: block; width: 100%; height: 100%; }
.sp-deck.shuffling .sp-stackcard:nth-child(odd) { animation: spRiffL .62s ease-in-out infinite; animation-delay: calc(var(--i) * 35ms); }
.sp-deck.shuffling .sp-stackcard:nth-child(even) { animation: spRiffR .62s ease-in-out infinite; animation-delay: calc(var(--i) * 35ms); }
@keyframes spRiffL { 0%,100% { transform: translate(0,0) rotate(0); } 45% { transform: translate(-70%, -6%) rotate(-12deg); } }
@keyframes spRiffR { 0%,100% { transform: translate(0,0) rotate(0); } 45% { transform: translate(70%, 6%) rotate(12deg); } }
.sp-card { z-index: 4; left: 50%; top: 51%; perspective: 1000px; transition: left .62s cubic-bezier(.2,.8,.2,1), top .62s cubic-bezier(.2,.8,.2,1); }
.sp-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .75s cubic-bezier(.3,.7,.2,1); }
.sp-card.flipped .sp-inner { transform: rotateY(180deg); }
.sp-face { position: absolute; inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; border-radius: 6% / 3.5%; box-shadow: 0 8px 18px rgba(0,0,0,.55); }
.sp-front { transform: rotateY(180deg); background: #1c0638; }
.sp-card:hover .sp-face, .sp-card:focus-visible .sp-face { box-shadow: 0 0 0 3px var(--gold), 0 0 26px rgba(233,215,1,.8); }
.sp-num { position: absolute; z-index: 2; top: -9px; left: -9px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #1a0a2e; font-family: var(--display); font-size: 17px; box-shadow: 0 0 0 2px #3d0872; }
.sp-fallback { display: grid; place-items: center; height: 100%; padding: 8px; text-align: center; font-family: var(--display); color: var(--gold); }
.sp-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 22px 0 6px; }
button.back-btn { border: 0; cursor: pointer; }
.sp-ghost { font-family: var(--display); font-size: 20px; color: #fff; background: rgba(96,0,174,.35); border: 2px solid var(--gold); border-radius: 999px; padding: 6px 20px; cursor: pointer; }
.sp-ghost:hover { background: rgba(233,215,1,.15); color: var(--gold); }
.sp-h { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 4vw, 42px); color: var(--gold); margin: 34px 0 12px; }
.sp-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.sp-entry { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; background: linear-gradient(180deg, rgba(96,0,174,.4), rgba(96,0,174,.15)); border: 1px solid rgba(185,168,214,.35); border-radius: 14px; padding: 14px 16px; }
.sp-entry.turned { border-color: var(--gold); }
.sp-entrynum { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #1a0a2e; font-family: var(--display); font-size: 20px; }
.sp-pos { margin: 0; font-family: var(--display); font-size: 24px; line-height: 1.05; color: var(--gold); }
.sp-q { margin: 2px 0 8px; font-style: italic; color: var(--muted); }
.sp-down { margin: 0; color: rgba(221,210,242,.55); font-size: 15px; letter-spacing: .06em; text-transform: uppercase; }
.sp-name { font: inherit; font-family: var(--display); font-size: 22px; color: #fff; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(233,215,1,.6); text-underline-offset: 4px; }
.sp-scene { margin: 4px 0 0; font-size: 16px; line-height: 1.45; }
.sp-light { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px; background: rgba(8,2,16,.85); backdrop-filter: blur(4px); }
.sp-lightbox { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 360px); gap: 26px; align-items: center; max-height: 100%; overflow: auto; background: var(--dusk); border: 2px solid var(--gold); border-radius: 18px; padding: 22px; box-shadow: 0 0 0 6px rgba(96,0,174,.5), 0 30px 80px rgba(0,0,0,.7); }
.sp-lightcard svg { display: block; width: 100%; height: auto; }
.sp-lighttext h3 { font-family: var(--display); font-weight: 400; font-size: 40px; line-height: 1; margin: 4px 0 10px; color: var(--gold); }
.sp-lighttext p { margin: 0 0 16px; }
.sp > .places-h, .sp > .places { margin-top: 44px; }
@media (max-width: 700px) {
  .sp-num { width: 20px; height: 20px; font-size: 13px; top: -7px; left: -7px; }
  .sp-lightbox { grid-template-columns: 1fr; justify-items: center; }
  .sp-lightcard { width: min(240px, 70vw); }
  .sp-list { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .sp-card, .sp-inner, .sp-lines line, .sp-lines circle { transition: none !important; } }

/* Spread: hover summaries, chips, meanings, Mira's reading */
.sp-tip { position: absolute; z-index: 10; width: 250px; background: rgba(20,6,40,.97); border: 2px solid var(--gold); border-radius: 14px; padding: 12px 14px; box-shadow: 0 0 0 4px rgba(96,0,174,.55), 0 14px 40px rgba(0,0,0,.6); pointer-events: none; }
.sp-tip.sheet { position: fixed; left: 12px !important; right: 12px; bottom: 12px; top: auto !important; width: auto; max-width: 520px; margin: 0 auto; pointer-events: auto; }
.sp-tippos { margin: 0 0 4px; font-size: 14px; font-style: italic; color: var(--muted); }
.sp-tipname { margin: 0 0 6px; font-family: var(--display); font-size: 26px; line-height: 1; color: var(--gold); }
.sp-tipscene { margin: 8px 0 6px; font-size: 15px; line-height: 1.4; }
.sp-tiphint { margin: 0; font-size: 13px; color: var(--muted); }
.sp-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0 8px; padding: 0; }
.sp-chips li { font-size: 13px; letter-spacing: .03em; padding: 2px 10px; border-radius: 999px; background: rgba(233,215,1,.14); border: 1px solid rgba(233,215,1,.55); color: #fff3a0; }
.sp-meaning { margin: 4px 0 8px; font-size: 16px; line-height: 1.5; }
.sp-counsel { margin: 0; font-style: italic; color: #fff3a0; }
.sp-counsel b { font-style: normal; color: var(--gold); }
.sp-scene { color: var(--muted); font-style: italic; }
.sp-summary { margin-top: 30px; background: linear-gradient(180deg, rgba(96,0,174,.5), rgba(28,6,56,.6)); border: 2px solid var(--gold); border-radius: 20px; padding: clamp(18px, 3vw, 32px); box-shadow: 0 0 0 5px rgba(96,0,174,.4), 0 0 60px rgba(176,108,255,.25); }
.sp-summary .sp-h { margin-top: 0; }
.sp-sumtext p { font-size: clamp(18px, 1.9vw, 21px); line-height: 1.6; max-width: 70ch; margin: 0 0 14px; }
.sp-sumtext p:last-child { font-style: italic; color: #fff3a0; }
.sp-how { margin-top: 10px; border-top: 1px solid rgba(233,215,1,.35); padding-top: 12px; }
.sp-how summary { cursor: pointer; font-family: var(--display); font-size: 22px; color: var(--gold); }
.sp-how ul { margin: 10px 0; padding-left: 20px; max-width: 70ch; }
.sp-how li { margin-bottom: 6px; line-height: 1.45; }
.sp-howend { margin: 0; color: var(--muted); font-style: italic; }
.sp-lighttext .sp-scene { margin-bottom: 10px; }
.sp-lightbox { max-width: min(860px, 100%); }

/* Sections the page hides stay hidden, whatever their layout rules say */
[hidden] { display: none !important; }

/* reversed cards: the face lands upside down */
.sp-card.reversed .sp-front svg, .sp-lightcard.reversed svg { transform: rotate(180deg); }
.sp-rev { display: inline-block; margin: 0 0 6px; padding: 1px 10px; border-radius: 999px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; background: #0d0418; border: 1px solid #c9b8ff; color: #e5dcff; }
.sp-what .sp-rev { margin-left: 10px; vertical-align: middle; }
.sp-revnote { margin: 0 0 10px; font-size: 15px; line-height: 1.45; color: #e5dcff; border-left: 3px solid #c9b8ff; padding-left: 10px; }
.sp-sumlede { margin: -6px 0 14px; font-style: italic; color: var(--muted); }
.sp-sumtext p:last-child { font-style: italic; color: #fff3a0; border-top: 1px solid rgba(233,215,1,.35); padding-top: 12px; }

/* ===== The Guild Calendar ===== */
.cal .moon .m-dark { fill: #241043; }
.cal .moon .m-lit { fill: #fff6cf; }
.cal .moon .m-rim { fill: none; stroke: rgba(255,246,207,.45); stroke-width: .8; }
.cal .moon.big { filter: drop-shadow(0 0 22px rgba(255,246,207,.45)); }
.cal-link, .cal-sign { font: inherit; color: var(--gold); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(233,215,1,.45); text-underline-offset: 3px; }
.cal-sign { font-weight: 600; }
.cal-link:hover, .cal-sign:hover { text-decoration-color: var(--gold); }

.cal-tonight { display: grid; grid-template-columns: auto 1fr; gap: clamp(18px, 4vw, 40px); align-items: center; margin: 26px auto 8px; max-width: 900px;
  background: linear-gradient(160deg, rgba(96,0,174,.55), rgba(20,6,40,.85)); border: 2px solid var(--gold); border-radius: 22px; padding: clamp(18px, 3vw, 30px); box-shadow: 0 0 0 5px rgba(96,0,174,.4), 0 0 60px rgba(176,108,255,.25); }
.ct-kicker { margin: 0; font-style: italic; color: var(--muted); }
.ct-phase { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 5vw, 50px); line-height: 1; color: var(--gold); margin: 4px 0 6px; }
.ct-line { margin: 0 0 12px; max-width: 52ch; }
.ct-facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 6px 22px; }
.ct-facts li { display: grid; grid-template-columns: 9.6em 1fr; align-items: baseline; }
.ct-facts li > :last-child { justify-self: start; text-align: left; }
.ct-label { display: inline-block; min-width: 7.2em; color: var(--muted); font-size: 15px; letter-spacing: .04em; text-transform: uppercase; }
.cdy-signs .ct-label { min-width: 5em; }

.cal-bar { display: flex; align-items: center; gap: 10px; margin: 34px 0 12px; }
.cal-title { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 4vw, 42px); color: var(--gold); margin: 0; min-width: 7.5em; text-align: center; }
.cal-nav { font-size: 34px; line-height: 1; width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--gold); background: rgba(96,0,174,.35); color: var(--gold); cursor: pointer; }
.cal-nav:hover { background: rgba(233,215,1,.15); }
.cal-todaybtn { margin-left: auto; }
.cal-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.cal-dow span { text-align: center; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-bottom: 4px; }
.cal-day { position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 96px; padding: 6px; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  background: rgba(27,11,51,.85); border: 1px solid rgba(185,168,214,.22); border-radius: 10px; overflow: hidden; }
.cal-day:hover { border-color: var(--gold); }
.cal-day.out { opacity: .42; }
.cal-day.today { border: 2px solid var(--gold); box-shadow: 0 0 16px rgba(233,215,1,.35); }
.cal-day.sel { background: rgba(96,0,174,.7); border-color: var(--gold); }
.cal-day.retro::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: repeating-linear-gradient(90deg, #8fd3ff 0 6px, transparent 6px 10px); opacity: .8; }
.cd-top { display: flex; justify-content: space-between; align-items: flex-start; }
.cd-num { font-weight: 700; font-size: 17px; }
.cd-moon { opacity: .75; line-height: 0; }
.cd-moon.exact { opacity: 1; filter: drop-shadow(0 0 5px rgba(255,246,207,.8)); }
.cd-tags { display: flex; flex-direction: column; gap: 3px; }
.cd-tag { font-size: 12.5px; line-height: 1.2; padding: 1px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-tag.hol { background: var(--gold); color: var(--night); font-weight: 700; }
.cd-tag.moon { background: rgba(255,246,207,.14); color: #fff6cf; border: 1px solid rgba(255,246,207,.35); }
.cd-tag.ecl { background: #3a0b12; color: #ffb3bd; border: 1px solid #d23a4a; }
.cd-tag.sun { color: var(--gold); border: 1px solid rgba(233,215,1,.5); }
.cd-tag.merc { color: #8fd3ff; border: 1px solid rgba(143,211,255,.5); }
.cal-key { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.cal-key span::before { content: ""; display: inline-block; width: 14px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.cal-key .k-hol::before { background: var(--gold); }
.cal-key .k-moon::before { background: rgba(255,246,207,.3); border: 1px solid rgba(255,246,207,.6); }
.cal-key .k-sun::before { display: none; }
.cal-key .k-retro::before { background: repeating-linear-gradient(90deg, #8fd3ff 0 4px, transparent 4px 7px); height: 4px; }

.cal-day-panel, .cal-day { }
aside.cal-day { cursor: default; min-height: 0; display: block; position: sticky; top: 14px; padding: 18px; background: linear-gradient(180deg, rgba(96,0,174,.5), rgba(20,6,40,.85)); border: 2px solid var(--gold); border-radius: 18px; }
aside.cal-day:hover { border-color: var(--gold); }
.cdy-date { margin: 0 0 8px; font-style: italic; color: var(--muted); }
.cdy-moonrow { display: flex; gap: 14px; align-items: center; }
.cdy-phase { font-family: var(--display); font-weight: 400; font-size: 32px; line-height: 1; margin: 0; color: var(--gold); }
.cdy-sub { margin: 4px 0 0; font-size: 15px; color: var(--muted); }
.cdy-line { margin: 10px 0; }
.cdy-signs { list-style: none; margin: 0 0 6px; padding: 0; }
.cdy-signs li { margin-bottom: 3px; }
.cdy-note { display: block; margin-left: 5.3em; font-size: 14px; color: var(--muted); }
.cdy-moonline { margin: 6px 0 0; font-size: 15.5px; font-style: italic; color: #fff3a0; }
.cdy-events { margin-top: 14px; display: grid; gap: 12px; }
.cdy-card { border-radius: 14px; padding: 12px 14px; background: rgba(13,4,24,.7); border: 1px solid rgba(185,168,214,.3); }
.cdy-card.hol { border: 2px solid var(--gold); box-shadow: 0 0 22px rgba(233,215,1,.18); }
.cdy-card.ecl { border-color: #d23a4a; }
.cdy-card.merc { border-color: rgba(143,211,255,.6); }
.cdy-card h4 { font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.05; color: var(--gold); margin: 0 0 4px; }
.cdy-card p { margin: 0 0 8px; font-size: 16px; line-height: 1.5; }
.cdy-card p:last-child { margin-bottom: 0; }
.cdy-meta { color: var(--muted); font-size: 14px !important; font-style: italic; }
.cdy-holline { font-style: italic; color: #fff3a0; }
.cdy-small { font-size: 13px !important; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px !important; }
.cdy-ideas { margin: 0 0 8px; padding-left: 18px; font-size: 16px; }
.cdy-symbols { font-size: 15px !important; }
.cdy-symbols b { color: var(--gold); }

.cal-wheelwrap { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 30px; align-items: center; }
.cal-wheel { width: 100%; height: auto; overflow: visible; }
.w-ring { fill: none; stroke: rgba(233,215,1,.55); stroke-width: 1.5; }
.w-hub { fill: rgba(96,0,174,.35); stroke: rgba(233,215,1,.55); stroke-width: 1.5; }
.w-tick { stroke: rgba(233,215,1,.4); stroke-width: 1; }
.w-glyph { font-size: 20px; fill: #e5dcff; font-family: "Segoe UI Symbol", "Noto Sans Symbols", "DejaVu Sans", sans-serif; pointer-events: none; }
.w-hit { fill: transparent; }
.w-sign, .w-hol { cursor: pointer; outline: none; }
.w-sign:hover .w-hit, .w-sign:focus-visible .w-hit { fill: rgba(233,215,1,.18); stroke: var(--gold); }
.w-sign:hover .w-glyph, .w-sign:focus-visible .w-glyph { fill: var(--gold); }
.w-spoke { stroke: rgba(233,215,1,.35); stroke-width: 1.2; }
.w-spoke.fox { stroke: #ff9a3c; stroke-dasharray: 3 3; }
.w-dot { fill: var(--gold); stroke: var(--night); stroke-width: 2; }
.w-hol.fox .w-dot { fill: #ff9a3c; }
.w-hol:hover .w-dot, .w-hol:focus-visible .w-dot { stroke: #fff; filter: drop-shadow(0 0 6px rgba(233,215,1,.9)); }
.w-label { font-size: 12.5px; fill: var(--ink); font-family: var(--body); paint-order: stroke; stroke: var(--night); stroke-width: 3px; pointer-events: none; }
.w-label.small { font-size: 10.5px; fill: #ffc58a; }
.w-sun { fill: var(--gold); stroke: #fff; stroke-width: 2; filter: drop-shadow(0 0 8px rgba(233,215,1,.9)); }
.cal-wheel .m-dark { fill: #241043; } .cal-wheel .m-lit { fill: #fff6cf; } .cal-wheel .m-rim { fill: none; stroke: rgba(255,246,207,.45); stroke-width: .8; }
.cal-wheelnote { margin: 0 0 12px; color: var(--muted); font-style: italic; }
.cal-wheellist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cal-wheellist li { display: grid; grid-template-columns: 8.5em 4.5em 1fr; gap: 10px; align-items: baseline; }
.cal-wheellist .cal-link { font-family: var(--display); font-size: 21px; text-align: left; }
.wl-date { color: var(--muted); font-size: 15px; }
.wl-line { font-size: 16px; }
.cal-fine { margin: 18px 0 0; font-size: 14px; color: var(--muted); font-style: italic; }
.cal-plain li { margin-bottom: 6px; }

.cal-signbox { position: relative; width: min(560px, 100%); max-height: 100%; overflow: auto; background: var(--dusk); border: 2px solid var(--gold); border-radius: 18px; padding: 24px; box-shadow: 0 0 0 6px rgba(96,0,174,.5), 0 30px 80px rgba(0,0,0,.7); }
.cs-glyph { margin: 0; font-size: 58px; line-height: 1; color: var(--gold); font-family: "Segoe UI Symbol", "Noto Sans Symbols", "DejaVu Sans", sans-serif; }
.cal-signbox h3 { font-family: var(--display); font-weight: 400; font-size: 44px; line-height: 1; color: var(--gold); margin: 6px 0 2px; }
.cs-title { margin: 0 0 8px; font-style: italic; color: #fff3a0; font-size: 20px; }
.cs-dates { color: var(--muted); font-size: 15px; }
.cs-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 12px 0; font-size: 16px; }
.cs-facts dt { color: var(--muted); font-size: 14px; letter-spacing: .06em; text-transform: uppercase; padding-top: 2px; }
.cs-facts dd { margin: 0; }

@media (max-width: 900px) {
  .cal-body { grid-template-columns: 1fr; }
  aside.cal-day { position: static; }
  .cal-wheelwrap { grid-template-columns: 1fr; }
  .cal-wheel { max-width: 420px; margin: 0 auto; display: block; }
}
@media (max-width: 600px) {
  .cal-tonight { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .cal-tonight .moon.big { width: 104px; height: 104px; }
  .ct-facts { text-align: left; }
  .cal-day { min-height: 62px; padding: 4px; gap: 2px; }
  .cd-num { font-size: 15px; }
  .cd-top { flex-direction: column; align-items: center; gap: 2px; }
  .cd-moon svg { width: 16px; height: 16px; }
  .cd-tags { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 2px; }
  .cd-tag { font-size: 0; width: 7px; height: 7px; padding: 0; border-radius: 50%; border: 0; }
  .cd-tag.hol { background: var(--gold); } .cd-tag.moon { background: #fff6cf; } .cd-tag.ecl { background: #d23a4a; }
  .cd-tag.sun { background: none; border: 1.5px solid var(--gold); } .cd-tag.merc { background: #8fd3ff; }
  .cal-bar { flex-wrap: wrap; justify-content: center; }
  .cal-todaybtn { margin-left: 0; }
  .cal-title { min-width: 0; }
  .cal-wheellist li { grid-template-columns: 1fr auto; }
  .wl-line { grid-column: 1 / -1; margin-top: -6px; }
}

/* sharing a reading as a picture */
.sp-sharerow { text-align: center; margin: 18px 0 0; }
.sp-sharebox { width: min(520px, 100%); max-height: 100%; overflow: auto; background: var(--dusk); border: 2px solid var(--gold); border-radius: 18px; padding: 20px; text-align: center; box-shadow: 0 0 0 6px rgba(96,0,174,.5), 0 30px 80px rgba(0,0,0,.7); }
.sp-sharebox .sp-h { margin: 0 0 12px; }
.sp-sharebox img { display: block; width: 100%; max-height: 62vh; object-fit: contain; border-radius: 10px; margin: 0 auto; }
.sp-sharemsg { margin: 12px 0; font-style: italic; color: var(--muted); font-size: 16px; }
.sp-sharebtns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.sp-sharebtns a.back-btn { text-decoration: none; }

/* ===== Reynard's Stump: videos and essays ===== */
.st-jump { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.st-jump a { text-decoration: none; }
.st-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.st-chip { font: inherit; font-size: 16px; color: var(--ink); background: rgba(27,11,51,.85); border: 1px solid rgba(233,215,1,.45); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.st-chip span { color: var(--muted); font-size: 14px; margin-left: 4px; }
.st-chip:hover { border-color: var(--gold); }
.st-chip[aria-pressed="true"] { background: var(--gold); color: var(--night); border-color: var(--gold); font-weight: 700; }
.st-chip[aria-pressed="true"] span { color: rgba(13,4,24,.7); }
.st-segline { margin: 0 0 16px; font-style: italic; color: #fff3a0; }
.st-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.st-vid { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink); background: rgba(27,11,51,.9); border: 1px solid rgba(185,168,214,.25); border-radius: 16px; overflow: hidden; transition: transform .15s ease, border-color .15s ease; }
.st-vid:hover, .st-vid:focus-visible { transform: translateY(-3px); border-color: var(--gold); }
.st-thumb { position: relative; display: block; aspect-ratio: 3 / 4; background:
  radial-gradient(circle at 50% 38%, rgba(233,215,1,.28), transparent 42%),
  linear-gradient(160deg, #5a1aa8, #22093f 70%); }
.st-thumb::before { content: ""; position: absolute; inset: 0; background: url(/assets/star.png) center 38% / 34% no-repeat; opacity: .9; }
.st-vid.has-thumb .st-thumb::before { display: none; }
.st-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.st-play { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); width: 46px; height: 46px; border-radius: 50%; background: rgba(13,4,24,.75); border: 2px solid var(--gold); }
.st-play::after { content: ""; position: absolute; left: 17px; top: 12px; border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent var(--gold); }
.st-meta { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 14px; }
.st-seg { font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0; }
.st-part { font-size: 13px; color: var(--gold); }
.st-title { font-family: var(--display); font-size: 22px; line-height: 1.08; color: var(--gold); }
.st-line { font-size: 15px; line-height: 1.4; color: var(--ink); opacity: .85; }
.st-more { text-align: center; margin: 22px 0 0; }
.st-follow { text-align: center; color: var(--muted); font-style: italic; }
.st-follow a { color: var(--gold); }

.st-pbox { display: grid; grid-template-columns: auto minmax(0, 280px); gap: 20px; align-items: start; max-height: 100%; background: var(--dusk); border: 2px solid var(--gold); border-radius: 18px; padding: 16px; box-shadow: 0 0 0 6px rgba(96,0,174,.5), 0 30px 80px rgba(0,0,0,.7); }
.st-frame { width: min(360px, 80vw, calc((100vh - 120px) * 9 / 16)); aspect-ratio: 9 / 16; background: #000; border-radius: 12px; overflow: hidden; }
.st-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.st-ptext h3 { font-family: var(--display); font-weight: 400; font-size: 32px; line-height: 1.05; color: var(--gold); margin: 6px 0 12px; }
.st-plinks { display: flex; flex-direction: column; gap: 6px; margin: 0 0 16px; }
.st-plinks a { color: var(--gold); }

.st-essays { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.st-essay { display: grid; gap: 4px; text-decoration: none; color: var(--ink); background: linear-gradient(160deg, rgba(96,0,174,.45), rgba(20,6,40,.85)); border: 1px solid rgba(233,215,1,.45); border-radius: 16px; padding: 16px 20px; }
.st-essay:hover, .st-essay:focus-visible { border-color: var(--gold); }
.st-edate { font-size: 14px; color: var(--muted); font-style: italic; }
.st-etitle { font-family: var(--display); font-size: 30px; line-height: 1.05; color: var(--gold); }
.st-esum { font-size: 17px; }

.st-article article { max-width: 680px; margin: 30px auto 0; }
.st-article .who a { color: var(--muted); }
.st-article h1 { font-family: var(--display); font-weight: 400; font-size: clamp(40px, 6vw, 64px); line-height: .98; color: var(--gold); margin: 4px 0 8px; }
.st-byline { color: var(--muted); font-style: italic; margin: 0 0 26px; }
.st-body { font-size: 20px; line-height: 1.7; }
.st-body p { margin: 0 0 1.1em; }
.st-body h2, .st-body h3, .st-body h4 { font-family: var(--display); font-weight: 400; color: var(--gold); line-height: 1.1; margin: 1.4em 0 .4em; }
.st-body h2 { font-size: 34px; } .st-body h3 { font-size: 28px; }
.st-body blockquote { margin: 1.2em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--gold); font-style: italic; color: #fff3a0; }
.st-body a { color: var(--gold); }
.st-body hr { border: 0; border-top: 1px dashed rgba(233,215,1,.45); margin: 2em 0; }
.st-back { max-width: 680px; margin: 24px auto 0; }
.st-back a { text-decoration: none; }

@media (max-width: 700px) {
  .st-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .st-title { font-size: 19px; }
  .st-line { display: none; }
  .st-pbox { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 12px; }
  .st-frame { width: min(86vw, calc((100vh - 220px) * 9 / 16)); }
  .st-ptext h3 { font-size: 26px; margin-bottom: 6px; }
  .st-plinks { flex-direction: row; justify-content: center; gap: 14px; }
  .st-body { font-size: 18px; }
}
.st-soon { font-style: italic; color: #fff3a0; font-size: 19px; margin: 0; }

/* ===== The Raising (About) ===== */
.ab-lede { font-style: italic; color: #fff3a0; font-size: 19px; margin-top: 14px; }
.ab-sec { margin: 54px 0 0; }
.ab-text p, .ab-vessel p { font-size: 19px; line-height: 1.65; margin: 0 0 1em; max-width: 62ch; }
.ab-raising, .ab-cg, .ab-fox { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 34px; align-items: center; }
.ab-fox { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
.ab-fig { width: 100%; height: auto; display: block; overflow: visible; }
.ab-bull .ab-fig, .ab-foxart .ab-fig { max-height: 380px; filter: drop-shadow(0 0 30px rgba(233,215,1,.22)); }
.ab-creed { text-align: center; background: radial-gradient(circle at 50% 0%, rgba(96,0,174,.6), rgba(20,6,40,.9) 70%); border: 2px solid var(--gold); border-radius: 24px; padding: clamp(22px, 4vw, 40px); box-shadow: 0 0 0 6px rgba(96,0,174,.35), 0 0 60px rgba(176,108,255,.2); }
.ab-creed .places-h { margin-top: 0; }
.ab-lines { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; margin: 6px 0 4px; font-family: var(--display); font-size: clamp(30px, 4.6vw, 50px); line-height: 1.1; color: var(--gold); }
.ab-motto { font-style: italic; font-size: 20px; color: #fff3a0; margin: 6px 0 26px; }
.ab-tenets { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; text-align: left; }
.ab-tenets li { background: rgba(13,4,24,.7); border: 1px solid rgba(233,215,1,.35); border-radius: 14px; padding: 14px 16px; }
.ab-tenets h3 { font-family: var(--display); font-weight: 400; font-size: 24px; color: var(--gold); margin: 0 0 4px; }
.ab-tenets p { margin: 0; font-size: 16.5px; line-height: 1.5; }
.ab-grid { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 26px 0 0 26px; }
.ab-cell { display: flex; align-items: center; justify-content: center; text-align: center; aspect-ratio: 1; padding: 6px; border-radius: 12px; font-family: var(--display); font-size: clamp(15px, 2vw, 21px); line-height: 1.05; color: #fff; text-decoration: none;
  background: linear-gradient(135deg, var(--c1) 0 50%, var(--c2) 50% 100%); text-shadow: 0 1px 3px #000, 0 0 8px #000; border: 2px solid rgba(255,255,255,.15); opacity: .82; transition: transform .15s ease, opacity .15s ease; }
.ab-cell:hover, .ab-cell:focus-visible { opacity: 1; transform: scale(1.04); }
.ab-cell.home { opacity: 1; border: 3px solid var(--gold); box-shadow: 0 0 22px rgba(233,215,1,.55); }
.ab-axis { position: absolute; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ab-axis.x { top: 2px; left: 26px; right: 0; text-align: center; }
.ab-axis.y { left: 0; top: 26px; bottom: 0; writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; }
.ab-gridnote { margin: 12px 0 0; font-style: italic; color: var(--muted); }
.ab-gridnote a, .ab-follow a { color: var(--gold); }
.ab-cast { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.ab-card { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: center; background: linear-gradient(160deg, rgba(96,0,174,.45), rgba(20,6,40,.85)); border: 1px solid rgba(233,215,1,.4); border-radius: 18px; padding: 14px; }
.ab-card.foe { background: linear-gradient(160deg, rgba(120,10,30,.55), rgba(20,4,10,.9)); border-color: rgba(224,40,63,.6); }
.ab-port { height: 150px; display: flex; align-items: flex-end; justify-content: center; }
.ab-port .ab-fig { max-height: 150px; width: auto; max-width: 110px; }
.ab-card h3 { font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.05; color: var(--gold); margin: 0; }
.ab-card.foe h3 { color: #ff8a98; }
.ab-align { margin: 2px 0 6px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ab-card p:last-child { margin: 0; font-size: 16px; line-height: 1.5; }
.ab-foes-h { font-family: var(--display); font-weight: 400; font-size: 30px; color: #ff8a98; margin: 34px 0 4px; }
.ab-foes-note { margin: 0 0 14px; font-style: italic; color: var(--muted); max-width: 70ch; }
.ab-vessel { text-align: center; }
.ab-vessel p { margin-left: auto; margin-right: auto; font-style: italic; }
.ab-intro { margin: 0 0 14px; font-style: italic; color: #fff3a0; }
.ab-ways { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.ab-way { display: grid; gap: 4px; height: 100%; box-sizing: border-box; text-decoration: none; color: var(--ink); background: rgba(27,11,51,.9); border: 2px solid rgba(233,215,1,.45); border-radius: 16px; padding: 16px; transition: transform .15s ease, border-color .15s ease; }
.ab-way:hover, .ab-way:focus-visible { transform: translateY(-3px); border-color: var(--gold); }
.ab-wname { font-family: var(--display); font-size: 26px; line-height: 1.05; color: var(--gold); }
.ab-follow { margin: 16px 0 0; color: var(--muted); font-style: italic; }
.ab-faq { border-bottom: 1px solid rgba(233,215,1,.25); padding: 12px 0; }
.ab-faq summary { cursor: pointer; font-family: var(--display); font-size: 24px; color: var(--gold); list-style: none; }
.ab-faq summary::-webkit-details-marker { display: none; }
.ab-faq summary::before { content: "+"; display: inline-block; width: 1em; color: var(--muted); }
.ab-faq[open] summary::before { content: "\2212"; }
.ab-faq p { margin: 8px 0 0 1em; font-size: 17.5px; line-height: 1.6; max-width: 70ch; }
.ab-fine { text-align: center; font-size: 13px; color: var(--muted); margin: 30px 0 0; }
@media (max-width: 820px) {
  .ab-raising, .ab-cg, .ab-fox { grid-template-columns: 1fr; }
  .ab-bull, .ab-foxart { max-width: 260px; margin: 0 auto; }
  .ab-fox .ab-foxart { order: 2; }
  .ab-grid { max-width: 420px; margin: 0 auto; }
  .ab-text p { font-size: 18px; }
}
@media (max-width: 420px) {
  .ab-cast { grid-template-columns: 1fr; }
  .ab-card { grid-template-columns: 88px 1fr; }
  .ab-port { height: 124px; } .ab-port .ab-fig { max-height: 124px; max-width: 88px; }
}
.ab-photo { margin: 0; }
.ab-photo img { display: block; width: 100%; height: auto; border-radius: 20px; border: 3px solid var(--gold); box-shadow: 0 0 0 6px rgba(96,0,174,.45), 0 0 40px rgba(233,215,1,.25); }
.ab-card.pair { grid-column: 1 / -1; grid-template-columns: 280px 1fr; }
.ab-card.pair .ab-port { gap: 12px; height: 170px; }
.ab-card.pair .ab-port .ab-fig { max-width: 124px; max-height: 170px; }
.ab-card.pair p:last-child { max-width: 62ch; }
@media (max-width: 420px) { .ab-card.pair { grid-template-columns: 1fr; } .ab-card.pair .ab-port { justify-content: center; } }

/* ---------- Join the Guild ---------- */
.cj { margin: 48px 0 8px; padding: clamp(20px, 3.4vw, 32px); border: 1px solid rgba(233,215,1,.35); border-radius: 18px;
  background: radial-gradient(120% 140% at 0% 0%, rgba(96,0,174,.38), rgba(27,11,51,.6) 60%, rgba(13,4,24,.6)); }
.cj-h { font-family: var(--display); font-weight: 400; color: var(--gold); font-size: clamp(28px, 3.6vw, 38px); margin: 0 0 6px; line-height: 1.1; }
.cj-line { color: var(--muted); margin: 0 0 18px; max-width: 64ch; }
.cj-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 14px; align-items: end; }
.cj-f { display: flex; flex-direction: column; gap: 5px; font-size: 15px; color: var(--ink); }
.cj-f i { color: var(--muted); font-style: italic; }
.cj-f input, .cj-f select { font: inherit; font-size: 17px; color: var(--ink); background: rgba(13,4,24,.75); border: 1px solid rgba(185,168,214,.45);
  border-radius: 10px; padding: 10px 12px; min-width: 0; }
.cj-f input:focus, .cj-f select:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(233,215,1,.25); }
.cj-consent { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 0; font-size: 15px; color: var(--ink); max-width: 70ch; }
.cj-consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--gold); flex: none; }
.cj-go { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 16px; }
.cj-go button { border: 0; cursor: pointer; }
.cj-go button:disabled { opacity: .6; cursor: wait; }
.cj-fine { color: var(--muted); font-size: 14px; }
.cj-msg { margin: 10px 0 0; min-height: 1.2em; color: var(--muted); font-size: 15px; }
.cj-msg.err { color: #ff9aa5; }
.cj-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cgg-join.done { padding: 4px 0; }
.cj-done-h { font-family: var(--display); color: var(--gold); font-size: 30px; margin: 0; }
.cj-done { margin: 4px 0 0; color: var(--ink); }
.cj-page { max-width: 860px; }
.cj-page h1 { font-family: var(--display); font-weight: 400; font-size: clamp(40px, 6vw, 64px); color: var(--gold); margin: 0 0 14px; line-height: 1; }
.cj-lede { font-size: clamp(18px, 2vw, 21px); max-width: 60ch; }
.cj-upd { color: var(--muted); font-size: 15px; margin-top: -6px; }
.cj-prose { max-width: 66ch; }
.cj-prose h2 { font-family: var(--display); font-weight: 400; color: var(--gold); font-size: 26px; margin: 30px 0 6px; }
.cj-prose p { margin: 0 0 12px; }
.foot-join { margin: 0 0 10px; font-family: var(--display); font-size: 19px; }
.foot-join a { text-decoration: none; }
@media (max-width: 760px) { .cj-row { grid-template-columns: 1fr; } }

/* ---------- Second chance (Evil results) and younger visitors ---------- */
.cj-say { font-size: clamp(19px, 2.1vw, 22px); line-height: 1.5; max-width: 54ch; margin: 0; }

/* ---------- Anonymous test answers ---------- */
.at-optin { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0 4px; font-size: 16px; }
.at-optin input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--gold); flex: none; }
.at-datanote { color: var(--muted); font-size: 14px; max-width: 58ch; margin: 0 0 10px 28px; }
.at-age { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 16px; font-size: 16px; }
.at-age select { font: inherit; color: var(--ink); background: rgba(13,4,24,.75); border: 1px solid rgba(185,168,214,.45); border-radius: 10px; padding: 7px 10px; }
.at-age select:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(233,215,1,.25); }
.at-nudge { color: var(--gold); font-weight: 600; }

/* ---------- The Priestess by Moonlight (secret full-moon reading) ---------- */
.hp-sky { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(3,14,20,.35), rgba(3,14,20,.72) 55%, rgba(2,8,12,.95)), url("/assets/forest-night.webp") center 30% / cover no-repeat, #04141a; }
.hp-sky::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 20%, transparent 40%, rgba(0,0,0,.55)); }
.hp-flies i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #f6ffb8; box-shadow: 0 0 8px 3px rgba(226,255,140,.55);
  opacity: 0; animation: hpFly 10s ease-in-out infinite; }
@keyframes hpFly { 0%, 100% { opacity: 0; transform: translate(0, 0); } 20% { opacity: .9; } 50% { opacity: .35; transform: translate(26px, -40px); } 75% { opacity: .85; transform: translate(-14px, -70px); } }
.hp-page { --gold: #dff6f2; --moon: #cfeef2; --sea: #5fd1c4; }
.hp-page .who { color: var(--sea); }
.hp-page h1, .hp-page .sp-h { color: #eaf9f7; text-shadow: 0 0 22px rgba(160,240,255,.45); }
.hp-intro .desc { color: #d5ecea; }
.hp-prompt { color: #d9f2ee; }
.hp-stage { position: relative; width: min(100%, 640px); aspect-ratio: 640 / 750; margin: 0 auto; border-radius: 28px;
  background: radial-gradient(90% 70% at 50% 40%, rgba(20,60,66,.55), rgba(4,16,22,.82)); box-shadow: inset 0 0 0 1px rgba(207,238,242,.25), 0 30px 80px rgba(0,0,0,.5); }
.hp-table { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hp-slot { border-color: rgba(207,238,242,.45); }
.hp-slot .sp-slotnum { color: rgba(207,238,242,.7); }
.hp-card { transition: left .62s cubic-bezier(.2,.8,.2,1), top .62s cubic-bezier(.2,.8,.2,1), transform .62s cubic-bezier(.2,.8,.2,1); }
.hp-card .sp-num { background: #dff6f2; color: #06232a; box-shadow: 0 0 0 2px #1d5b62; }
.hp-card:hover .sp-face, .hp-card:focus-visible .sp-face { box-shadow: 0 0 0 3px #dff6f2, 0 0 26px rgba(170,245,255,.85); }
.hp-scroll.beckon .sp-face { animation: hpBeckon 2.2s ease-in-out infinite; }
@keyframes hpBeckon { 0%, 100% { box-shadow: 0 0 0 2px rgba(223,246,242,.5), 0 0 10px rgba(170,245,255,.3); } 50% { box-shadow: 0 0 0 3px #dff6f2, 0 0 34px rgba(170,245,255,.95); } }
.hp-scroll.nudge { animation: hpNudge .45s ease; }
@keyframes hpNudge { 0%, 100% { margin-left: 0; } 25% { margin-left: -6px; } 75% { margin-left: 6px; } }
.hp-scroll.revealed .sp-face { box-shadow: 0 0 0 3px #f6e98a, 0 0 40px rgba(246,233,138,.9); }
.hp-scroll.kept { cursor: default; }
.hp-scroll.kept::after { content: ""; position: absolute; left: 50%; top: 50%; width: 34%; aspect-ratio: 1; transform: translate(-50%, -50%) rotate(-90deg); border-radius: 50%;
  background: radial-gradient(circle at 62% 50%, transparent 38%, #cfeef2 40%, #cfeef2 58%, transparent 60%), radial-gradient(circle, #1d5b62 0 70%, #0c2f34 72%);
  box-shadow: 0 0 0 3px #cfeef2, 0 0 18px rgba(170,245,255,.6); }
.hp-summary { border-color: rgba(207,238,242,.4); background: rgba(4,20,26,.82); }
.hp-sealed { max-width: 640px; margin: 10px auto 40px; padding: 26px 28px; border-radius: 20px; background: rgba(4,20,26,.82); border: 1px solid rgba(207,238,242,.35); }
.hp-next { color: var(--sea); font-size: 19px; }
.hp-page .sp-list .sp-entrynum { background: #dff6f2; color: #06232a; }

/* the pause before the secret */
.hp-rite { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 20px; background: rgba(2,10,14,.9); backdrop-filter: blur(6px); opacity: 0; transition: opacity .55s ease; text-align: center; }
.hp-rite.in { opacity: 1; }
.hp-rite-art { width: min(78vw, 360px); height: auto; overflow: visible; }
.hp-rite-msg { font-family: var(--display); font-size: clamp(30px, 5vw, 44px); color: #eaf9f7; margin: 6px 0 0; text-shadow: 0 0 20px rgba(160,240,255,.6); }
.hp-rite-more { max-width: 34ch; margin: 0; color: #cfe6e3; font-size: 18px; min-height: 1.6em; }
.hp-shade { transform: translateX(-140px); transition: transform 3s cubic-bezier(.45,.05,.4,1); }
.hp-blood { opacity: 0; transition: opacity 1.2s ease; }
.hp-halo { opacity: .5; transform-origin: 200px 120px; transition: opacity 1s ease, transform 1.2s ease; }
.hp-veil-l, .hp-veil-r { transition: transform 1.3s cubic-bezier(.6,0,.2,1); }
.hp-rite.weigh .hp-shade { transform: translateX(0); }
.hp-rite.weigh .hp-halo { opacity: .12; }
.hp-rite.reveal .hp-shade { transform: translateX(150px); transition-duration: 1.1s; }
.hp-rite.reveal .hp-halo { opacity: 1; transform: scale(1.35); }
.hp-rite.reveal .hp-veil-l { transform: translateX(-104px); }
.hp-rite.reveal .hp-veil-r { transform: translateX(104px); }
.hp-rite.keep .hp-blood { opacity: .55; }
@media (prefers-reduced-motion: reduce) { .hp-flies i { animation: none; opacity: .5; } .hp-shade, .hp-veil-l, .hp-veil-r, .hp-halo, .hp-blood { transition-duration: .01s; } }

/* the small moon on the tarot table, only under a full moon */
.sp-fullmoon { position: absolute; z-index: 6; right: 4%; top: 3%; width: 9%; aspect-ratio: 1; display: block; border-radius: 50%; animation: hpMoonGlow 3.4s ease-in-out infinite; }
.sp-fullmoon svg { width: 100%; height: 100%; display: block; }
.sp-fullmoon circle { fill: #eef8fb; }
@keyframes hpMoonGlow { 0%, 100% { filter: drop-shadow(0 0 4px rgba(200,245,255,.5)); } 50% { filter: drop-shadow(0 0 16px rgba(200,245,255,1)); } }
/* the forest shows through: no purple sky on this page */
html:has(main.hp-page) { background: #04141a; }
body:has(main.hp-page) { background: transparent; }
body:has(main.hp-page) .top { background: rgba(2,14,18,.55); border-bottom-color: rgba(207,238,242,.25); }
body:has(main.hp-page) footer { background: rgba(2,12,16,.85); border-top-color: rgba(207,238,242,.25); }
.hp-page { --muted: #a9cfcb; }
.hp-page .sp-entry { background: linear-gradient(180deg, rgba(14,58,64,.75), rgba(6,26,32,.7)); border-color: rgba(207,238,242,.3); }
.hp-page .sp-entry.turned { border-color: #cfeef2; }
.hp-page .sp-chips li { background: rgba(160,240,255,.12); border-color: rgba(160,240,255,.5); color: #d8fbff; }
.hp-page .sp-counsel { color: #d8fbff; }
.hp-page .sp-summary { background: linear-gradient(180deg, rgba(14,58,64,.85), rgba(4,20,26,.88)); border-color: #cfeef2; box-shadow: 0 0 40px rgba(120,220,240,.18); }
.hp-page .sp-how { border-top-color: rgba(207,238,242,.3); }
.hp-page .sp-lightbox { background: #06222a; border-color: #cfeef2; box-shadow: 0 0 0 6px rgba(40,120,130,.45), 0 30px 80px rgba(0,0,0,.7); }
.hp-page .sp-name { text-decoration-color: rgba(207,238,242,.6); }
.hp-page .sp-ghost { color: #dff6f2; border-color: #dff6f2; }
/* the forest's sound switch */
.hp-sound { position: fixed; z-index: 45; right: 16px; bottom: 16px; display: flex; align-items: center; gap: 8px; padding: 9px 14px 9px 11px;
  font: inherit; font-size: 16px; color: #dff6f2; background: rgba(4,20,26,.82); border: 1px solid rgba(207,238,242,.45); border-radius: 999px;
  cursor: pointer; backdrop-filter: blur(4px); box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.hp-sound svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hp-sound svg path:first-child { fill: currentColor; }
.hp-sound[aria-pressed="false"] .hp-waves { opacity: .25; }
.hp-sound[aria-pressed="true"] { border-color: #dff6f2; box-shadow: 0 0 18px rgba(160,240,255,.45); }
.hp-sound:focus-visible { outline: 2px solid #dff6f2; outline-offset: 3px; }

/* ---------- The Guild app: today's card, the journal, install help ---------- */
.td-table { position: relative; width: min(60vw, 240px); aspect-ratio: 700 / 1200; margin: 8px auto 18px; }
.td-deck { position: absolute; inset: 0; padding: 0; border: 0; background: none; cursor: pointer; animation: spBeckon 2.4s ease-in-out infinite; }
.td-deck .sp-stackcard { position: absolute; inset: 0; }
.td-deck:focus-visible { outline: 3px solid var(--gold); outline-offset: 8px; border-radius: 12px; }
.td-deck.shuffling { animation: none; }
.td-deck.shuffling .sp-stackcard:nth-child(odd) { animation: spRiffL .62s ease-in-out infinite; animation-delay: calc(var(--i) * 35ms); }
.td-deck.shuffling .sp-stackcard:nth-child(even) { animation: spRiffR .62s ease-in-out infinite; animation-delay: calc(var(--i) * 35ms); }
.td-card { position: absolute; inset: 0; }
.td-card .sp-front { transform: none; box-shadow: 0 0 0 3px var(--gold), 0 18px 40px rgba(0,0,0,.6), 0 0 40px rgba(233,215,1,.25); }
.td-card.reversed .sp-front svg { transform: rotate(180deg); }
.td-card.arrive { animation: tdArrive .8s cubic-bezier(.2,.8,.2,1); }
@keyframes tdArrive { from { transform: rotateY(90deg) scale(.9); opacity: .2; } to { transform: none; opacity: 1; } }
.td-text { max-width: 60ch; margin: 0 auto; text-align: center; }
.td-text .sp-chips { justify-content: center; }
.td-name { font-family: var(--display); font-weight: 400; color: var(--gold); font-size: clamp(32px, 5vw, 44px); margin: 0 0 6px; }
.td-meaning { font-size: 19px; }
.td-more { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 34px 0 10px; }
.td-more a { text-decoration: none; }
.cj-keeprow { margin-top: 18px; }
.cj-kept, .cj-keepfail { display: inline-block; margin: 8px 12px; color: var(--muted); }
.cj-keepfail { color: #ff9aa5; }
.jn { max-width: 820px; }
.jn-empty { font-size: 19px; line-height: 1.8; }
.jn-empty a { margin: 10px 10px 0 0; }
.jn-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 14px; color: var(--muted); }
.jn-tools p { margin: 0; }
.jn-entry { position: relative; margin: 0 0 18px; padding: 18px 20px 16px; border-radius: 16px; border: 1px solid rgba(233,215,1,.3);
  background: linear-gradient(180deg, rgba(60,18,110,.55), rgba(20,8,38,.6)); scroll-margin-top: 20px; }
.jn-entry.jn-new { box-shadow: 0 0 0 2px var(--gold), 0 0 30px rgba(233,215,1,.25); }
.jn-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px; align-items: baseline; }
.jn-kind { margin: 0; font-family: var(--display); font-size: 24px; color: var(--gold); }
.jn-when { margin: 0; color: var(--muted); font-size: 15px; }
.jn-cards { list-style: none; padding: 0; margin: 8px 0 6px; columns: 2 240px; column-gap: 20px; }
.jn-cards li { margin: 0 0 4px; break-inside: avoid; }
.jn-pos { color: var(--muted); }
.jn-rev { color: #ffb8c2; font-style: italic; }
.jn-reading { margin: 6px 0 10px; }
.jn-reading summary { cursor: pointer; color: var(--gold); }
.jn-reading p { margin: 8px 0; color: #e6dcf5; }
.jn-notelab { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; font-size: 16px; color: var(--ink); }
.jn-note { font: inherit; font-size: 17px; color: var(--ink); background: rgba(13,4,24,.75); border: 1px solid rgba(185,168,214,.45); border-radius: 10px; padding: 10px 12px; resize: vertical; }
.jn-note:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(233,215,1,.25); }
.jn-saved { display: inline-block; min-height: 1.3em; color: var(--muted); font-size: 14px; margin-top: 4px; }
.jn-del { margin-top: 8px; font-size: 15px; padding: 6px 14px; }
.jn-del.sure { border-color: #ff9aa5; color: #ffb8c2; }
.jn-fine { color: var(--muted); font-size: 15px; margin-top: 26px; }
.foot-app { margin: 0 0 10px; }
.foot-app a { text-decoration: none; }
.app-card { max-width: 440px; text-align: center; padding: 26px 26px 20px; border-radius: 20px; border: 2px solid var(--gold);
  background: radial-gradient(120% 120% at 50% 0%, rgba(96,0,174,.6), rgba(27,11,51,.97) 65%); box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.app-card img { border-radius: 22%; box-shadow: 0 6px 20px rgba(0,0,0,.5); }
.app-card h2 { font-family: var(--display); font-weight: 400; color: var(--gold); font-size: 32px; margin: 10px 0 6px; }
.app-how { color: var(--ink); background: rgba(13,4,24,.6); border-radius: 12px; padding: 12px 14px; }
.app-how[hidden] { display: none; }
.app-go { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.app-go button { border: 0; cursor: pointer; }
.app-go .sp-ghost { border: 2px solid var(--gold); }
/* inside the installed app: no "install" link, and room for the phone's notch */
html.in-app .foot-app [data-install] { display: none; }
html.in-app body { padding-top: env(safe-area-inset-top); }

/* ---------- the full-moon pull on the daily card ---------- */
html.moonday { background: #04141a; }
html.moonday body { background: transparent; }
html.moonday .td .who, html.moonday .td h1 { color: #eaf9f7; text-shadow: 0 0 22px rgba(160,240,255,.45); }
.td-moon { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 3vw, 26px); max-width: 620px; margin: 10px auto 18px; align-items: end; }
.td-moon.arrive .td-mslot { animation: tdDeal .6s cubic-bezier(.2,.8,.2,1) both; }
.td-moon.arrive .td-mslot:nth-child(2) { animation-delay: .25s; } .td-moon.arrive .td-mslot:nth-child(3) { animation-delay: .5s; }
@keyframes tdDeal { from { opacity: 0; transform: translateY(30px) scale(.9); } to { opacity: 1; transform: none; } }
.td-mslot { text-align: center; }
.td-mslot:nth-child(2) { transform: translateY(-18px); }
.td-mcard { position: relative; display: block; width: 100%; aspect-ratio: 700 / 1200; padding: 0; border: 0; background: none; cursor: pointer; perspective: 1000px; }
.td-mcard .sp-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.2,.8,.2,1); }
.td-mcard.flipped .sp-inner { transform: rotateY(180deg); }
.td-mcard.instant .sp-inner { transition: none; }
.td-mcard.reversed .sp-front svg { transform: rotate(180deg); }
.td-mcard:focus-visible { outline: 3px solid #dff6f2; outline-offset: 6px; border-radius: 10px; }
.td-secret.beckon .sp-face { animation: hpBeckon 2.2s ease-in-out infinite; }
.td-secret.nudge { animation: hpNudge .45s ease; }
.td-secret.revealed .sp-face { box-shadow: 0 0 0 3px #f6e98a, 0 0 40px rgba(246,233,138,.9); }
.td-secret.kept { cursor: default; }
.td-secret.kept::after { content: ""; position: absolute; left: 50%; top: 50%; width: 46%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle at 62% 50%, transparent 38%, #cfeef2 40%, #cfeef2 58%, transparent 60%), radial-gradient(circle, #1d5b62 0 70%, #0c2f34 72%);
  box-shadow: 0 0 0 3px #cfeef2, 0 0 18px rgba(170,245,255,.6); }
.td-mlabel { margin: 10px 0 0; font-size: 15px; line-height: 1.35; }
.td-mlabel b { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(17px, 2.4vw, 22px); color: #eaf9f7; }
.td-mlabel span { color: var(--muted); }
.td-moontext { max-width: 62ch; margin: 0 auto; }
.td-moontext p { font-size: 18px; }

/* ---------- the installed app: just the daily card and the journal ---------- */
.app-tabs { display: none; }
html.in-app .app-tabs { position: fixed; z-index: 35; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: rgba(13,4,24,.94); border-top: 1px solid rgba(233,215,1,.3); backdrop-filter: blur(6px); }
.app-tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; font-size: 13px; color: var(--muted); text-decoration: none; }
.app-tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.app-tabs a[aria-current="page"] { color: var(--gold); }
html.in-app body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
html.in-app footer, html.in-app .td-more, html.in-app .top .back-link { display: none; }
html.in-app .top .brand { pointer-events: none; }
html.moonday.in-app .app-tabs { background: rgba(2,14,18,.92); border-top-color: rgba(207,238,242,.3); }
.jn-backup { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.jn-backup button { border: 0; cursor: pointer; }
.jn-restore { position: relative; cursor: pointer; }
.jn-restore input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.jn-restore:focus-within { outline: 2px solid var(--gold); outline-offset: 3px; }
.jn-msg { color: var(--muted); min-height: 1.3em; }
html.moonday .td-moontext #tdMoonText:not([hidden]) { padding: 18px 20px 6px; border-radius: 18px; background: rgba(3,16,22,.82); border: 1px solid rgba(207,238,242,.3); }
html.moonday .td-moontext .cj-keeprow { text-align: center; }
