/* ===========================================================================
   css/chinese-astrology-compat.css — the two no-account CN "toys" (S4):
   /chinese-astrology/compatibility/  +  /chinese-astrology/clash-year/

   Layers on top of the shared cna- section chrome (chinese-astrology-animal.css)
   and the cn-page brand vars (chinese-astrology.css). Only the pieces unique to
   these two tools live here: the date-input forms, the colour-coded verdict
   banner/card (one theme per relationship type), the two facing portraits, and
   the San He trine-wheel. Shared by BOTH pages; page-only bits are namespaced
   (.ccp- = compatibility, .ccl- = clash-year, .ccv- = shared verdict system).
   =========================================================================== */

:root {
  --ccp-parchment: #FBF3DC;
  --ccp-ink:       #2D1F38;
  --ccp-wine:      #6B1F2C;
  --ccp-gold:      #B89150;
  --ccp-gold-lt:   #D4AC68;
  --ccp-gold-dk:   #8E6E3A;

  /* Per-verdict accents (set on the banner; consumed by the wheel + medallions) */
  --ccv-accent:    #8E6E3A;
  --ccv-accent-lt: #D4AC68;
  --ccv-wash:      #F3E7C4;
}

/* ─── The input form (shared shape; both pages) ─────────────────────────── */
.ccp-form-wrap {
  max-width: 760px;
  margin: 1.6rem auto 0;
}
.ccp-form {
  position: relative;
  background: linear-gradient(180deg, #FFFBEF 0%, #FBF3DC 100%);
  border: 1px solid rgba(184, 145, 80, 0.55);
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(45, 31, 56, 0.09), inset 0 0 0 1px rgba(255, 251, 239, 0.6);
  padding: 1.8rem 1.6rem 2rem;
}
.ccp-daters {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: 1fr 1fr;
}
.ccp-daters.is-single { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
.ccp-dater-label {
  display: block;
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
  color: var(--ccp-wine);
  text-align: center;
  margin-bottom: 0.7rem;
}
.ccp-dater-label input {
  font: inherit;
  color: var(--ccp-ink);
  text-align: center;
  border: 1px dashed rgba(142, 110, 58, 0.5);
  border-radius: 6px;
  background: rgba(255, 251, 239, 0.5);
  padding: 0.15rem 0.4rem;
  width: 9ch;
  margin-left: 0.3rem;
}
.ccp-dater-selects {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1fr;
  gap: 0.5rem;
}
.ccp-form select {
  width: 100%;
  font-family: 'EB Garamond', serif;
  font-size: 1rem;
  color: var(--ccp-ink);
  background: #FFFDF6;
  border: 1px solid rgba(184, 145, 80, 0.6);
  border-radius: 8px;
  padding: 0.6rem 0.5rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238E6E3A' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  cursor: pointer;
}
.ccp-form select:focus {
  outline: none;
  border-color: var(--ccp-gold-lt);
  box-shadow: 0 0 0 3px rgba(212, 172, 104, 0.28);
}
.ccp-form-actions {
  margin-top: 1.6rem;
  text-align: center;
}
.ccp-submit {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: 0.03em;
  color: #FFF8E6;
  background: linear-gradient(180deg, #7A2431 0%, #5C1826 100%);
  border: 1px solid var(--ccp-gold);
  border-radius: 999px;
  padding: 0.85rem 2.2rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(92, 24, 38, 0.28);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.ccp-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(92, 24, 38, 0.34); }
.ccp-submit:disabled { opacity: 0.55; cursor: default; transform: none; box-shadow: none; }
.ccp-form-err {
  min-height: 1.2rem;
  margin-top: 0.8rem;
  font-family: 'EB Garamond', serif;
  font-size: 0.98rem;
  color: var(--ccp-wine);
  text-align: center;
}

/* ─── Loading state ─────────────────────────────────────────────────────── */
.ccp-loading {
  text-align: center;
  padding: 2.6rem 1rem;
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ccp-gold-dk);
}
.ccp-loading .ccp-spin {
  display: inline-block;
  width: 34px; height: 34px;
  margin-bottom: 0.7rem;
  border-radius: 50%;
  border: 2.5px solid rgba(184, 145, 80, 0.3);
  border-top-color: var(--ccp-gold);
  animation: ccpspin 0.9s linear infinite;
}
@keyframes ccpspin { to { transform: rotate(360deg); } }

/* ─── Results shell ─────────────────────────────────────────────────────── */
/* scroll-margin clears the sticky top-nav when JS scrolls results into view. */
.ccp-results { display: none; margin-top: 2.4rem; scroll-margin-top: 130px; }
.ccp-results.is-visible { display: block; animation: ccpfade 0.5s ease; }
@keyframes ccpfade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ─── Facing portraits (compat) ─────────────────────────────────────────── */
.ccp-facing {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.6rem, 4vw, 2.4rem);
  margin: 0 auto 1.4rem;
  max-width: 720px;
}
.ccp-face { text-align: center; flex: 0 0 auto; }
.ccp-face img {
  width: clamp(120px, 30vw, 190px);
  height: clamp(120px, 30vw, 190px);
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--ccv-accent-lt);
  box-shadow: 0 6px 22px rgba(45, 31, 56, 0.2);
  background: var(--ccp-parchment);
}
.ccp-face--b img { transform: scaleX(-1); }        /* mirror so the two face each other */
.ccp-face-name {
  display: block;
  margin-top: 0.6rem;
  font-family: 'Cinzel', serif;
  font-weight: 700;              /* round 7: larger + bolder */
  font-size: 1.5rem;
  color: var(--ccp-wine);
}
/* round 8: the two sub-lines were small + italic and read as an afterthought.
   Now a solid upright pillar-line, with the date stepped down in gold small-caps. */
