/*!
 * Kalkulator BaZi — style
 * Paleta i rytm odwzorowują kalkulator liczby Gua (fsgua) i stronę
 * ivansitsko.com: białe karty, kremowe panele, ceglana czerwień, grafitowy
 * tekst, nagłówki szeryfowe. Wszystko zamknięte w .bzc, żeby nie kolidowało
 * z motywem WordPressa.
 */

.bzc {
  /* --- paleta marki --- */
  --bzc-bg:     #FFFFFF;   /* tło całej karty widgetu */
  --bzc-cream:  #FAF6F0;   /* kremowe tło paneli      */
  --bzc-ink:    #262626;   /* tekst główny            */
  --bzc-muted:  #6F6A64;   /* tekst pomocniczy        */
  --bzc-accent: #C0392B;   /* ceglana czerwień        */
  --bzc-line:   #E7DFD4;   /* linie i obramowania     */
  --bzc-radius: 6px;
  --bzc-head:   Georgia, "Times New Roman", serif;

  /* --- żywioły (te same wartości co w kalkulatorze Gua) --- */
  --bzc-wood:  #4E7C46;
  --bzc-fire:  #C0392B;
  --bzc-earth: #B08040;
  --bzc-metal: #8C8F94;
  --bzc-water: #2C4A6B;

  /* --- ciemniejsze warianty pod biały znak na pieczęci --- */
  --bzc-wood-d:  #3F6639;
  --bzc-fire-d:  #A93226;
  --bzc-earth-d: #8F6630;
  --bzc-metal-d: #6E7278;
  --bzc-water-d: #23405C;

  box-sizing: border-box;
  max-width: 860px;
  margin: 2em auto;
  padding: clamp(20px, 4vw, 40px);
  background: var(--bzc-bg);
  border: 1px solid var(--bzc-line);
  border-radius: var(--bzc-radius);
  color: var(--bzc-ink);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.65;
}

.bzc *, .bzc *::before, .bzc *::after { box-sizing: border-box; }
.bzc p, .bzc h2, .bzc h3, .bzc h4, .bzc ul, .bzc li, .bzc dl, .bzc dt, .bzc dd { margin: 0; padding: 0; }
.bzc ul { list-style: none; }
.bzc :focus-visible { outline: 2px solid var(--bzc-accent); outline-offset: 2px; }

/* ------------------------------------------------------------------ *
 * Nagłówek
 * ------------------------------------------------------------------ */

.bzc-kicker {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--bzc-accent);
}

.bzc-title {
  font-family: var(--bzc-head);
  font-size: clamp(27px, 4.4vw, 36px);
  line-height: 1.2;
  font-weight: 700;
  margin-top: 8px !important;
}

.bzc-lede { margin-top: 10px !important; color: var(--bzc-muted); }

.bzc-eyebrow {
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--bzc-accent);
}

/* ------------------------------------------------------------------ *
 * Formularz
 * ------------------------------------------------------------------ */

.bzc-form {
  margin-top: 24px;
  padding: 20px;
  background: var(--bzc-cream);
  border: 1px solid var(--bzc-line);
  border-radius: var(--bzc-radius);
}

.bzc-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  align-items: flex-end;
}

.bzc-row .bzc-field { flex: 1 1 0; }
.bzc-row .bzc-field:nth-child(3) { flex: 0 0 auto; }

.bzc-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }

.bzc-lab {
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--bzc-muted);
}

.bzc-row .bzc-field input,
.bzc-row .bzc-field select { min-width: 0; width: 100%; }

.bzc-field input[type="date"],
.bzc-field select {
  font: inherit;
  font-size: 16px;
  color: var(--bzc-ink);
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--bzc-line);
  border-radius: var(--bzc-radius);
  min-width: 180px;
}

/* przełącznik płci — ten sam wzorzec co w kalkulatorze Gua */
.bzc-field input[type="time"],
.bzc-field input[type="number"] {
  font: inherit;
  font-size: 16px;
  color: var(--bzc-ink);
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--bzc-line);
  border-radius: var(--bzc-radius);
  min-width: 180px;
}

.bzc-check { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--bzc-muted); cursor: pointer; }
.bzc-check input { margin: 0; }

.bzc-adv { border-top: 1px solid var(--bzc-line); margin-top: 18px; padding-top: 16px; }

.bzc-adv-title {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--bzc-accent);
}

.bzc-adv-body { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: flex-end; margin-top: 14px; }
.bzc-adv-hint { flex-basis: 100%; font-size: 13px; color: var(--bzc-muted); }

.bzc-seg-mk label { min-width: 52px; text-align: center; font-weight: 700; }

.bzc-seg {
  display: flex;
  background: #fff;
  border: 1px solid var(--bzc-line);
  border-radius: var(--bzc-radius);
  overflow: hidden;
}

