/* profile-ui.css — ceremony modal, profile bar, reading-as tags, new
   pipeline sections (numerology / tarot birth cards / events / world
   mythologies / people library). Self-contained so style.css stays clean. */

/* ============ Profile bar (top, under <header>) ============ */
.zpbar {
  position: relative;
  z-index: 50;
  width: 100%;
  background: linear-gradient(90deg, rgba(20,15,45,0.85) 0%, rgba(35,20,70,0.85) 50%, rgba(20,15,45,0.85) 100%);
  border-bottom: 1px solid rgba(180, 140, 255, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #e6e4ff;
  font-family: 'Mulish', sans-serif;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}
.zpbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.55rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.zpbar-off .zpbar-inner { justify-content: center; }
.zpbar-cta {
  background: linear-gradient(90deg, rgba(120,80,220,0.18), rgba(80,120,220,0.18));
  border: 1px solid rgba(180, 140, 255, 0.35);
  color: #fff;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.zpbar-cta:hover {
  background: linear-gradient(90deg, rgba(140,100,240,0.32), rgba(100,140,240,0.32));
  border-color: rgba(200, 170, 255, 0.6);
  transform: translateY(-1px);
}
.zpbar-id { display: inline-flex; align-items: center; gap: 0.5rem; min-width: 0; }
.zpbar-icon { font-size: 1.15rem; flex-shrink: 0; }
.zpbar-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zpbar-meta { display: inline-flex; align-items: center; gap: 0.75rem; }
.zpbar-unlock {
  color: rgba(180, 220, 255, 0.85);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}
.zpbar-edit {
  background: transparent;
  border: 1px solid rgba(200, 180, 255, 0.35);
  color: #d8d2ff;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}
.zpbar-edit:hover {
  background: rgba(180, 140, 255, 0.18);
  color: #fff;
}

/* ============ "Reading as" tag inside each section ============ */
.reading-as-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  margin: 0 auto 1rem;
  background: rgba(120, 100, 200, 0.12);
  border: 1px solid rgba(180, 150, 255, 0.25);
  border-radius: 999px;
  color: #e0d8ff;
  font-size: 0.88rem;
  font-family: 'Mulish', sans-serif;
}
.reading-as-tag .ra-icon { font-size: 1rem; }
.reading-as-tag .ra-edit {
  margin-left: 0.5rem;
  background: transparent;
  border: 0;
  color: rgba(180, 200, 255, 0.85);
  cursor: pointer;
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
}
.reading-as-tag .ra-edit:hover { color: #fff; }

/* Center reading-as-tag inside the cards (they're block-level inside a
   centered .planet-card, so wrap container) */
.planet-card { position: relative; }
.planet-card > .reading-as-tag {
  display: flex;
  width: max-content;
  max-width: 90%;
}

/* ============ Ceremony modal ============ */
body.zceremony-open { overflow: hidden; }
.zceremony[hidden] { display: none; }
.zceremony {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.zceremony-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(10, 5, 30, 0.75) 0%, rgba(0, 0, 0, 0.92) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.zceremony-card {
  position: relative;
  width: 100%;
  max-width: 540px;
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  background: linear-gradient(165deg, rgba(30, 20, 60, 0.95) 0%, rgba(15, 10, 35, 0.95) 100%);
  border: 1px solid rgba(180, 140, 255, 0.35);
  border-radius: 18px;
  padding: 2rem;
  color: #e8e4ff;
  box-shadow: 0 30px 80px -10px rgba(80, 40, 160, 0.4), 0 0 60px rgba(120, 80, 220, 0.15);
  animation: zcrise 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes zcrise {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.zceremony-close {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  background: transparent;
  border: 0;
  color: rgba(220, 200, 255, 0.6);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}
.zceremony-close:hover { color: #fff; }
.zceremony-head { text-align: center; margin-bottom: 1.5rem; }
.zceremony-eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(200, 170, 255, 0.7);
  margin-bottom: 0.5rem;
}
.zceremony-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.85rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
  color: #fff;
}
.zceremony-sub {
  font-family: 'Mulish', sans-serif;
  font-size: 0.95rem;
  color: rgba(220, 210, 255, 0.75);
  margin: 0;
}
.zceremony-body { display: flex; flex-direction: column; gap: 1.1rem; }
.zceremony-row { display: flex; flex-direction: column; gap: 0.35rem; }
.zceremony-row label {
  font-family: 'Mulish', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #d8d2ff;
}
.zceremony-row .zc-opt {
  color: rgba(180, 180, 220, 0.65);
  font-weight: 400;
  font-style: italic;
  font-size: 0.78rem;
}
.zceremony-row .zc-req {
  color: #ffb3c8;
  font-weight: 400;
  font-size: 0.78rem;
}
.zceremony-row .form-input {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(180, 150, 255, 0.25);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  color: #fff;
  font-family: 'Mulish', sans-serif;
  font-size: 0.95rem;
  width: 100%;
  box-sizing: border-box;
  color-scheme: dark;
}
.zceremony-row .form-input:focus {
  outline: none;
  border-color: rgba(200, 170, 255, 0.6);
  background: rgba(0, 0, 0, 0.4);
}
.zc-checkbox {
  font-size: 0.82rem;
  color: rgba(200, 200, 230, 0.8);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.35rem;
  cursor: pointer;
}
.zceremony-error {
  color: #ffb0b0;
  background: rgba(120, 30, 30, 0.25);
  border: 1px solid rgba(255, 120, 120, 0.4);
  padding: 0.55rem 0.8rem;
  border-radius: 6px;
  font-size: 0.88rem;
}
.zceremony-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(180, 140, 255, 0.18);
}
.zceremony-skip {
  background: transparent;
  border: 0;
  color: rgba(180, 180, 220, 0.7);
  font-family: 'Mulish', sans-serif;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.zceremony-skip:hover { color: #fff; }
.zceremony-save {
  flex: 1;
  max-width: 260px;
}

/* ============ New sections shared shell ============ */
.zsection { padding: 4rem 1.25rem; }
.zsection .zs-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.zsection h2.zs-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.4rem;
  margin: 0 0 0.4rem;
}
.zsection .zs-tagline {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  color: rgba(220, 210, 255, 0.7);
  margin: 0 0 2rem;
}

/* Locked teaser for sections that need data */
.zs-locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  padding: 2.5rem 1rem;
  background: rgba(15, 10, 35, 0.5);
  border: 1px dashed rgba(180, 150, 255, 0.35);
  border-radius: 14px;
  color: rgba(220, 210, 255, 0.85);
}
.zs-locked-icon { font-size: 2rem; opacity: 0.7; }
.zs-locked button {
  margin-top: 0.5rem;
  background: linear-gradient(90deg, rgba(120,80,220,0.3), rgba(80,120,220,0.3));
  border: 1px solid rgba(180, 140, 255, 0.5);
  color: #fff;
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: 'Mulish', sans-serif;
  font-size: 0.95rem;
}
.zs-locked button:hover { background: linear-gradient(90deg, rgba(140,100,240,0.45), rgba(100,140,240,0.45)); }

/* ============ Numerology ============ */
.numerology-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}
.numerology-card {
  background: linear-gradient(165deg, rgba(40, 30, 70, 0.55), rgba(20, 15, 40, 0.55));
  border: 1px solid rgba(180, 150, 255, 0.22);
  border-radius: 14px;
  padding: 1.5rem 1.2rem;
  text-align: center;
}
.numerology-num {
  font-family: 'Cinzel', serif;
  font-size: 3.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ffd66e, #c389ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.numerology-name {
  margin-top: 0.4rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  color: #fff;
}
.numerology-desc {
  margin-top: 0.6rem;
  font-size: 0.88rem;
  color: rgba(220, 210, 255, 0.78);
  line-height: 1.5;
}

/* ============ Tarot birth cards ============ */
.tbc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}
.tbc-card {
  position: relative;
  background: linear-gradient(165deg, #1a1340 0%, #0a0820 100%);
  border: 1px solid rgba(200, 160, 255, 0.45);
  border-radius: 14px;
  padding: 1.4rem 1.1rem;
  text-align: center;
  box-shadow: 0 8px 30px rgba(120, 80, 220, 0.15);
}
.tbc-role {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(220, 180, 255, 0.7);
  margin-bottom: 0.5rem;
}
.tbc-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.45rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
}
.tbc-num {
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  color: rgba(200, 180, 255, 0.85);
  margin-bottom: 0.7rem;
}
.tbc-meaning {
  font-size: 0.9rem;
  color: rgba(220, 210, 255, 0.85);
  line-height: 1.55;
}

/* ============ Events overlay ============ */
.events-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 1.5rem 0;
  text-align: left;
}
.event-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(25, 18, 55, 0.55);
  border: 1px solid rgba(180, 150, 255, 0.2);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
}
.event-item .ev-main { flex: 1; min-width: 0; }
.event-item .ev-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  color: #fff;
}
.event-item .ev-date {
  font-size: 0.85rem;
  color: rgba(180, 200, 255, 0.75);
}
.event-item .ev-transit {
  font-size: 0.88rem;
  color: rgba(220, 210, 255, 0.85);
  margin-top: 0.45rem;
  font-style: italic;
  line-height: 1.5;
}
.event-item .ev-remove {
  background: transparent;
  border: 0;
  color: rgba(200, 180, 220, 0.55);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.25rem 0.5rem;
}
.event-item .ev-remove:hover { color: #ff9090; }
.event-add-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.6rem;
  margin: 0.5rem 0 1.5rem;
}
.event-add-form input,
.event-add-form .form-input {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(180, 150, 255, 0.25);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  color: #fff;
  font-family: 'Mulish', sans-serif;
  color-scheme: dark;
}
.event-add-form button {
  background: linear-gradient(90deg, rgba(120,80,220,0.35), rgba(80,120,220,0.35));
  border: 1px solid rgba(180, 140, 255, 0.5);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Mulish', sans-serif;
}
@media (max-width: 600px) { .event-add-form { grid-template-columns: 1fr; } }