.ccp-face-sub {
  display: block;
  margin-top: 0.28rem;
  font-family: 'EB Garamond', serif;
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: var(--ccp-ink);
}
.ccp-face-date {
  display: block;
  margin-top: 0.3rem;
  padding-top: 0.34rem;
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: var(--ccp-gold-dk);
  border-top: 1px solid rgba(184, 145, 80, 0.45);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}
.ccp-facing-link {
  flex: 0 0 auto;
  align-self: center;
  font-family: 'Cinzel', serif;
  font-size: clamp(1.6rem, 6vw, 2.6rem);
  color: var(--ccv-accent);
  opacity: 0.85;
}

/* ─── Verdict banner / card (colour-coded, shared) ──────────────────────── */
.ccv-banner {
  position: relative;
  text-align: center;
  max-width: 780px;
  margin: 0 auto 2rem;
  padding: 1.8rem 1.6rem 2rem;
  border-radius: 16px;
  background:
    radial-gradient(120% 100% at 50% 0%, var(--ccv-wash) 0%, #FFFBEF 70%);
  border: 1px solid var(--ccv-accent-lt);
  box-shadow: 0 6px 26px rgba(45, 31, 56, 0.12), inset 0 0 0 1px rgba(255, 251, 239, 0.7);
}
.ccv-badge {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #FFF8E6;
  background: var(--ccv-accent);
  border-radius: 999px;
  padding: 0.34rem 1.1rem;
  margin-bottom: 0.9rem;
}
.ccv-title {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 5vw, 2.3rem);
  color: var(--ccp-ink);
  margin: 0 0 0.5rem;
  line-height: 1.15;
}
.ccv-title em { color: var(--ccv-accent); font-style: italic; }
.ccv-names {
  /* round 7: was barely-visible small gold — now larger + wine */
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--ccp-wine);
  margin: 0;
}
.ccv-para {
  font-family: 'EB Garamond', serif;
  font-size: 1.2rem;             /* round 7: suite-wide body parity (1.2/1.75) */
  line-height: 1.75;
  color: var(--ccp-ink);
  max-width: 640px;
  margin: 1.2rem auto 0;
}
.ccv-tone {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-weight: 700;              /* round 8: the verdict line carries the page — bold it */
  font-size: 1.3rem;             /* round 8: a touch above body parity */
  line-height: 1.7;
  color: var(--ccp-wine);
  max-width: 620px;
  margin: 1.1rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(184, 145, 80, 0.4);
}

/* Verdict THEMES — one accent per relationship type. Clash stays warm amber,
   never an alarm red (weather, not doom). Scoped to the RESULTS container (which
   JS stamps with data-type) so the banner, the facing/medallion borders, AND the
   trine-wheel all inherit the same accent — the wheel is a sibling of the banner,
   so a banner-only scope would leave it on the default gold. */