.bzc-seg input { position: absolute; opacity: 0; width: 0; height: 0; }

.bzc-seg label {
  padding: 10px 18px;
  cursor: pointer;
  user-select: none;
  font-size: 15px;
  border-right: 1px solid var(--bzc-line);
  transition: background 0.15s, color 0.15s;
}

.bzc-seg label:last-of-type { border-right: 0; }
.bzc-seg input:checked + label { background: var(--bzc-accent); color: #fff; }
.bzc-seg input:focus-visible + label { outline: 2px solid var(--bzc-ink); outline-offset: -3px; }

.bzc .bzc-submit,
.bzc button.bzc-submit {
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 13px 26px;
  background: var(--bzc-accent);
  color: #fff;
  border: 0;
  border-radius: var(--bzc-radius);
  cursor: pointer;
  transition: filter 0.15s;
  -webkit-appearance: none;
  appearance: none;
  text-shadow: none;
  box-shadow: none;
}

.bzc .bzc-submit:hover,
.bzc button.bzc-submit:hover { filter: brightness(0.9); background: var(--bzc-accent); color: #fff; }

.bzc-error {
  flex-basis: 100%;
  font-size: 14px;
  font-weight: 700;
  color: var(--bzc-accent);
}

.bzc-error:empty { display: none; }

/* ------------------------------------------------------------------ *
 * Wynik
 * ------------------------------------------------------------------ */

.bzc-out[hidden] { display: none; }
.bzc-result { margin-top: 26px; }

.bzc-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--bzc-line);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.bzc-h { font-family: var(--bzc-head); font-size: 21px; font-weight: 700; }
.bzc-cap { font-size: 13px; color: var(--bzc-muted); }

/* --- momenty terminów słonecznych --- */

.bzc-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: -8px 0 18px !important;
  font-size: 13px;
  color: var(--bzc-muted);
}

/* --- ostrzeżenie o granicy terminu --- */

.bzc-warn {
  margin-top: 20px;
  padding: 18px 20px;
  background: var(--bzc-cream);
  border: 1px solid var(--bzc-line);
  border-left: 4px solid var(--bzc-accent);
  border-radius: var(--bzc-radius);
  font-size: 14.5px;
  color: var(--bzc-muted);
}

.bzc-warn strong { color: var(--bzc-accent); }

/* --- cztery filary --- */

.bzc-pillars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 40px;
}

.bzc-pillar { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bzc-pillar > .bzc-eyebrow { text-align: center; color: var(--bzc-muted); }

.bzc-pillar-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 18px 8px 10px;
  background: var(--bzc-cream);
  border: 1px solid var(--bzc-line);
  border-top: 4px solid var(--bzc-accent);
  border-radius: var(--bzc-radius);
  min-height: 100%;
  animation: bzc-rise 0.4s ease-out backwards;
}

.bzc-pillar:nth-child(1) .bzc-pillar-body { animation-delay: 0ms; }
.bzc-pillar:nth-child(2) .bzc-pillar-body { animation-delay: 60ms; }
.bzc-pillar:nth-child(3) .bzc-pillar-body { animation-delay: 120ms; }
.bzc-pillar:nth-child(4) .bzc-pillar-body { animation-delay: 180ms; }

@keyframes bzc-rise { from { opacity: 0; } to { opacity: 1; } }

.bzc-glyph { font-size: clamp(30px, 6vw, 42px); line-height: 1.1; font-weight: 700; }
.bzc-glyph-mute { color: var(--bzc-line); }

.bzc-sub { font-size: 13px; color: var(--bzc-muted); text-align: center; }
.bzc-rule { width: 58%; height: 1px; background: var(--bzc-line); margin: 8px 0 10px; }
.bzc-unknown { font-size: 13px; color: var(--bzc-muted); text-align: center; }
.bzc-pillar-empty { justify-content: center; }

.bzc-hidden {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 5px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--bzc-line);
  width: 84%;
}

.bzc-hidden-label {
  width: 100%;
  text-align: center;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--bzc-muted);
}

.bzc-hidden-glyph { font-size: 17px; font-weight: 700; }

/* --- dziesięć bogów --- */

.bzc-panel-gods { margin-top: 20px; margin-bottom: 20px; }