/* ============ World Mythologies card stack ============ */
.worldmyth-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.worldmyth-tab {
  background: rgba(40, 30, 70, 0.45);
  border: 1px solid rgba(180, 150, 255, 0.22);
  color: rgba(220, 210, 255, 0.85);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: 'Mulish', sans-serif;
  font-size: 0.88rem;
  transition: all 0.2s ease;
}
.worldmyth-tab:hover { background: rgba(60, 45, 100, 0.55); color: #fff; }
.worldmyth-tab.is-active {
  background: linear-gradient(90deg, rgba(120,80,220,0.4), rgba(80,120,220,0.4));
  border-color: rgba(200, 170, 255, 0.6);
  color: #fff;
}
.worldmyth-card {
  background: linear-gradient(165deg, rgba(40, 30, 70, 0.55), rgba(20, 15, 40, 0.55));
  border: 1px solid rgba(180, 150, 255, 0.25);
  border-radius: 14px;
  padding: 1.75rem 1.5rem;
  min-height: 180px;
  text-align: left;
}
.worldmyth-card .wm-tradition {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(200, 170, 255, 0.7);
  margin-bottom: 0.4rem;
}
.worldmyth-card .wm-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.85rem;
  color: #fff;
  margin: 0 0 0.5rem;
}
.worldmyth-card .wm-meta {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  color: rgba(200, 200, 240, 0.8);
  margin-bottom: 0.8rem;
}
.worldmyth-card .wm-body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(225, 220, 255, 0.9);
}

