/* ---------- page layout: wheel | panel ---------- */
.zw-layout{ display:grid; grid-template-columns:minmax(0,1fr) minmax(360px,420px); gap:24px;
  max-width:1500px; margin:0 auto; height:calc(100vh - var(--zw-top, 90px) - 18px); min-height:480px; }
.zw-stage{ position:relative; display:flex; flex-direction:column; align-items:center; min-height:0; min-width:0; }
.zw-wheel{ flex:1; min-height:0; width:100%; height:100%; display:block; overflow:visible; }

/* ---------- the wheel ---------- */
.zw-line{ fill:none; stroke:var(--gold); }
/* Rotate around the wheel's own centre. (view-box + 50% used the middle of the
   whole SVG viewport, which on wide screens is off to the side of the wheel.) */
.zw-rotor{ transform-box:fill-box; transform-origin:center; }
.zw-rotor.idle{ animation:zw-turn 240s linear infinite; }
@keyframes zw-turn{ to{ transform:rotate(-360deg); } }
.zw-name{ font-family:var(--font-heading); font-size:19px; letter-spacing:.32em; fill:var(--gold); fill-opacity:.82; }
.zw-glyph{ font-family:'Segoe UI Symbol','Noto Sans Symbols 2','Noto Sans Symbols','DejaVu Sans','Apple Symbols',serif;
  font-size:36px; fill:var(--gold-light); fill-opacity:.85; }
.zw-roman{ font-family:var(--font-heading); font-size:15px; letter-spacing:.06em; fill:var(--gold); fill-opacity:.55; }
.zw-twinkle{ animation:zw-twinkle 3.6s ease-in-out infinite; }
@keyframes zw-twinkle{ 0%,100%{ opacity:.25; } 50%{ opacity:1; } }

.zw-house{ cursor:pointer; }
.zw-house.locked{ cursor:default; }
.zw-house .zw-wedge{ fill:var(--gold); fill-opacity:0; stroke:none; transition:fill-opacity .3s ease; }
.zw-house:not(.locked):hover .zw-wedge{ fill-opacity:.06; }
.zw-house.revealed .zw-wedge{ fill-opacity:.07; }
.zw-house.active .zw-wedge{ fill-opacity:.16; }
.zw-house.active.facedown .zw-wedge{ animation:zw-pulse 1.8s ease-in-out infinite; }
@keyframes zw-pulse{ 0%,100%{ fill-opacity:.05; } 50%{ fill-opacity:.2; } }
.zw-house .zw-edge{ fill:none; stroke:var(--gold-light); stroke-width:2.2; stroke-opacity:0; transition:stroke-opacity .3s ease; }
.zw-house.active .zw-edge{ stroke-opacity:.9; }