.bzc-gods {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.bzc-god {
  background: #fff;
  border: 1px solid var(--bzc-line);
  border-radius: var(--bzc-radius);
  padding: 12px 8px;
  text-align: center;
  min-width: 0;
}

.bzc-god-glyph { font-size: 26px; line-height: 1.1; font-weight: 700; }
.bzc-god-name { font-size: 12px; color: var(--bzc-muted); margin-top: 2px; line-height: 1.3; }
.bzc-god-name span { display: block; }
.bzc-god-val { font-size: 15px; font-weight: 700; margin-top: 6px; }

/* --- panele --- */

.bzc-grid {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 20px;
  align-items: start;
}

.bzc-stars-wrap { margin-bottom: 20px; }

.bzc-panel {
  padding: 22px 24px;
  background: var(--bzc-cream);
  border: 1px solid var(--bzc-line);
  border-left: 4px solid var(--bzc-accent);
  border-radius: var(--bzc-radius);
}

.bzc-panel-dm { display: flex; flex-direction: column; align-items: center; text-align: center; }

/* --- pieczęć Dnia Mistrza --- */

.bzc-seal {
  width: 92px;
  height: 92px;
  margin: 16px 0 14px;
  display: grid;
  place-items: center;
  background: var(--bzc-seal-bg, var(--bzc-accent));
  color: #fff;
  box-shadow: inset 0 0 0 2px var(--bzc-seal-bg, var(--bzc-accent)), inset 0 0 0 5px #fff;
  transform: rotate(-2.5deg);
}

.bzc-seal-wood  { --bzc-seal-bg: var(--bzc-wood-d); }
.bzc-seal-fire  { --bzc-seal-bg: var(--bzc-fire-d); }
.bzc-seal-earth { --bzc-seal-bg: var(--bzc-earth-d); }
.bzc-seal-metal { --bzc-seal-bg: var(--bzc-metal-d); }
.bzc-seal-water { --bzc-seal-bg: var(--bzc-water-d); }

.bzc-seal-glyph { font-size: 46px; line-height: 1; font-weight: 700; }
.bzc-dm-name { font-family: var(--bzc-head); font-size: 21px; font-weight: 700; }

/* --- siła Dnia Mistrza --- */

.bzc-strength { width: 100%; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--bzc-line); }
.bzc-strength .bzc-verdict { margin-bottom: 10px !important; }

.bzc-strength-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  font-size: 14px;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--bzc-line);
  text-align: left;
}

.bzc-strength-muted { color: var(--bzc-muted); border-bottom: 0; margin-bottom: 14px; }
.bzc-strength-val { font-weight: 700; }

.bzc-verdict { font-family: var(--bzc-head); font-size: 19px; font-weight: 700; line-height: 1.3; }
.bzc-verdict-strengthStrong   { color: var(--bzc-wood); }
.bzc-verdict-strengthWeak     { color: var(--bzc-accent); }
.bzc-verdict-strengthBalanced { color: var(--bzc-ink); }

.bzc-special { margin-top: 10px !important; font-size: 12.5px; color: var(--bzc-accent); line-height: 1.45; }

/* --- pasek żywiołów --- */

.bzc-bar {
  display: flex;
  height: 12px;
  overflow: hidden;
  border-radius: 100px;
  background: #fff;
  border: 1px solid var(--bzc-line);
  margin: 16px 0 18px;
}

.bzc-seg-bar { height: 100%; }

.bzc-legend-row {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: 9px;
  row-gap: 0;
  font-size: 14.5px;
  padding: 9px 0;
  border-top: 1px solid var(--bzc-line);
}

.bzc-legend-rel { grid-column: 2; }

.bzc-legend-row:first-child { border-top: 0; }
.bzc-dot { width: 14px; height: 14px; border-radius: 50%; display: block; }
.bzc-legend-name { font-weight: 700; }
.bzc-legend-rel { color: var(--bzc-muted); font-size: 13.5px; }
.bzc-legend-val { font-weight: 700; }

/* --- gwiazdy --- */

.bzc-star-group {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--bzc-muted);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--bzc-line);
  margin-top: 24px;
}

.bzc-star-group:first-of-type { margin-top: 16px; }

.bzc-stars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px 20px;
  margin-top: 14px;
}

.bzc-star-name { line-height: 1.3; }

.bzc-star dt { margin-bottom: 6px; }
.bzc-star-name { display: block; font-size: 15px; font-weight: 700; }
.bzc-star-hint { display: block; font-size: 12.5px; color: var(--bzc-muted); }
.bzc-star dd { display: flex; flex-wrap: wrap; gap: 6px; }

.bzc-branch-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 100px;
  border: 1px solid var(--bzc-line);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.bzc-branch-glyph { font-size: 16px; }

/* --- filary szczęścia --- */

.bzc-panel-luck { margin-bottom: 20px; }

.bzc-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.bzc-luck-meta { font-size: 13px; color: var(--bzc-muted); }

.bzc-luck {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 12px;
}

.bzc-luck-cell {
  background: #fff;
  border: 1px solid var(--bzc-line);
  border-radius: var(--bzc-radius);
  padding: 10px 6px;
  text-align: center;
  min-width: 0;
}

