/* Animations */
.result-reveal {
  animation: fadeInUp 0.35s ease both;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-head {
  margin-bottom: 1rem;
}

/* Lo Shu grid */
.grid-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-height: 72px;
  font-size: 1.4rem;
}
.cell-label-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 1px;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
}
.cell-label {
  flex: 1;
  font-size: 0.48rem;
  font-weight: 800;
  text-align: center;
  padding: 2px 1px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.4;
}
.label-d { background: #f97316; color: #fff; }
.label-c { background: #ec4899; color: #fff; }
.label-k { background: #22c55e; color: #fff; }
.grid-cell.cell-driver-only { background: #f97316; color: #fff; border-color: #ea580c; }
.grid-cell.cell-conductor-only { background: #ec4899; color: #fff; border-color: #db2777; }
.grid-cell.cell-kua-only { background: #22c55e; color: #fff; border-color: #16a34a; }
.grid-cell.cell-driver-conductor { background: linear-gradient(135deg, #f97316 50%, #ec4899 50%); color: #fff; border-color: #ea580c; }
.grid-cell.cell-driver-kua { background: linear-gradient(135deg, #f97316 50%, #22c55e 50%); color: #fff; border-color: #ea580c; }
.grid-cell.cell-conductor-kua { background: linear-gradient(135deg, #ec4899 50%, #22c55e 50%); color: #fff; border-color: #db2777; }
.grid-cell.cell-all-three { background: linear-gradient(135deg, #f97316 33%, #ec4899 66%, #22c55e 100%); color: #fff; border-color: #ea580c; }
.gender-btn.selected { border-color: #660066; background: #660066; color: #fff; }
.grid-cell.cell-missing { background: #f3f4f6; color: #d1d5db; border: 1.5px solid #e5e7eb; }
.grid-cell.cell-1x { background: #f9e6f9; color: #660066; border: 1.5px solid #e5b3e5; }
.grid-cell.cell-2x { background: #e5b3e5; color: #4d004d; border: 1.5px solid #cc66cc; font-size: 1.15rem; }
.grid-cell.cell-3x { background: #cc66cc; color: #330033; border: 1.5px solid #993399; font-size: 0.95rem; }
.grid-cell.cell-4x { background: #660066; color: #fff; border: 1.5px solid #4d004d; font-size: 0.8rem; }
.grid-cell.center-cell.cell-missing { border: 2px dashed #e5b3e5; background: #f9e6f9; color: #e5b3e5; }

/* Name numerology */
.word-block {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
}
.word-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #9ca3af;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.letter-table {
  width: 100%;
  border-collapse: collapse;
}
.letter-table td {
  padding: 0.35rem 0.5rem;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}
.system-cell {
  text-align: left !important;
  padding-right: 0.75rem !important;
  width: 28px;
}
.letter-cell {
  font-weight: 700;
  font-size: 1rem;
  color: #374151;
}
.val-cell.pyth { font-size: 0.85rem; font-weight: 600; color: #660066; }
.val-cell.chald { font-size: 0.85rem; font-weight: 600; color: #b45309; }
.total-header {
  font-size: 0.7rem;
  font-weight: 600;
  color: #9ca3af;
  border-left: 1px solid #e5e7eb;
  padding-left: 1rem !important;
}
.total-cell {
  font-weight: 700;
  font-size: 0.85rem;
  border-left: 1px solid #e5e7eb;
  padding-left: 1rem !important;
}
.total-cell.pyth { color: #660066; }
.total-cell.chald { color: #b45309; }
.system-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1;
}
.system-badge.pyth { background: #f9e6f9; color: #660066; }
.system-badge.chald { background: #fef3c7; color: #b45309; }
.meaning-card {
  flex: 1;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.25rem;
}
.meaning-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  margin-bottom: 0.5rem;
}
.meaning-badge.pyth { background: #f9e6f9; color: #660066; }
.meaning-badge.chald { background: #fef3c7; color: #b45309; }
.meaning-badge.master { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; margin-left: 4px; }
.meaning-number {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
}
.meaning-number.pyth { color: #660066; }
.meaning-number.chald { color: #b45309; }
.meaning-title {
  font-weight: 700;
  color: #1f2937;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
.meaning-desc {
  color: #6b7280;
  font-size: 0.875rem;
  line-height: 1.6;
}

body.embed-mode {
  background: transparent !important;
}
body.embed-mode #ad-header,
body.embed-mode #ad-inline,
body.embed-mode nav,
body.embed-mode footer,
body.embed-mode .embed-section,
body.embed-mode #seo-section,
body.embed-mode #hero-heading {
  display: none !important;
}
body.embed-mode section:first-of-type {
  padding-top: 0.5rem;
}
body.embed-mode #input-card {
  box-shadow: none !important;
  border: none !important;
  background: transparent !important;
}
body.embed-mode #input-card label {
  color: #fff !important;
}
body.embed-mode #input-card .text-gray-400 {
  color: rgba(255, 255, 255, 0.65) !important;
}
body.embed-mode .gender-btn {
  background: #fff !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  color: #660066 !important;
}
body.embed-mode .gender-btn.selected {
  background: #FFB540 !important;
  border-color: #FFB540 !important;
  color: #660066 !important;
}
body.embed-mode .section-head h2 { color: #fff !important; }
body.embed-mode .section-head p  { color: rgba(255,255,255,0.7) !important; }

@media (max-width: 640px) {
  .grid-cell { min-height: 60px; font-size: 1.1rem; }
  .grid-cell.cell-2x { font-size: 0.9rem; }
  .grid-cell.cell-3x { font-size: 0.75rem; }
  .grid-cell.cell-4x { font-size: 0.65rem; }
  .letter-table td { padding: 0.25rem 0.35rem; }
  .letter-cell { font-size: 0.85rem; }
  .meaning-number { font-size: 2rem; }
}