/* ============ People Library ============ */
.people-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.person-card {
  background: linear-gradient(165deg, rgba(40, 30, 70, 0.55), rgba(20, 15, 40, 0.55));
  border: 1px solid rgba(180, 150, 255, 0.22);
  border-radius: 12px;
  padding: 1.1rem 1rem;
  text-align: left;
  position: relative;
}
.person-card .pc-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  color: #fff;
  margin: 0 0 0.2rem;
}
.person-card .pc-rel {
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(200, 170, 255, 0.7);
  margin-bottom: 0.4rem;
}
.person-card .pc-meta { font-size: 0.85rem; color: rgba(200, 200, 240, 0.85); }
.person-card .pc-sign { font-size: 1.5rem; margin-right: 0.4rem; }
.person-card .pc-remove {
  position: absolute;
  top: 0.4rem;
  right: 0.5rem;
  background: transparent;
  border: 0;
  color: rgba(200, 180, 220, 0.5);
  cursor: pointer;
  font-size: 1rem;
}
.person-card .pc-remove:hover { color: #ff9090; }
.person-empty {
  color: rgba(200, 200, 240, 0.65);
  font-style: italic;
  padding: 1.5rem 0;
}

/* ============ Compatibility partner form upgrade ============ */
.compat-partner-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
  align-items: end;
  margin: 1rem 0;
}
.compat-partner-form .form-input {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(180, 150, 255, 0.25);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  color: #fff;
  color-scheme: dark;
}
.compat-partner-pick {
  background: rgba(25, 18, 55, 0.55);
  border: 1px solid rgba(180, 150, 255, 0.22);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin: 0.8rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
}
.compat-partner-chip {
  background: rgba(60, 45, 110, 0.55);
  border: 1px solid rgba(180, 150, 255, 0.3);
  color: #fff;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
}
.compat-partner-chip:hover { background: rgba(80, 60, 140, 0.7); }
.compat-mode-toggle {
  display: inline-flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: rgba(220, 210, 255, 0.85);
}
.compat-mode-toggle button {
  background: transparent;
  border: 1px solid rgba(180, 150, 255, 0.3);
  color: rgba(220, 210, 255, 0.85);
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
}
.compat-mode-toggle button.is-active {
  background: rgba(180, 140, 255, 0.25);
  color: #fff;
  border-color: rgba(200, 170, 255, 0.6);
}
@media (max-width: 700px) {
  .compat-partner-form { grid-template-columns: 1fr; }
}