.zw-const line{ stroke:var(--gold); stroke-width:1.2; stroke-opacity:.32; transition:stroke-opacity .6s ease; }
.zw-const circle{ fill:var(--bone); fill-opacity:.55; transition:fill-opacity .6s ease; }
.zw-house.revealed .zw-const line{ stroke-opacity:.85; }
.zw-house.revealed .zw-const circle{ fill-opacity:1; filter:url(#zwStarGlow); }
.zw-house.just .zw-const line{ stroke-dasharray:120; animation:zw-draw 1.1s ease forwards; }
@keyframes zw-draw{ from{ stroke-dashoffset:120; } to{ stroke-dashoffset:0; } }

.zw-cardrune{ font-family:'Segoe UI Symbol','Noto Sans Runic','Noto Sans Symbols',serif; font-size:30px; fill:var(--gold-light);
  opacity:0; transition:opacity .6s ease .2s; filter:url(#zwStarGlow); }
.zw-house.revealed .zw-cardrune{ opacity:1; }

/* ---------- natal chart layer ---------- */
.zw-planets{ pointer-events:none; }
.zw-planet{ font-family:'Segoe UI Symbol','Noto Sans Symbols 2','Noto Sans Symbols','DejaVu Sans','Apple Symbols',serif;
  font-size:36px; fill:var(--zw-planet); paint-order:stroke; stroke:var(--zw-sky-2); stroke-width:6px; stroke-linejoin:round; }
.zw-pretro{ font-family:var(--font-body); font-size:19px; fill:var(--zw-retro); paint-order:stroke; stroke:var(--zw-sky-2); stroke-width:4px; }
.zw-ptick{ stroke:var(--zw-planet); stroke-width:1.6; stroke-opacity:.9; }
.zw-plead{ stroke:var(--zw-planet); stroke-width:.8; stroke-opacity:.45; }
.zw-axis{ stroke:var(--gold-light); stroke-width:1.6; stroke-opacity:.85; stroke-dasharray:6 5; }
.zw-axis-label{ font-family:var(--font-heading); font-size:22px; letter-spacing:.08em; fill:var(--gold-light); }

.zw-natal{ margin-top:12px; }
.zw-seg{ display:inline-flex; border:1px solid rgba(var(--gold-rgb),.35); border-radius:999px; padding:2px; }
.zw-seg button{ background:none; border:0; border-radius:999px; padding:5px 12px; cursor:pointer;
  font-family:var(--font-heading); font-size:calc(0.65625rem * var(--text-scale)); letter-spacing:.1em; text-transform:uppercase; color:var(--frost); opacity:.7; }
.zw-seg button[aria-pressed=true]{ background:var(--gold); color:var(--midnight); opacity:1; }
.zw-seg button:disabled{ cursor:default; }
.zw-natal-note{ font-size:calc(0.78125rem * var(--text-scale)); line-height:1.55; color:var(--frost); opacity:.75; margin:8px 0 0; }
.zw-natal-note[hidden]{ display:none; }
.zw-aspbtn{ margin:10px 0 0 8px; padding:5px 12px; background:none; border:1px solid rgba(var(--gold-rgb),.35); border-radius:999px; cursor:pointer;
  font-family:var(--font-heading); font-size:calc(0.65625rem * var(--text-scale)); letter-spacing:.1em; text-transform:uppercase; color:var(--frost); opacity:.7; }
.zw-aspbtn[aria-pressed=true]{ border-color:var(--gold); color:var(--gold); opacity:1; }
.zw-aspbtn[hidden]{ display:none; }
.zw-asp-legend{ margin:8px 0 0; font-size:calc(0.75rem * var(--text-scale)); color:var(--frost); opacity:.85; }
.zw-asp-legend[hidden]{ display:none; }
.zw-asp-legend span::before{ content:''; display:inline-block; width:18px; height:0; margin-right:6px; vertical-align:middle; border-top:2px solid currentColor; }
.zw-asp-legend .flow{ color:var(--zw-asp-flow); margin-right:12px; }
.zw-asp-legend .tense{ color:var(--zw-asp-tense); }
/* aspect lines on the natal wheel: drawn over the sun, which fades back while they show */
.zw-aspects{ pointer-events:none; }
.zw-asp{ stroke-width:2.2; stroke-linecap:round; fill:none; }
.zw-asp-flowing{ stroke:var(--zw-asp-flow); }
.zw-asp-tense{ stroke:var(--zw-asp-tense); }
.zw-asp-sextile{ stroke-width:1.5; stroke-dasharray:9 7; }
.zw-sun{ transition:opacity .3s; }
.zw-aspects-on .zw-sun{ opacity:.28; }
#zwWheel:not(.zw-aspects-on) .zw-aspects{ display:none; }
.zw-chartbtn{ display:inline-block; margin-top:8px; padding:0; background:none; border:0; cursor:pointer; font-family:var(--font-body); font-size:calc(0.8125rem * var(--text-scale)); color:var(--gold); }
.zw-chartbtn:hover{ text-decoration:underline; }
.zw-chart{ width:min(680px, calc(100vw - 32px)); max-height:86vh; padding:28px 28px 22px; box-sizing:border-box; overflow-y:auto;
  background:linear-gradient(160deg, var(--midnight-2), var(--midnight)); color:var(--frost); border:1px solid rgba(var(--gold-rgb),.3); border-radius:var(--popup-radius);
  box-shadow:var(--popup-shadow); }
.zw-chart::backdrop{ background:var(--backdrop); backdrop-filter:blur(3px); }
.zw-chart-close{ position:sticky; top:0; float:right; margin:-14px -12px 0 8px; width:34px; height:34px; border-radius:50%; cursor:pointer;
  background:rgba(var(--midnight-rgb),.9); border:1px solid rgba(var(--gold-rgb),.35); color:var(--gold); font-size:calc(1.25rem * var(--text-scale)); line-height:1; }
.zw-chart-close:hover{ background:rgba(var(--gold-rgb),.15); }
@media (max-width:520px){ .zw-chart{ padding:22px 18px 18px; } }
.zw-natal-add{ display:inline-block; margin-top:10px; font-size:calc(0.78125rem * var(--text-scale)); color:var(--gold); text-decoration:none; opacity:.85; }
.zw-natal-add:hover{ opacity:1; text-decoration:underline; }
.v-planets{ display:flex; flex-wrap:wrap; gap:4px 14px; margin-top:8px; font-size:calc(0.8125rem * var(--text-scale)); color:var(--bone); }
.v-planets .g{ font-family:'Segoe UI Symbol','Noto Sans Symbols 2','Noto Sans Symbols',serif; color:var(--gold-light); margin-right:4px; }
.v-planets .d{ color:var(--frost); opacity:.6; font-size:calc(0.75rem * var(--text-scale)); margin-left:4px; }
.v-planets .r{ color:var(--red-soft); font-size:calc(0.6875rem * var(--text-scale)); margin-left:3px; }
.v-planets.empty{ font-style:italic; color:var(--frost); opacity:.5; font-size:calc(0.78125rem * var(--text-scale)); }
.v-row .pl{ font-family:'Segoe UI Symbol','Noto Sans Symbols 2','Noto Sans Symbols',serif; color:var(--gold-light); font-size:calc(0.75rem * var(--text-scale)); letter-spacing:2px; margin-left:auto; flex-shrink:0; }

/* ---------- reading panel (same pattern as the Celtic Cross) ---------- */

.zw-chip{ min-width:30px; height:30px; padding:0; border-radius:15px; border:1px solid rgba(var(--gold-rgb),.3); background:none;
  color:var(--frost); font-family:var(--font-heading); font-size:calc(0.75rem * var(--text-scale)); cursor:pointer; transition:background .2s, color .2s, border-color .2s; }
.zw-chip.ov{ padding:0 12px; letter-spacing:.06em; }

.zw-view.swap > *{ animation:zw-in .35s ease both; }
@keyframes zw-in{ from{ opacity:0; transform:translateY(6px); } to{ opacity:1; transform:none; } }
.v-house{ display:flex; align-items:baseline; gap:10px; margin-top:4px; }
.v-house-name{ font-family:var(--font-heading); font-size:calc(0.9375rem * var(--text-scale)); color:var(--bone); }
.v-house-glyph{ font-family:'Segoe UI Symbol','Noto Sans Symbols',serif; color:var(--gold-light); font-size:calc(1.125rem * var(--text-scale)); }
.v-card{ display:flex; gap:14px; align-items:center; margin:14px 0 12px; padding-top:12px; border-top:1px solid rgba(var(--frost-rgb),.1); }
.v-thumb{ position:relative; flex-shrink:0; width:62px; height:93px; padding:0; border:0; border-radius:6px; overflow:hidden; cursor:zoom-in;
  background:var(--midnight); box-shadow:0 4px 12px rgba(var(--shadow-rgb),.5); }
.v-thumb img, .v-thumb canvas{ width:100%; height:100%; object-fit:cover; display:block; }
.v-thumb .tf{ font-size:6px; }
.v-thumb.reversed img, .v-thumb.reversed canvas, .v-thumb.reversed .tf{ transform:rotate(180deg); }
.v-name{ font-family:var(--font-heading); font-size:calc(1.25rem * var(--text-scale)); line-height:1.25; color:var(--bone); }
.v-figure{ font-size:calc(0.78125rem * var(--text-scale)); font-style:italic; color:var(--frost); opacity:.6; margin-top:3px; }
.v-orient{ display:inline-block; margin-top:6px; font-size:calc(0.625rem * var(--text-scale)); letter-spacing:.12em; text-transform:uppercase; padding:2px 8px; border-radius:999px;
  color:var(--aurora); border:1px solid rgba(var(--aurora-soft-rgb),.4); }
.v-facedown{ margin:18px 0; padding:22px; text-align:center; border:1px dashed rgba(var(--gold-rgb),.3); border-radius:10px; }
.v-facedown p{ font-style:italic; color:var(--frost); opacity:.7; margin:0 0 14px; }
.v-synth{ font-size:calc(0.90625rem * var(--text-scale)); line-height:1.75; color:var(--frost); margin:12px 0 18px; }

/* the AI-written reading: per-house note, then the complete reading in sections (as on the rune page) */
.v-yours p{ font-size:calc(0.90625rem * var(--text-scale)); line-height:1.7; color:var(--bone); margin:0; }
/* while the AI reading is being written: five runes (FREYA) light up in turn */
.v-thinking-runes span{ opacity:.18; animation:zw-rune 2.2s ease-in-out infinite; }
@keyframes zw-rune{ 0%,100%{ opacity:.18; transform:none; text-shadow:none; }
                    35%{ opacity:1; transform:translateY(-3px); text-shadow:0 0 14px rgba(var(--gold-light-rgb),.7); } }
.v-thinking p{ font-family:var(--font-body); font-style:italic; font-size:calc(0.9375rem * var(--text-scale)); color:var(--bone); margin:0 0 6px; }
.v-thinking small{ font-size:calc(0.75rem * var(--text-scale)); color:var(--frost); opacity:.6; }
.v-row{ display:flex; align-items:baseline; gap:10px; width:100%; padding:8px 4px; background:none; border:0; border-bottom:1px solid rgba(var(--frost-rgb),.08);
  text-align:left; cursor:pointer; color:var(--frost); font-family:var(--font-body); font-size:calc(0.84375rem * var(--text-scale)); }
.v-row .n{ font-family:var(--font-heading); color:var(--gold); width:22px; flex-shrink:0; }
.v-row .g{ font-family:'Segoe UI Symbol','Noto Sans Symbols',serif; color:var(--gold-light); width:18px; flex-shrink:0; }
.v-row .p{ opacity:.6; width:96px; flex-shrink:0; }
.v-row .r{ font-size:calc(0.625rem * var(--text-scale)); letter-spacing:.08em; text-transform:uppercase; color:var(--red-soft); margin-left:4px; }

/* text face for cards without artwork (same look as the Celtic Cross) */
.tf{ position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.5em;
  padding:1.1em .8em; box-sizing:border-box; text-align:center; font-size:14px;
  background:radial-gradient(ellipse at 50% 35%, var(--cardface-hi) 0%, var(--cardface-lo) 70%); border:1px solid rgba(var(--gold-rgb),.35); border-radius:6px; color:var(--bone); }
.tf .tf-rune{ font-size:2.6em; line-height:1; color:var(--gold-light); }
.tf .tf-name{ font-family:var(--font-heading); font-size:1em; line-height:1.25; }
.tf .tf-figure{ font-family:var(--font-body); font-style:italic; font-size:.78em; color:var(--frost); opacity:.7; }

/* ---------- zoomed card ---------- */
.zw-backdrop{ position:fixed; inset:0; background:var(--backdrop); backdrop-filter:blur(3px);
  opacity:0; pointer-events:none; transition:opacity .35s ease; z-index:1400; }
.zw-backdrop.show{ opacity:1; pointer-events:auto; cursor:zoom-out; }
.zw-focus{ position:fixed; z-index:1500; border-radius:var(--popup-radius); overflow:hidden; pointer-events:none;
  box-shadow:var(--popup-shadow), 0 0 40px rgba(var(--gold-rgb),.15);
  transition:top .45s cubic-bezier(.2,.8,.25,1), left .45s cubic-bezier(.2,.8,.25,1),
             width .45s cubic-bezier(.2,.8,.25,1), height .45s cubic-bezier(.2,.8,.25,1); }
.zw-focus img, .zw-focus canvas{ width:100%; height:100%; object-fit:contain; display:block; }
.zw-focus.reversed img, .zw-focus.reversed canvas, .zw-focus.reversed .tf{ transform:rotate(180deg); }
.zw-focus .tf{ font-size:26px; border-radius:12px; }

/* ---------- narrower screens: wheel above panel ---------- */
@media (max-width:1000px){
  .zw-layout{ display:block; height:auto; min-height:0; }
  .zw-wheel{ flex:none; height:auto; aspect-ratio:1 / 1; max-height:78vh; }
}
@media (prefers-reduced-motion: reduce){
  .zw-rotor.idle, .zw-twinkle, .zw-house.active.facedown .zw-wedge{ animation:none; }
  .zw-view.swap > *, .zw-house.just .zw-const line{ animation:none; }
  .v-thinking-runes span{ animation:none; opacity:.7; }
}