.ccp-results[data-type="san_he"], .ccl-results[data-type="san_he"]           { --ccv-accent:#4A7A3A; --ccv-accent-lt:#7BA867; --ccv-wash:#E6F0DC; }
.ccp-results[data-type="liu_he"], .ccl-results[data-type="liu_he"]           { --ccv-accent:#1F3A5F; --ccv-accent-lt:#5B7FA6; --ccv-wash:#DCE6F0; }
.ccp-results[data-type="clash"], .ccl-results[data-type="clash"]             { --ccv-accent:#B06A1E; --ccv-accent-lt:#D9A05A; --ccv-wash:#F4E6D0; }
.ccp-results[data-type="same_animal"], .ccl-results[data-type="same_animal"] { --ccv-accent:#9E2B25; --ccv-accent-lt:#C86B5C; --ccv-wash:#F3DAD3; }
.ccp-results[data-type="neutral"], .ccl-results[data-type="neutral"]         { --ccv-accent:#8E6E3A; --ccv-accent-lt:#D4AC68; --ccv-wash:#F3E7C4; }

/* ─── The San He trine-wheel ────────────────────────────────────────────── */
.ccp-wheel-wrap { text-align: center; margin: 2.2rem auto 0.6rem; }
.ccp-wheel {
  width: min(560px, 92vw);       /* round 8: wider again — the name ring now sits fully
                                     outside the rim, so the viewBox grew with it */
  height: auto;
  margin: 0 auto;
  display: block;
}
/* Base ring markers: faint until highlighted. */
.cn-wheel-marker { fill: #FFFBEF; stroke: rgba(184,145,80,0.55); stroke-width: 0.5; transition: all 0.3s ease; }
.cn-wheel-marker.is-on {
  fill: var(--ccv-accent);
  stroke: var(--ccv-accent-lt);
  stroke-width: 1;
}
.cn-wheel-marker.is-trine { fill: var(--ccv-accent-lt); stroke: var(--ccv-accent); stroke-width: 0.7; }

/* round 7: animal-name labels on the outer ring, so all twelve read at rest.
   Wine at rest; the highlighted pair takes the verdict accent + bold. */
.cn-wheel-label {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  fill: #6B1F2C;
  transition: fill 0.3s ease;
}
.cn-wheel-label.is-on    { fill: var(--ccv-accent); font-weight: 700; }
.cn-wheel-label.is-trine { fill: var(--ccv-accent); }
.cn-wheel-connect {
  stroke: var(--ccv-accent);
  stroke-width: 1.3;
  fill: none;
  opacity: 0.85;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.cn-wheel-connect.is-tri { fill: var(--ccv-accent); fill-opacity: 0.1; }
.cn-wheel-connect.is-dashed { stroke-dasharray: 2 2; opacity: 0.55; }
.cn-wheel-pulse { fill: var(--ccv-accent); opacity: 0.28; }

/* ─── Clash-year: reader-vs-year pairing ────────────────────────────────── */
.ccl-versus {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.8rem, 5vw, 2.6rem);
  margin: 0 auto 1.6rem;
  max-width: 640px;
}
.ccl-vs-side { text-align: center; flex: 0 0 auto; }
.ccl-vs-side img {
  width: clamp(96px, 26vw, 150px);
  height: clamp(96px, 26vw, 150px);
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--ccv-accent-lt);
  box-shadow: 0 5px 18px rgba(45, 31, 56, 0.18);
  background: var(--ccp-parchment);
}
/* round 8: same pillar treatment the compat portraits got — big wine name, then
   a hairline gold rule, then the meta line in Cinzel gold small-caps (upright). */
.ccl-vs-side .ccl-vs-name {
  display: block; margin-top: 0.6rem;
  font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.5rem; color: var(--ccp-wine);
}
.ccl-vs-side .ccl-vs-sub {
  display: block;
  margin: 0.34rem auto 0;
  padding-top: 0.34rem;
  font-family: 'Cinzel', serif; font-style: normal; font-weight: 600;
  font-size: 0.95rem; letter-spacing: 0.05em;
  color: var(--ccp-gold-dk);
  border-top: 1px solid rgba(184, 145, 80, 0.45);
  width: fit-content;
}
/* round 8: was faint gold-dk and hard to read — now wine, larger, bolder. */
.ccl-vs-mid {
  font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.15rem;
  letter-spacing: 0.1em; line-height: 1.35;
  text-transform: uppercase; color: var(--ccp-wine); flex: 0 0 auto;
  max-width: 7.5em; text-align: center;
}
.ccl-yearline {
  max-width: 640px;
  margin: 0 auto 1.6rem;
  text-align: center;
  font-family: 'EB Garamond', serif;
  font-size: 1.2rem;             /* round 7: suite-wide body parity */
  line-height: 1.75;
  color: var(--ccp-ink);
}
.ccl-yearline strong { color: var(--ccp-wine); }

/* ─── Boundary nudge (both pages) ───────────────────────────────────────── */
.ccp-nudge {
  display: none;
  max-width: 780px;              /* round 8: match .ccv-banner, the card directly above it */
  margin: 1.6rem auto 0;
  padding: 1.1rem 1.3rem;
  background: #FFF6E4;
  border: 1px solid var(--ccp-gold);
  border-left: 4px solid var(--ccp-gold-lt);
  border-radius: 10px;
  font-family: 'EB Garamond', serif;
  font-size: 1.2rem;             /* round 7: suite-wide body parity */
  line-height: 1.75;
  color: #4A1620;
}
.ccp-nudge.is-visible { display: block; }
.ccp-nudge strong { color: var(--ccp-wine); }
.ccp-nudge a { color: var(--ccp-wine); font-weight: 600; }

/* ─── Upsell block (both pages) ─────────────────────────────────────────── */
.ccp-upsell {
  max-width: 720px;
  margin: 2.4rem auto 0;
  text-align: center;
  padding: 1.8rem 1.4rem;
  background: linear-gradient(180deg, #2D1F38 0%, #3A1F38 100%);
  border-radius: 16px;
  border: 1px solid var(--ccp-gold-dk);
}
.ccp-upsell h3 {
  font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.4rem;
  color: var(--ccp-gold-lt); margin: 0 0 0.7rem;
}
.ccp-upsell p {
  font-family: 'EB Garamond', serif; font-size: 1.2rem; line-height: 1.75;   /* round 7: body parity */
  color: #EDE3CC; max-width: 560px; margin: 0 auto 1.3rem;
}
.ccp-upsell .ccp-upsell-cta {
  display: inline-block;
  font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.05rem; letter-spacing: 0.02em;
  color: #2D1F38;
  background: linear-gradient(180deg, #E0C079 0%, #C79B4A 100%);
  border-radius: 999px; padding: 0.8rem 2rem; text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  transition: transform 0.14s ease;
}
.ccp-upsell .ccp-upsell-cta:hover { transform: translateY(-2px); }
/* round 8: clash-year runs the button on its own centred row above the upsell. */
.ccp-again-wrap { text-align: center; margin: 0.4rem auto 1.8rem; }
.ccp-again {
  /* round 8: solid wine pill with white letters + a thin gold rim, so it reads as
     the real control it is instead of a faint outline on peach. */
  display: inline-block; margin: 1.1rem auto 0.2rem; text-align: center;
  font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.08rem;
  letter-spacing: 0.05em;
  color: #FBF3DC;
  background: linear-gradient(180deg, #7A2432 0%, var(--ccp-wine) 55%, #58121E 100%);
  border: 1px solid rgba(184, 145, 80, 0.75); border-radius: 999px;
  padding: 0.68rem 1.9rem; cursor: pointer;
  box-shadow: 0 4px 14px rgba(45, 31, 56, 0.24);
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}
.ccp-again:hover {
  color: #FFFBEF;
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 7px 20px rgba(45, 31, 56, 0.3);
}
.ccp-again:focus-visible { outline: 2px solid var(--ccp-gold-lt); outline-offset: 3px; }

/* ─── Mobile ────────────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .ccp-daters { grid-template-columns: 1fr; }
  .ccp-facing { flex-wrap: nowrap; gap: 0.4rem; }
  .ccv-para { font-size: 1.12rem; }
}