/* ============ Ba-Zi Four Pillars ============ */
.bazi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin: 1.25rem 0;
}
.bazi-pillar {
  background: rgba(35, 25, 70, 0.55);
  border: 1px solid rgba(200, 170, 100, 0.3);
  border-radius: 10px;
  padding: 0.85rem 0.4rem;
  text-align: center;
}
.bazi-pillar .bz-label {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(220, 200, 130, 0.75);
}
.bazi-pillar .bz-stem,
.bazi-pillar .bz-branch {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  color: #fff;
  margin: 0.2rem 0;
}
.bazi-pillar .bz-element {
  font-size: 0.78rem;
  color: rgba(220, 200, 130, 0.85);
}
.bazi-note {
  font-size: 0.85rem;
  color: rgba(220, 210, 255, 0.78);
  font-style: italic;
  margin-top: 0.5rem;
}
@media (max-width: 500px) { .bazi-grid { grid-template-columns: repeat(2, 1fr); } }

/* ============ Egyptian decan card polish ============ */
.decan-info {
  margin-top: 1.25rem;
  padding: 1rem 1.2rem;
  background: rgba(120, 90, 30, 0.18);
  border: 1px solid rgba(220, 180, 80, 0.35);
  border-radius: 10px;
}
.decan-info .decan-label {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 220, 130, 0.85);
  margin-right: 0.4rem;
}
.decan-info .decan-quality {
  margin-top: 0.5rem;
  font-style: italic;
  color: rgba(255, 240, 200, 0.85);
}