.bzc-luck-now { border-color: var(--bzc-accent); box-shadow: inset 0 0 0 1px var(--bzc-accent); }

.bzc-luck-age {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--bzc-muted);
}

.bzc-luck-now .bzc-luck-age { color: var(--bzc-accent); }
.bzc-luck-glyphs { font-size: 24px; font-weight: 700; line-height: 1.15; margin-top: 4px; }
.bzc-luck-glyphs span + span { margin-left: 2px; }
.bzc-luck-name { font-size: 11.5px; color: var(--bzc-muted); line-height: 1.3; }

.bzc-luck-hidden {
  margin: 5px 0 0;
  padding-top: 5px;
  border-top: 1px dashed var(--bzc-line);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.bzc-luck-hidden span + span { margin-left: 3px; }
.bzc-luck-years { font-size: 11px; color: var(--bzc-muted); margin-top: 2px; }

/* --- zajawka artykułu --- */

.bzc-article {
  margin-top: 24px;
  padding: 22px 24px;
  background: var(--bzc-cream);
  border: 1px solid var(--bzc-line);
  border-left: 4px solid var(--bzc-accent);
  border-radius: var(--bzc-radius);
}

.bzc-article-inline {
  margin-top: 20px;
  background: #fff;
  border-left-width: 1px;
  border-left-color: var(--bzc-line);
}

.bzc-article-inline .bzc-article-title { font-size: 18px; }

.bzc-article-title { font-family: var(--bzc-head); font-size: 21px; font-weight: 700; margin-top: 5px !important; }
.bzc-article-lead { margin-top: 10px !important; color: var(--bzc-muted); }

.bzc-article-cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
  padding: 12px 24px;
  background: var(--bzc-accent);
  color: #fff;
  text-decoration: none;
  border-radius: var(--bzc-radius);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bzc-article-cta:hover { filter: brightness(0.9); color: #fff; }

/* --- zastrzeżenia --- */

.bzc-notes {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--bzc-line);
  font-size: 13px;
  color: var(--bzc-muted);
}

.bzc-notes li + li { margin-top: 6px; }

/* ------------------------------------------------------------------ *
 * Kolory żywiołów
 * ------------------------------------------------------------------ */

.bzc-el-wood  { color: var(--bzc-wood); }
.bzc-el-fire  { color: var(--bzc-fire); }
.bzc-el-earth { color: var(--bzc-earth); }
.bzc-el-metal { color: var(--bzc-metal); }
.bzc-el-water { color: var(--bzc-water); }

.bzc-bg-wood  { background: var(--bzc-wood); }
.bzc-bg-fire  { background: var(--bzc-fire); }
.bzc-bg-earth { background: var(--bzc-earth); }
.bzc-bg-metal { background: var(--bzc-metal); }
.bzc-bg-water { background: var(--bzc-water); }

/* ------------------------------------------------------------------ *
 * Mniejsze ekrany
 * ------------------------------------------------------------------ */

@media (max-width: 700px) {
  .bzc-grid, .bzc-grid-lower { grid-template-columns: 1fr; }
  .bzc-legend-row { grid-template-columns: 14px 1fr auto; }
  .bzc-legend-rel { grid-column: 2 / -1; grid-row: 2; }
}

@media (max-width: 520px) {
  .bzc-pillars { grid-template-columns: repeat(2, 1fr); }
  .bzc-gods { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .bzc-luck { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .bzc-god-glyph { font-size: 22px; }
  .bzc-stars { grid-template-columns: 1fr; }
  .bzc-hidden { width: 92%; }
}

@media (prefers-reduced-motion: reduce) {
  .bzc * { animation: none !important; transition: none !important; }
}

@media (max-width: 640px) {
  .bzc-row { flex-wrap: wrap; }
  .bzc-row .bzc-field { flex: 1 1 100%; }
}

/* --- legenda znaków --- */

.bzc-panel-legend { margin-bottom: 20px; }

.bzc-legend-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 32px;
  margin-top: 16px;
  align-items: start;
}

.bzc-legend-head {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--bzc-muted);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--bzc-line);
  margin-bottom: 6px;
}

.bzc-legend-item {
  display: grid;
  grid-template-columns: 1.6rem 3.6rem 1fr;
  align-items: baseline;
  gap: 10px;
  padding: 4px 0;
  font-size: 14px;
}

.bzc-legend-glyph { font-size: 18px; font-weight: 700; line-height: 1.2; }
.bzc-legend-latin { font-weight: 700; }
.bzc-legend-mean { color: var(--bzc-muted); }

@media (max-width: 560px) {
  .bzc-legend-grid { grid-template-columns: 1fr; }
}
