?/* fases-da-lua/css/fases-da-lua.css */
/* CSS específico do calendário lunar (Atualizado com Grid Anual Completo e Containers Expandidos) */

/* ==========================================================================
   PÁGINA LUNAR HEADER
   ========================================================================== */
.lunar-container-large {
  width: 100%;
  max-width: 1250px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0;
  padding-right: 0;
  box-sizing: border-box;
}

.container.lunar-container-large {
  padding-left: 20px;
  padding-right: 20px;
}

.lunar-page .glass-header-wrapper {
  text-align: center;
  padding: 3px;
  background-color: transparent;
  box-sizing: border-box;
  overflow: visible;
}

.lunar-page .tool-page-header h1 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  color: var(--text-color);
  margin: 0 0 10px 0;
  font-weight: 700;
}

.lunar-page .tool-page-header p {
  font-size: 1rem;
  color: var(--secondary-color);
  margin: 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 769px) {
  /* Alinha o header glass com os blocos visuais largos do calendário lunar */
  .lunar-page .glass-header-wrapper.lunar-container-large {
    width: calc(100% + 40px);
    margin-left: -20px;
    margin-right: -20px;
    box-sizing: border-box;
  }
}

/* ==========================================================================
   NAVEGAÇÃO
   ========================================================================== */
/* NAVEGAÇÃO: Expanded width */
.lunar-nav-wrapper {
  max-width: 1250px; /* Aumentado 25% (de 1000px) */
  margin: 0 auto 30px auto;
  padding: 0 20px;
}

.lunar-nav-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.lunar-today-nav-controls {
  display: grid !important;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.lunar-today-nav-left {
  justify-self: start;
}

.lunar-today-nav-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.lunar-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.container.lunar-container-large > .nav-controls {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.lunar-day-nav-controls {
  display: grid !important;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

.lunar-day-nav-left {
  justify-self: start;
}

.lunar-day-nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.lunar-day-picker-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  background: var(--content-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 8px 10px;
}

.lunar-day-picker-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--secondary-color);
  line-height: 1;
}

.lunar-day-picker {
  border: 0;
  background: transparent;
  color: var(--text-color);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0;
  outline: none;
}

body.dark-mode .lunar-day-picker-wrap {
  background: #1c1c1e;
  border-color: #3d4655;
}

@media (max-width: 768px) {
  .lunar-today-nav-controls {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
  }

  .lunar-today-nav-left {
    width: 100%;
  }

  .lunar-today-nav-center {
    width: 100%;
    justify-content: center;
  }

  .lunar-day-nav-controls {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
  }

  .lunar-day-nav-left,
  .lunar-day-nav-right {
    width: 100%;
  }

  .lunar-day-nav-right {
    justify-content: center;
  }
}

.lunar-nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background-color: var(--content-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 600;
  transition: all 0.2s;
}

.lunar-nav-btn:hover {
  background-color: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

body.dark-mode .lunar-nav-btn {
  background-color: #1c1c1e;
  border-color: #38383a;
}

.lunar-year-display {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-color);
  min-width: 100px;
  text-align: center;
}

.lunar-month-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.lunar-month-display .month-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-color);
}

.lunar-month-display .year-link {
  font-size: 0.9rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.lunar-month-display .year-link:hover {
  text-decoration: underline;
}

.lunar-nav-utility {
  display: flex;
  gap: 10px;
  margin-left: 20px;
}

.lunar-icon-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--content-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--secondary-color);
  cursor: pointer;
  transition: all 0.2s;
}

.lunar-icon-btn:hover {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

body.dark-mode .lunar-icon-btn {
  background: #1c1c1e;
  border-color: #38383a;
}

/* ==========================================================================
   DASHBOARD HERO
   ========================================================================== */
.lunar-dashboard-wrapper {
  max-width: 1250px; /* Aumentado 25% (de 1000px) */
  margin: 0 auto 40px auto;
  padding: 0 20px;
}

.lunar-dashboard {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 25px;
  align-items: stretch;
}

.lunar-main-panel,
.lunar-sidebar-panel {
  display: flex;
  align-items: stretch;
  align-self: stretch;
}

.lunar-main-panel .lunar-today-card,
.lunar-sidebar-panel .lunar-sidebar-card {
  flex: 1;
}

@media (max-width: 768px) {
  .lunar-dashboard {
    grid-template-columns: 1fr;
  }
}

.lunar-today-card {
  flex: 1;
  background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
  color: #fff;
  border-radius: 24px;
  padding: 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 15px 40px rgba(26, 35, 126, 0.3);
  min-height: 280px;
  /* Interaction Styles Moved Here */
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.lunar-today-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(26, 35, 126, 0.42);
}

/* Add subtle lift effect on hover */
.lunar-today-card:active {
  transform: translateY(0);
}

.lunar-moon-icon {
  font-size: 5rem;
  display: block;
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
  animation: lunarPulse 4s ease-in-out infinite;
  margin-bottom: 20px;
}

@keyframes lunarPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.lunar-today-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.lunar-month-title-display {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 0 0 25px 0;
  text-transform: capitalize;
}

/* Override para remover aparência de botão do year-selector-container */
.year-selector-container {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  min-width: auto !important;
  height: auto !important;
}

.year-selector-container:hover {
  border: none !important;
  box-shadow: none !important;
}

/* Título dentro do grid do calendário */
.lunar-full-calendar .lunar-calendar-title {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
  padding: 15px 0 14px;
  margin: 0 0 12px 0;
  border-bottom: 1px solid #d8e1ef;
  font-family: "Poppins", "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0.01em;
}

body.dark-mode .lunar-full-calendar .lunar-calendar-title {
  border-bottom-color: #3a4558;
}

.lunar-full-calendar .lunar-calendar-title .title-month {
  font-weight: 700;
}

.lunar-full-calendar .lunar-calendar-title .title-separator {
  margin: 0 10px;
  opacity: 0.65;
  font-weight: 500;
}

.lunar-full-calendar .lunar-calendar-title .title-year {
  font-weight: 800;
  color: var(--primary-color);
}

.lunar-today-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.8;
}

.lunar-today-date {
  font-size: 1rem;
  opacity: 0.9;
}

.lunar-today-phase {
  font-size: 1.6rem;
  font-weight: 700;
  margin-top: 5px;
}

.lunar-daily-today-card {
  gap: 12px;
  padding-top: 28px;
  padding-bottom: 28px;
}

.lunar-daily-big-date {
  display: block;
  width: 100%;
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  line-height: 1.2;
  font-weight: 800;
  text-align: center;
}

.lunar-daily-phase {
  display: block;
  font-size: clamp(1.35rem, 2.6vw, 1.95rem);
  line-height: 1.2;
  font-weight: 700;
  text-align: center;
}

.lunar-sidebar-card {
  flex: 1;
  background: var(--content-bg);
  border: 1px solid #cfd9ea;
  border-radius: 20px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 8px 22px rgba(44, 59, 93, 0.08);
}

body.dark-mode .lunar-sidebar-card {
  background: #1c1c1e;
  border-color: #3f495a;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.lunar-location {
  font-size: 0.85rem;
  color: var(--secondary-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.lunar-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.lunar-stat-box {
  background: #f1f6ff;
  border: 1px solid #d3def3;
  box-shadow: 0 2px 8px rgba(57, 73, 171, 0.08);
  border-radius: 12px;
  padding: 15px;
  text-align: center;
}

body.dark-mode .lunar-stat-box {
  background: #2c2c2e;
  border-color: #3f4a5e;
  box-shadow: none;
}

.lunar-stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--secondary-color);
  display: block;
  margin-bottom: 4px;
}

.lunar-stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-color);
  display: block;
}

.lunar-phase-desc {
  background: #f3f7ff;
  border: 1px solid #d6e1f4;
  border-radius: 12px;
  padding: 15px;
}

body.dark-mode .lunar-phase-desc {
  background: #2c2c2e;
  border-color: #3f4a5e;
}

.lunar-phase-desc strong {
  display: block;
  color: var(--text-color);
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.lunar-phase-desc p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--secondary-color);
  line-height: 1.5;
}

/* ==========================================================================
   HERO UNIFICADO (rápido/informativo)
   ========================================================================== */
.lunar-unified-hero-wrap {
  margin-bottom: 28px;
}

.lunar-hero-unified {
  border-radius: 22px;
  padding: 18px;
}

.lunar-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}

.lunar-hero-left,
.lunar-hero-right {
  min-width: 0;
}

.lunar-hero-left {
  grid-column: 1;
  grid-row: 1;
  align-self: stretch;
}

.lunar-hero-visual-card {
  min-height: 0;
  height: auto;
  padding: 20px 20px 18px;
  justify-content: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  cursor: default;
}

.lunar-hero-visual-card .lunar-daily-big-date {
  max-width: 18ch;
  line-height: 1.15;
  margin-bottom: 2px;
}

.lunar-hero-visual-card .lunar-today-info {
  gap: 4px;
}

.lunar-hero-visual-card .lunar-today-date {
  max-width: 32ch;
  line-height: 1.45;
  font-size: 0.9rem;
}

.lunar-hero-meteor-shower {
  display: none !important;
}

/* Meteors */
.lunar-hero-meteor-shower .ms-1 {
  opacity: 0;
}

.lunar-hero-meteor-shower .ms-2 {
  opacity: 0;
}

/* Glass Break Strike */
.lunar-hero-meteor-shower .ms-strike {
  opacity: 0;
}

.lunar-hero-meteor-shower .ms-glass-crack {
  opacity: 0;
}

/* Smooth Moon Interaction */
.lunar-hero-visual-card {
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.6s ease;
}

.lunar-hero-visual-card > * {
  position: relative;
  z-index: 2;
}

.lunar-hero-visual-card .lunar-moon-visual {
  position: relative;
  z-index: 4;
  display: grid;
  place-items: center;
  transform: translateY(0);
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.lunar-hero-visual-card .lunar-moon-icon {
  font-size: clamp(3.8rem, 5.2vw, 4.8rem);
  margin-bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 10px 18px rgba(4, 13, 38, 0.22));
  transition: none;
  animation: moonBreathPulse 6.2s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.lunar-hero-month-moons {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
  margin-top: 6px;
}

.lunar-hero-month-moon {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 2px;
  min-width: 0;
}

.lunar-hero-month-moon .moon-icon {
  font-size: clamp(1.95rem, 2.4vw, 2.45rem);
  line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(4, 13, 38, 0.2));
  margin-bottom: 6px;
}

.lunar-hero-month-moon .moon-phase {
  font-size: 0.72rem;
  line-height: 1.15;
  color: #fff;
  font-weight: 700;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
  overflow-wrap: anywhere;
}

.lunar-hero-month-moon .moon-date {
  font-size: 0.68rem;
  line-height: 1.15;
  color: #fff;
  font-weight: 600;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
  overflow-wrap: anywhere;
}

@keyframes moonBreathPulse {
  0%, 100% { transform: translateY(0) scale(0.992) rotate(-0.35deg); }
  35% { transform: translateY(-1px) scale(1.006) rotate(0.15deg); }
  65% { transform: translateY(-2px) scale(1.014) rotate(0.32deg); }
}

/* The Hover Effect - Slow and Smooth Upward Translate */
.lunar-hero-visual-card:hover .lunar-moon-visual {
  transform: translateY(-8px);
}

.lunar-hero-unified .clickable-hero:hover,
.lunar-hero-unified .clickable-hero:focus,
.lunar-hero-unified .lunar-hero-visual-card:hover {
  transform: none !important;
}

.lunar-hero-right { display: contents; }

.lunar-hero-section {
  background: #f6f9ff;
  border: 1px solid #d6e1f4;
  border-radius: 14px;
  padding: 14px;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.lunar-hero-section--full {
  grid-column: 1 / -1;
  grid-row: 2;
}

.lunar-hero-section--full .lunar-stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.lunar-hero-section--full .lunar-stat-box {
  padding: 12px 10px;
}

body.dark-mode .lunar-hero-section {
  background: #2c2c2e;
  border-color: #3f4a5e;
}

.lunar-hero-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.lunar-hero-section-title {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--secondary-color);
}

.lunar-hero-empty {
  margin: 0;
  color: var(--secondary-color);
  font-size: 0.9rem;
}

.lunar-hero-region-picker {
  display: grid;
  gap: 4px;
}

.lunar-hero-region-picker .lunar-day-picker {
  width: 100%;
}

.lunar-hero-phase-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.lunar-hero-section--month-summary {
  display: grid;
  grid-template-rows: auto 1fr;
  grid-column: 2;
  grid-row: 1;
}

.lunar-hero-right > .lunar-hero-section:not(.lunar-hero-section--full):first-child {
  grid-column: 2;
  grid-row: 1;
}

.lunar-hero-section--month-summary .lunar-hero-phase-grid {
  align-content: start;
}

.lunar-hero-phase-card {
  background: var(--content-bg);
  border: 1px solid #d8e2f3;
  border-radius: 12px;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
  min-width: 0;
}

body.dark-mode .lunar-hero-phase-card {
  background: #1c1c1e;
  border-color: #3f4a5e;
}

.phase-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.phase-card-top strong {
  font-size: 0.9rem;
  color: var(--text-color);
  min-width: 0;
  overflow-wrap: anywhere;
}

.phase-card-icon {
  font-size: 1.05rem;
  line-height: 1;
  flex: 0 0 auto;
}

.phase-card-row {
  font-size: 0.85rem;
  color: var(--text-color);
  min-width: 0;
  overflow-wrap: anywhere;
}

.phase-card-time {
  color: var(--secondary-color);
}

.lunar-hero-phase-card--hint {
  background: linear-gradient(180deg, rgba(255,255,255,0.75), rgba(245,249,255,0.95));
}

body.dark-mode .lunar-hero-phase-card--hint {
  background: linear-gradient(180deg, rgba(38,40,44,0.95), rgba(28,30,34,0.98));
}

.lunar-hero-phase-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  align-content: start;
}

.lunar-hero-phase-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
}

.lunar-hero-phase-list .p-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.lunar-hero-phase-list .p-content {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.lunar-hero-phase-list .p-content strong {
  font-size: 0.92rem;
  color: var(--text-color);
}

.lunar-hero-phase-list .p-content span {
  font-size: 0.82rem;
  color: var(--secondary-color);
  overflow-wrap: anywhere;
}

.lunar-hero-phase-list .p-content em {
  font-style: normal;
  color: var(--primary-color);
}

.lunar-hero-micro-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.lunar-hero-micro-grid--compact {
  gap: 8px;
}

.lunar-hero-micro-card {
  background: var(--content-bg);
  border: 1px solid #d8e2f3;
  border-radius: 12px;
  padding: 10px 11px;
  display: grid;
  gap: 2px;
  align-content: start;
  min-width: 0;
}

.lunar-hero-micro-card--wide {
  grid-column: 1 / -1;
}

body.dark-mode .lunar-hero-micro-card {
  background: #1c1c1e;
  border-color: #3f4a5e;
}

.lunar-hero-micro-card .m-label {
  font-size: 0.72rem;
  color: var(--secondary-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lunar-hero-micro-card .m-value {
  font-size: 0.95rem;
  color: var(--text-color);
  line-height: 1.25;
  min-width: 0;
  overflow-wrap: anywhere;
}

.lunar-hero-micro-card .m-value--small {
  font-size: 0.86rem;
}

.lunar-hero-micro-card .m-sub {
  font-size: 0.78rem;
  color: var(--secondary-color);
  line-height: 1.25;
  min-width: 0;
  overflow-wrap: anywhere;
}

.lunar-hero-annual-table-wrap {
  overflow: hidden;
  width: 100%;
}

.lunar-hero-annual-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 0;
  table-layout: fixed;
}

.lunar-hero-annual-table th,
.lunar-hero-annual-table td {
  text-align: left;
  padding: 10px 8px; /* Increased padding */
  border-bottom: 1px solid #dbe5f5;
  font-size: 0.9rem; /* Increased font size */
  color: var(--text-color);
  vertical-align: middle; /* Changed to middle for better visual alignment */
}

body.dark-mode .lunar-hero-annual-table th,
body.dark-mode .lunar-hero-annual-table td {
  border-bottom-color: #3f4a5e;
}

.lunar-hero-annual-table th {
  font-size: 0.75rem; /* Increased font size */
  color: var(--secondary-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lunar-hero-annual-table th:first-child,
.lunar-hero-annual-table td:first-child {
  width: 16%;
}

.lunar-hero-section--year-table {
  grid-column: 1 / -1;
  grid-row: 2;
}

.lunar-hero-section--year-list {
  grid-column: 2;
  grid-row: 1;
  align-self: stretch;
}

.lunar-hero-unified--year .lunar-hero-left,
.lunar-hero-unified--month .lunar-hero-left {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.lunar-hero-unified--year .lunar-hero-left {
  display: flex;
  flex-direction: column;
  grid-column: 1;
  grid-row: 1;
  gap: 12px;
  height: 100%;
  align-self: stretch;
  min-height: 0;
}

.lunar-hero-unified--year .lunar-hero-visual-card,
.lunar-hero-unified--month .lunar-hero-visual-card {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.lunar-hero-unified--year .lunar-hero-inner {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "year-main year-upcoming"
    "year-table year-table";
  row-gap: 42px;
  column-gap: 18px;
}

.lunar-hero-unified--year .lunar-hero-left {
  grid-area: year-main;
}

.lunar-hero-unified--year .lunar-hero-section--year-list {
  grid-area: year-upcoming;
}

.lunar-hero-unified--year .lunar-hero-section--year-table {
  grid-area: year-table;
}

.lunar-hero-unified--year .lunar-hero-section--year-table .lunar-hero-annual-table th,
.lunar-hero-unified--year .lunar-hero-section--year-table .lunar-hero-annual-table td {
  padding: 10px 8px;
  font-size: 0.9rem;
}

.lunar-hero-unified--year .lunar-hero-section--year-table .lunar-hero-annual-table th {
  font-size: 0.75rem;
}

.lunar-hero-unified--year .lunar-hero-section--year-table .lunar-hero-annual-table th:first-child,
.lunar-hero-unified--year .lunar-hero-section--year-table .lunar-hero-annual-table td:first-child {
  width: 10%;
}

.lunar-hero-unified--year .lunar-hero-section--year-table .c-icon {
  font-size: 1.1rem;
}

.lunar-hero-unified--year .lunar-hero-section--year-table .c-date {
  font-size: 0.9rem;
}

.lunar-hero-unified--year .lunar-hero-section--year-table .c-time {
  display: none;
}

.lunar-hero-annual-row {
  cursor: pointer;
}

.lunar-hero-annual-row:hover td,
.lunar-hero-annual-row:focus td {
  background: rgba(34, 116, 255, 0.05);
}

body.dark-mode .lunar-hero-annual-row:hover td,
body.dark-mode .lunar-hero-annual-row:focus td {
  background: rgba(120, 164, 255, 0.08);
}

.lunar-hero-annual-month-link {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 700;
}

.lunar-hero-annual-month-link .month-year-short,
.lunar-hero-annual-cell .c-date--short {
  display: none;
}

.lunar-hero-annual-month-link:hover {
  text-decoration: underline;
}

.lunar-hero-annual-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.15;
}

.lunar-hero-annual-cell--empty {
  display: inline-block;
  color: var(--secondary-color);
}

.lunar-hero-annual-cell .c-icon {
  line-height: 1;
  font-size: 1.1rem;
}

.lunar-hero-annual-cell .c-date {
  font-size: 0.9rem;
  color: var(--text-color);
}

.lunar-hero-annual-cell .c-time {
  font-size: 0.8rem;
  color: var(--secondary-color);
}

.lunar-hero-annual-table th.ycol-new,
.lunar-hero-annual-table th.ycol-first,
.lunar-hero-annual-table th.ycol-full,
.lunar-hero-annual-table th.ycol-last,
.lunar-hero-annual-table td.ycol-new,
.lunar-hero-annual-table td.ycol-first,
.lunar-hero-annual-table td.ycol-full,
.lunar-hero-annual-table td.ycol-last {
  text-align: center;
}

.lunar-hero-annual-table td.ycol-new .lunar-hero-annual-cell,
.lunar-hero-annual-table td.ycol-first .lunar-hero-annual-cell,
.lunar-hero-annual-table td.ycol-full .lunar-hero-annual-cell,
.lunar-hero-annual-table td.ycol-last .lunar-hero-annual-cell {
  justify-content: center;
}

.lunar-hero-unified--year .lunar-hero-visual-card .lunar-daily-big-date {
  white-space: normal;
  max-width: 16ch;
  font-size: clamp(1.25rem, 1.45vw, 1.65rem);
}

.lunar-hero-unified--month .lunar-hero-visual-card .lunar-daily-big-date {
  max-width: 18ch;
  font-size: clamp(1.35rem, 1.55vw, 1.85rem);
}

.lunar-hero-unified--month .lunar-hero-visual-card .lunar-daily-phase {
  font-size: 1rem;
}

.lunar-hero-unified--month .lunar-hero-visual-card {
  justify-content: flex-start;
  padding: 12px 16px 14px;
}

.lunar-hero-unified--month .lunar-hero-visual-card .lunar-today-info {
  gap: 6px;
  height: 100%;
  justify-content: flex-start;
}

.lunar-hero-unified--month .lunar-hero-month-moons {
  margin-top: auto;
  padding-top: 10px;
}

.lunar-hero-unified--year .lunar-hero-visual-card .lunar-today-label {
  font-size: 0.88rem;
}

.lunar-hero-unified--year .lunar-hero-visual-card .lunar-daily-phase {
  font-size: 0.95rem;
}

.lunar-hero-unified--year .lunar-hero-visual-card {
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  padding: 14px 16px 12px;
}

.lunar-hero-unified--year .lunar-hero-left > .lunar-today-card.lunar-hero-visual-card {
  min-height: 100%;
  align-self: stretch;
}

.lunar-hero-unified--year .lunar-hero-visual-card .lunar-today-info {
  gap: 3px;
}

.lunar-hero-unified--year .lunar-hero-visual-card .lunar-moon-icon {
  font-size: clamp(2.85rem, 3.45vw, 3.45rem);
  margin-bottom: 8px;
}

.lunar-hero-unified--year .lunar-hero-visual-card .lunar-today-label,
.lunar-hero-unified--year .lunar-hero-visual-card .lunar-today-date {
  font-size: 0.82rem;
}

.lunar-hero-unified--year .lunar-hero-section--year-list {
  padding: 14px;
  align-self: stretch;
  height: 100%;
  min-height: 0;
  align-content: start;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.lunar-hero-unified--year .lunar-hero-phase-list {
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.lunar-hero-unified--year .lunar-hero-phase-list .p-content strong {
  font-size: 0.88rem;
  line-height: 1.2;
}

.lunar-hero-unified--year .lunar-hero-phase-list .p-content span {
  font-size: 0.78rem;
  line-height: 1.2;
}

.lunar-hero-unified--year .lunar-hero-section--year-list .lunar-hero-section-head {
  gap: 10px;
  margin-bottom: 4px;
}

.lunar-hero-unified--year .lunar-hero-section--year-list .lunar-hero-section-title {
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

.lunar-hero-unified--year .lunar-hero-phase-list li {
  gap: 8px;
}

.lunar-hero-unified--year .lunar-hero-phase-list .p-icon {
  font-size: 0.96rem;
  margin-top: 1px;
}

.lunar-hero-unified--year .lunar-hero-phase-list .p-content {
  gap: 2px;
}

.lunar-hero-unified--month .lunar-hero-visual-card .lunar-today-date,
.lunar-hero-unified--year .lunar-hero-visual-card .lunar-today-date {
  font-size: 0.95rem;
}

.lunar-hero-unified--year .lunar-hero-visual-card .lunar-today-date {
  font-size: 0.82rem;
  line-height: 1.25;
}

.lunar-lh-desktop-only {
  display: block;
}

@keyframes lunarHeroMoonDrift {
  0%, 100% {
    transform: translateY(0) rotate(-0.4deg);
  }
  50% {
    transform: translateY(-2px) rotate(0.4deg);
  }
}

@keyframes lunarHeroMoonFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@keyframes meteorShower1 {
  0%, 15%, 100% {
    opacity: 0;
    transform: translate3d(40px, -40px, 0);
  }
  16% {
    opacity: 1;
    transform: translate3d(-100px, 100px, 0);
  }
}

@keyframes meteorShower2 {
  0%, 15%, 100% {
    opacity: 0;
    transform: translate3d(60px, -20px, 0) scale(0.6);
  }
  16% {
    opacity: 0.8;
    transform: translate3d(-80px, 120px, 0) scale(0.6);
  }
}

@keyframes meteorStrike {
  0%, 5%, 100% {
    opacity: 0;
    transform: translate3d(50px, -50px, 0) scale(1.5);
  }
  5.5% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1.5);
  }
  6% {
    opacity: 0;
    transform: translate3d(-20px, 20px, 0) scale(1.5);
  }
}

@keyframes glassCrack {
  0%, 5.4% {
    opacity: 0;
    transform: scale(0.8) translate(10px, -10px);
  }
  5.5% {
    opacity: 0.9;
    transform: scale(1) translate(0, 0);
  }
  10% {
    opacity: 0.9;
    transform: scale(1) translate(0, 0);
  }
  12%, 100% {
    opacity: 0;
    transform: scale(1) translate(0, 0);
  }
}

@media (max-width: 900px) {
  .lunar-hero-inner {
    grid-template-columns: 1fr;
  }

  .lunar-hero-unified--year .lunar-hero-left {
    display: flex;
    grid-area: auto;
    grid-row: auto;
    height: auto;
    gap: 0;
  }

  .lunar-hero-right {
    display: contents;
  }

  .lunar-hero-section--full {
    grid-column: auto;
  }

  .lunar-hero-section--month-summary,
  .lunar-hero-section--year-list,
  .lunar-hero-section--year-table {
    grid-area: auto;
    grid-column: auto;
    grid-row: auto;
  }

  .lunar-hero-section--full .lunar-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lunar-hero-unified--year .lunar-hero-visual-card .lunar-daily-big-date {
    white-space: normal;
  }

  .lunar-hero-month-moons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
  }
}

@media (max-width: 768px) {
  .lunar-hero-unified {
    padding: 14px;
  }

  .lunar-hero-phase-grid {
    grid-template-columns: 1fr;
  }

  .lunar-hero-micro-grid {
    grid-template-columns: 1fr;
  }

  .lunar-hero-section--full .lunar-stats-grid {
    grid-template-columns: 1fr;
  }

  .lunar-hero-visual-card .lunar-moon-visual {
    transition-duration: 200ms;
  }

  .lunar-hero-visual-card .lunar-moon-icon {
    animation-duration: 8.8s;
  }

  .lunar-hero-meteor {
    width: 68px;
    right: -6px;
  }

  .lunar-hero-micro-card--wide {
    grid-column: auto;
  }

  .lunar-hero-annual-table th,
  .lunar-hero-annual-table td {
    padding: 6px 6px;
    font-size: 0.72rem;
  }

  .lunar-hero-unified--year .lunar-hero-section--year-table .ycol-first,
  .lunar-hero-unified--year .lunar-hero-section--year-table .ycol-last {
    display: none;
  }

  .lunar-hero-unified--year .lunar-hero-section--year-table th.ycol-month,
  .lunar-hero-unified--year .lunar-hero-section--year-table td.ycol-month {
    width: 24%;
  }

  .lunar-hero-unified--year .lunar-hero-section--year-table th.ycol-month,
  .lunar-hero-unified--year .lunar-hero-section--year-table td.ycol-month,
  .lunar-hero-unified--year .lunar-hero-section--year-table th.ycol-new,
  .lunar-hero-unified--year .lunar-hero-section--year-table td.ycol-new,
  .lunar-hero-unified--year .lunar-hero-section--year-table th.ycol-full,
  .lunar-hero-unified--year .lunar-hero-section--year-table td.ycol-full {
    text-align: center;
  }

  .lunar-hero-unified--year .lunar-hero-section--year-table .ycol-month .month-year-full {
    display: none;
  }

  .lunar-hero-unified--year .lunar-hero-section--year-table .ycol-month .month-year-short {
    display: inline;
  }

  .lunar-hero-unified--year .lunar-hero-section--year-table .lunar-hero-annual-cell {
    gap: 4px;
    justify-content: center;
    align-items: center;
  }

  .lunar-hero-unified--year .lunar-hero-section--year-table .lunar-hero-annual-cell .c-date--full {
    display: none;
  }

  .lunar-hero-unified--year .lunar-hero-section--year-table .lunar-hero-annual-cell .c-date--short {
    display: inline;
    font-size: 0.72rem;
  }

  .lunar-hero-unified--year .lunar-hero-section--year-table .lunar-hero-annual-cell .c-icon {
    display: inline;
    font-size: 0.86rem;
    line-height: 1;
  }

  .lunar-hero-unified--year .lunar-hero-section--year-table .lunar-hero-section-title {
    font-size: 0.78rem;
    letter-spacing: 0.04em;
  }

  .lunar-lh-desktop-only {
    display: none !important;
  }
}

.lunar-next-phase {
  border-top: 1px solid var(--border-color);
  padding-top: 15px;
}

body.dark-mode .lunar-next-phase {
  border-top-color: #38383a;
}

.lunar-next-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--secondary-color);
  display: block;
  margin-bottom: 8px;
}

.lunar-next-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lunar-next-icon {
  font-size: 1.8rem;
}

.lunar-next-details {
  display: flex;
  flex-direction: column;
}

.lunar-next-details strong {
  color: var(--text-color);
  font-size: 0.95rem;
}

.lunar-next-details span {
  color: var(--secondary-color);
  font-size: 0.85rem;
}

/* ==========================================================================
   GRID ANUAL DE MESES (12 MINI CALENDÁRIOS)
   ========================================================================== */
.lunar-months-wrapper {
  max-width: 1250px;
  margin: 0 auto 40px auto;
  padding: 0 20px;
}

.lunar-months-grid {
  display: grid;
  /* 2 colunas padrão desktop */
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
}

@media (min-width: 1100px) {
  /* Ajustado breakpoint para largura maior */
  .lunar-months-grid {
    /* Layout 2x6 solicitado: 2 colunas para cards maiores */
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 899px) {
  .lunar-months-grid {
    grid-template-columns: 1fr;
    /* 1 coluna em tablet/mobile para manter tamanho */
  }
}

/* Card do Mês Mini */
.lunar-year-view-month {
  display: block;
  /* Link block */
  cursor: pointer;
  background: linear-gradient(160deg, #ffffff 0%, #f3f6fb 100%);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 12px 14px;
  text-decoration: none;
  transition: all 0.3s ease;
  overflow: visible;
}

.lunar-year-view-month:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 32px rgba(26, 35, 126, 0.14);
  border-color: #c6d3ea;
}

body.dark-mode .lunar-year-view-month {
  background: linear-gradient(160deg, #1c1c1e 0%, #232328 100%);
  border-color: #38383a;
}

.lunar-mini-month-title {
  margin: 0 0 10px 0;
  font-size: 1rem;
  color: var(--text-color);
  text-align: center;
  font-weight: 700;
}

.lunar-mini-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.lunar-mini-header {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--secondary-color);
  text-align: center;
  padding: 2px 0;
}

.lunar-mini-header .wd-mobile,
.lunar-mini-weekdays .wd-mobile,
.lunar-cal-weekday .wd-mobile {
  display: none;
}

.lunar-mini-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  padding: 2px;
  border-radius: 6px;
  font-size: 0.75rem;
  transition: all 0.2s;
}

.lunar-mini-cell:not(.empty):hover {
  background: var(--light-bg);
}

.lunar-mini-cell.today {
  background: var(--primary-color);
  color: #fff;
}

.lunar-mini-cell.has-phase {
  font-weight: 700;
}

.lunar-mini-cell .day-num {
  font-size: 0.7rem;
  line-height: 1;
}

.lunar-mini-cell .phase-icon {
  font-size: 0.7rem;
  line-height: 1;
}

.lunar-mini-header h3 {
  margin: 0 0 10px 0;
  font-size: 1.1rem;
  color: var(--primary-color);
  text-align: center;
  text-transform: none;
  font-weight: 700;
  font-family: "Poppins", "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0.01em;
}

.lunar-year-view-month .lunar-mini-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #d8e1ef;
}

body.dark-mode .lunar-year-view-month .lunar-mini-header {
  border-bottom-color: #3a4558;
}

.lunar-year-view-month .lunar-mini-header h3 .title-month {
  font-weight: 700;
}

.lunar-year-view-month .lunar-mini-header h3 .title-separator {
  margin: 0 8px;
  opacity: 0.65;
  font-weight: 500;
}

.lunar-year-view-month .lunar-mini-header h3 .title-year {
  font-weight: 800;
  color: var(--primary-color);
}

.lunar-year-view-month .lunar-mini-header h3 {
  margin: 0;
  text-align: left;
  font-size: 1rem;
  min-width: 0;
}

.lunar-mini-open-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(0, 113, 227, 0.22);
  background: rgba(0, 113, 227, 0.08);
  color: var(--primary-color);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  flex: 0 0 auto;
}

body.dark-mode .lunar-mini-open-cta {
  border-color: rgba(120, 164, 255, 0.28);
  background: rgba(120, 164, 255, 0.12);
  color: #b7d2ff;
}

/* Grid Weekdays */
.lunar-mini-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin-bottom: 5px;
}

.lunar-mini-weekdays span {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--secondary-color);
}

.lunar-mini-weekdays span.weekend {
  color: var(--secondary-color);
  opacity: 1;
  background: transparent;
  border: none;
  border-radius: 0;
}

/* Grid Days */
.lunar-mini-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.lunar-mini-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  aspect-ratio: 1 / 1.1;
  padding: 2px;
  border-radius: 7px;
  border: 1px solid #dfe5ee;
  background: linear-gradient(180deg, #f8fafd 0%, #edf2f8 100%);
  min-height: 0;
  cursor: default;
  transition:
    border-color 0.22s ease,
    background 0.22s ease;
}

body.dark-mode .lunar-mini-day {
  background: #2c2c2e;
  border-color: #3d3d42;
}

body.dark-mode .lunar-mini-weekdays span.weekend {
  color: var(--secondary-color);
  background: transparent;
  border: none;
}

@media (max-width: 768px) {
  .lunar-mini-header .wd-desktop,
  .lunar-mini-weekdays .wd-desktop,
  .lunar-cal-weekday .wd-desktop {
    display: none;
  }

  .lunar-mini-header .wd-mobile,
  .lunar-mini-weekdays .wd-mobile,
  .lunar-cal-weekday .wd-mobile {
    display: inline;
  }
}

.lunar-mini-day.empty {
  background: transparent;
  border-color: transparent;
  cursor: default;
}

.lunar-mini-days > .lunar-mini-day.empty:nth-child(7n + 1),
.lunar-mini-days > .lunar-mini-day.empty:nth-child(7n) {
  background: #dbe1ea !important;
  border-color: #aab6c8 !important;
}

body.dark-mode .lunar-mini-days > .lunar-mini-day.empty:nth-child(7n + 1),
body.dark-mode .lunar-mini-days > .lunar-mini-day.empty:nth-child(7n) {
  background: #3a414d !important;
  border-color: #5f6a7d !important;
}

.lunar-mini-day.today {
  background: rgba(0, 113, 227, 0.15);
  border: 1px solid var(--primary-color);
}

.lunar-mini-day.today.weekend {
  background: #edf0f3;
}

body.dark-mode .lunar-mini-day.today.weekend {
  background: #303036;
}

.lunar-mini-day.weekend {
  background: #dbe1ea;
}

body.dark-mode .lunar-mini-day.weekend {
  background: #3a414d;
}

.lunar-mini-day.has-phase {
  background: var(--light-bg);
}

/* Highlight Phases Backgrounds */
.lunar-mini-day.phase-nova {
  background: rgba(66, 66, 66, 0.08);
}

.lunar-mini-day.phase-crescente {
  background: rgba(255, 193, 7, 0.15);
}

.lunar-mini-day.phase-cheia {
  background: rgba(255, 235, 59, 0.2);
}

.lunar-mini-day.phase-minguante {
  background: rgba(158, 158, 158, 0.1);
}

.lunar-mini-day.weekend.phase-nova,
.lunar-mini-day.weekend.phase-crescente,
.lunar-mini-day.weekend.phase-cheia,
.lunar-mini-day.weekend.phase-minguante,
.lunar-mini-day.weekend.has-phase {
  background: #edf0f3;
}

body.dark-mode .lunar-mini-day.weekend.phase-nova,
body.dark-mode .lunar-mini-day.weekend.phase-crescente,
body.dark-mode .lunar-mini-day.weekend.phase-cheia,
body.dark-mode .lunar-mini-day.weekend.phase-minguante,
body.dark-mode .lunar-mini-day.weekend.has-phase {
  background: #303036;
}

.lunar-mini-day .d {
  font-size: 0.85rem;
  color: var(--text-color);
  font-weight: 500;
  line-height: 1;
  margin-top: 2px;
}

.lunar-mini-day.weekend .d {
  color: #202020;
}

body.dark-mode .lunar-mini-day.weekend .d {
  color: #f3f5f9;
}

/* Reinforca visual de coluna (domingo/sabado) no modo ANO */
.lunar-mini-days > .lunar-mini-day:nth-child(7n + 1),
.lunar-mini-days > .lunar-mini-day:nth-child(7n) {
  background: #dbe1ea !important;
  border-color: #aab6c8 !important;
}

body.dark-mode .lunar-mini-days > .lunar-mini-day:nth-child(7n + 1),
body.dark-mode .lunar-mini-days > .lunar-mini-day:nth-child(7n) {
  background: #3a414d !important;
  border-color: #5f6a7d !important;
}

.lunar-mini-day .p {
  font-size: 1rem;
  margin-top: auto;
  margin-bottom: 2px;
  transition: none;
}

.lunar-mini-day.lunar-hoverable:hover {
  transform: none;
  box-shadow: none;
  border-color: #dfe5ee;
}

.lunar-mini-day.lunar-hoverable:hover .p {
  transform: none;
  filter: none;
}

body.dark-mode .lunar-mini-day.lunar-hoverable:hover {
  border-color: #3d3d42;
}

/* Mantem a "mao" de clique em todo o card mensal do modo ano, inclusive sobre os mini dias */
.lunar-year-view-month,
.lunar-year-view-month * {
  cursor: pointer;
}

.lunar-year-view-month .lunar-mini-day.empty,
.lunar-year-view-month .lunar-mini-day.empty * {
  cursor: default;
}

/* Label da fase (Nova, Cheia...) */
.lunar-mini-day .l {
  font-size: 0.5rem;
  line-height: 1;
  margin-top: 0;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--primary-color);
  text-align: center;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  letter-spacing: -0.5px;
}

.lunar-hoverable {
  position: relative;
}

@media (hover: hover) and (pointer: fine) {
  .lunar-hoverable[data-hover-label]::after {
    content: attr(data-hover-label);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%) translateY(3px);
    background: rgba(24, 24, 27, 0.9);
    color: #f8f8f8;
    padding: 5px 9px;
    border-radius: 8px;
    font-size: 0.68rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition:
      opacity 0.18s ease,
      transform 0.18s ease;
    z-index: 20;
  }

  .lunar-hoverable[data-hover-label]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Updated Astro Item Card Style */
.astro-item {
  background: var(--light-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.astro-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 113, 227, 0.15);
  border-color: var(--primary-color);
}

.astro-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-color);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: left;
}

.astro-item:hover::before {
  transform: scaleX(1);
}

body.dark-mode .astro-item {
  background: #2c2c2e;
  border-color: #38383a;
}

body.dark-mode .astro-item:hover {
  box-shadow: 0 8px 25px rgba(10, 132, 255, 0.2);
  border-color: #0a84ff;
}

/* Hide the old '?' button since the whole card is clickable */
.term-help-btn {
  display: none;
}

/* Ajustar ícone quando tem label para caber tudo */
.lunar-mini-day.has-phase .p {
  font-size: 0.85rem;
  margin-bottom: 0;
}

/* ==========================================================================
   PAGE MÊS (FULL CALENDAR & LISTS)
   ========================================================================== */
.lunar-calendar-wrapper {
  max-width: 1250px; /* Aumentado 25% (de 1000px) */
  margin: 0 auto 40px auto;
  padding: 0 20px;
}

.lunar-full-calendar {
  background: linear-gradient(165deg, #ffffff 0%, #f0f4fb 100%);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 25px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

body.dark-mode .lunar-full-calendar {
  background: linear-gradient(165deg, #1c1c1e 0%, #24242a 100%);
  border-color: #38383a;
}

.lunar-cal-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 15px;
}

.lunar-cal-weekday {
  text-align: center;
  font-weight: 800;
  font-size: 0.96rem;
  color: var(--secondary-color);
  padding: 10px 0;
  text-transform: none;
  letter-spacing: 0.01em;
}

@media (max-width: 768px) {
  .lunar-cal-weekday {
    font-size: 0.8rem;
    font-weight: 700;
  }
}

.lunar-cal-weekday.sunday {
  color: var(--secondary-color);
  background: transparent;
  border: none;
  border-radius: 0;
  font-weight: 700;
}

.lunar-cal-weekday.saturday {
  color: var(--secondary-color);
  background: transparent;
  border: none;
  border-radius: 0;
  font-weight: 700;
}

body.dark-mode .lunar-cal-weekday.sunday,
body.dark-mode .lunar-cal-weekday.saturday {
  color: var(--secondary-color);
  background: transparent;
  border: none;
}

.lunar-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  background: linear-gradient(
    180deg,
    rgba(236, 241, 249, 0.7) 0%,
    rgba(245, 248, 253, 0.85) 100%
  );
  border: 1px solid #dce4f0;
  border-radius: 14px;
  padding: 10px;
}

body.dark-mode .lunar-cal-grid {
  background: linear-gradient(
    180deg,
    rgba(42, 42, 50, 0.82) 0%,
    rgba(35, 35, 40, 0.9) 100%
  );
  border-color: #3f3f46;
}

.lunar-cal-cell {
  min-height: 80px;
  background: linear-gradient(180deg, #f8fbff 0%, #edf2fa 100%);
  border: 1px solid #dce4f0;
  border-radius: 12px;
  padding: 8px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease;
  cursor: pointer;
}

@media (min-width: 769px) {
  .lunar-cal-grid {
    grid-auto-rows: 106px;
  }

  .lunar-cal-cell {
    height: 100%;
    min-height: 0;
    box-sizing: border-box;
    overflow: hidden;
  }
}

.lunar-cal-cell.empty {
  background: transparent;
  border-color: transparent;
  cursor: default;
}

.lunar-cal-grid > .lunar-cal-cell.empty:nth-child(7n + 1),
.lunar-cal-grid > .lunar-cal-cell.empty:nth-child(7n) {
  background: #dbe1ea !important;
  border-color: #aab6c8 !important;
}

body.dark-mode .lunar-cal-grid > .lunar-cal-cell.empty:nth-child(7n + 1),
body.dark-mode .lunar-cal-grid > .lunar-cal-cell.empty:nth-child(7n) {
  background: #3a414d !important;
  border-color: #5f6a7d !important;
}

.lunar-cal-cell:not(.empty):hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 24px rgba(26, 35, 126, 0.16);
  border-color: #b8c8e5;
}

body.dark-mode .lunar-cal-cell {
  background: #2c2c2e;
  border-color: #3f3f46;
}

.lunar-cal-cell.sunday,
.lunar-cal-cell.saturday {
  background: #dbe1ea;
  border-color: #aab6c8;
}

body.dark-mode .lunar-cal-cell.sunday,
body.dark-mode .lunar-cal-cell.saturday {
  background: #3a414d;
  border-color: #5f6a7d;
}

.lunar-cal-cell.today {
  border: 2px solid var(--primary-color);
  background: rgba(0, 113, 227, 0.1);
}

.lunar-cal-cell.today.sunday,
.lunar-cal-cell.today.saturday {
  background: #dbe1ea;
}

body.dark-mode .lunar-cal-cell.today.sunday,
body.dark-mode .lunar-cal-cell.today.saturday {
  background: #3a414d;
}

.lunar-cal-cell .day-num,
.lunar-cal-cell .day-number {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-color);
  margin-bottom: 4px;
}

.lunar-cal-cell.sunday .day-num,
.lunar-cal-cell.sunday .day-number,
.lunar-cal-cell.saturday .day-num,
.lunar-cal-cell.saturday .day-number {
  color: #1f1f1f;
}

body.dark-mode .lunar-cal-cell.sunday .day-num,
body.dark-mode .lunar-cal-cell.sunday .day-number,
body.dark-mode .lunar-cal-cell.saturday .day-num,
body.dark-mode .lunar-cal-cell.saturday .day-number {
  color: #f2f4f8;
}

/* Reinforca visual de coluna (domingo/sabado) no modo MES */
.lunar-cal-grid > .lunar-cal-cell:nth-child(7n + 1),
.lunar-cal-grid > .lunar-cal-cell:nth-child(7n) {
  background: #dbe1ea !important;
  border-color: #aab6c8 !important;
}

body.dark-mode .lunar-cal-grid > .lunar-cal-cell:nth-child(7n + 1),
body.dark-mode .lunar-cal-grid > .lunar-cal-cell:nth-child(7n) {
  background: #3a414d !important;
  border-color: #5f6a7d !important;
}

.lunar-cal-cell .phase-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
}

.lunar-cal-cell .phase-icon-lg {
  font-size: 1.8rem;
  margin-bottom: 3px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lunar-cal-cell .phase-icon-lg .phase-emoji {
  position: relative;
  z-index: 2;
  transition:
    transform 0.25s ease,
    filter 0.25s ease;
}

.lunar-cal-cell .phase-icon-lg .moon-hover-svg {
  position: absolute;
  width: 44px;
  height: 44px;
  opacity: 0;
  transform: scale(0.7);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
  pointer-events: none;
}

.lunar-cal-cell:not(.empty):hover .phase-icon-lg .phase-emoji {
  transform: scale(1.16);
  filter: drop-shadow(0 0 10px rgba(185, 208, 255, 0.78));
}

.lunar-cal-cell:not(.empty):hover .phase-icon-lg .moon-hover-svg {
  opacity: 0.95;
  transform: scale(1.18);
}

body.dark-mode .lunar-cal-cell .phase-icon-lg .moon-hover-svg {
  display: none;
}

body.dark-mode .lunar-cal-cell:not(.empty):hover .phase-icon-lg .phase-emoji {
  filter: drop-shadow(0 0 8px rgba(190, 215, 255, 0.6));
}

.lunar-cal-cell .phase-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--primary-color);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lunar-cal-cell .phase-time-sm {
  font-size: 0.6rem;
  color: var(--secondary-color);
}

.lunar-day-deeplink {
  position: absolute;
  inset: 0;
  z-index: 3;
  text-indent: -9999px;
  overflow: hidden;
  cursor: pointer;
}

.lunar-cal-cell .day-number,
.lunar-cal-cell .day-num,
.lunar-cal-cell .phase-info,
.lunar-cal-cell .phase-info *,
.lunar-cal-cell .day-number *,
.lunar-cal-cell .day-num * {
  position: relative;
  z-index: 2;
  cursor: pointer;
}

/* Month Page Summary List */
.lunar-summary-wrapper {
  max-width: 1250px;
  margin: 0 auto 40px auto;
  padding: 0 20px;
}

.lunar-summary-box {
  background: var(--content-bg);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary-color);
  border-radius: 12px;
  padding: 25px;
}

/* Alinha cards/lists principais ao mesmo "bloco visual" largo do site (desktop/tablet) */
@media (min-width: 769px) {
  .lunar-dashboard-wrapper > .lunar-hero-unified,
  .lunar-months-wrapper > .lunar-months-grid,
  .lunar-calendar-wrapper > .lunar-full-calendar,
  .lunar-summary-wrapper > .lunar-summary-box {
    width: calc(100% + 40px);
    margin-left: -20px;
    margin-right: -20px;
    box-sizing: border-box;
  }

  /* Respiro lateral extra no grid anual após ampliar a largura do bloco */
  .lunar-months-wrapper > .lunar-months-grid {
    padding-left: 6px;
    padding-right: 6px;
  }
}

body.dark-mode .lunar-summary-box {
  background: #1c1c1e;
  border-color: #38383a;
  border-left-color: var(--primary-color);
}

.lunar-summary-box h2 {
  margin: 0 0 20px 0;
  font-size: 1.2rem;
  color: var(--text-color);
  font-family: "Poppins", "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0.01em;
}

.lunar-summary-box h3 {
  font-family: "Poppins", "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0.01em;
}

.lunar-summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lunar-summary-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: var(--light-bg);
  border-radius: 10px;
}

body.dark-mode .lunar-summary-item {
  background: #2c2c2e;
}

.lunar-summary-item .s-icon {
  font-size: 1.8rem;
}

.lunar-summary-item .s-info {
  display: flex;
  flex-direction: column;
}

.lunar-summary-item .s-info strong {
  color: var(--text-color);
  font-size: 0.95rem;
}

.lunar-summary-item .s-info span {
  color: var(--secondary-color);
  font-size: 0.85rem;
}

/* Navigation Links */
.lunar-years-nav,
.lunar-months-nav {
  max-width: 1250px;
  margin: 0 auto 40px auto;
  padding: 0 20px;
  text-align: center;
}

.lunar-years-nav h2,
.lunar-months-nav h3 {
  margin: 0 0 20px 0;
  font-size: 1.1rem;
  color: var(--text-color);
}

.lunar-links-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.lunar-link-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  padding: 10px 18px;
  background: var(--content-bg);
  border: 1px solid var(--border-color);
  border-radius: 25px;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.lunar-link-item:hover,
.lunar-link-item.active {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

body.dark-mode .lunar-link-item {
  background: #1c1c1e;
  border-color: #38383a;
}

/* ==========================================================================
   GENERIC CONTAINERS & CONTENT WRAPPERS
   ========================================================================== */
.article-wrapper,
.howto-wrapper,
.tool-aux-wrapper,
.related-tools-section,
.faq-section {
  max-width: 1250px;
  margin: 0 auto 40px auto;
  padding: 0 20px;
}

/* SERP Wrapper Refinements */
.serp-wrapper {
  max-width: 1250px !important;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.serp-wrapper h2 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.serp-wrapper p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-color);
  margin-bottom: 15px;
  text-align: justify;
}

/* Article Content Specifics */
.article-content h3 {
  text-align: left;
  margin-top: 25px;
  font-size: 1.2rem;
  color: var(--text-color);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 5px;
  margin-bottom: 15px;
}

.article-content ul {
  text-align: left;
  padding-left: 20px;
}

.article-content li {
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: var(--text-color);
}

.term-definition-box {
  background: var(--light-bg);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 15px;
}

body.dark-mode .term-definition-box {
  background: #2c2c2e;
}

.lunar-field-guide-article h2 {
  text-align: left;
}

.lunar-field-guide-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--content-bg);
}

.lunar-field-guide-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.lunar-field-guide-table th,
.lunar-field-guide-table td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-color);
  font-size: 0.92rem;
  line-height: 1.45;
}

.lunar-field-guide-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--secondary-color);
  background: #f5f8ff;
}

.lunar-field-guide-table td:first-child {
  font-weight: 700;
  min-width: 170px;
}

.lunar-field-guide-table tbody tr:last-child td {
  border-bottom: 0;
}

body.dark-mode .lunar-field-guide-table-wrap {
  background: #1c1c1e;
  border-color: #38383a;
}

body.dark-mode .lunar-field-guide-table th {
  background: #232a34;
}

/* FAQ Styling */
.lunar-faq-wrapper,
.faq-section {
  max-width: 1250px;
  margin: 0 auto 60px auto;
  padding: 0 20px;
}

.faq-interactive-section h2 {
  text-align: center;
  margin: 0 0 25px 0;
  font-size: 1.4rem;
  color: var(--text-color);
}

/* ==========================================================================
   PRINT STYLES - LUNAR CALENDAR
   ========================================================================== */
@media print {
  /* === 1. HIDE NON-ESSENTIAL ELEMENTS === */
  .no-print,
  .site-header,
  .site-footer,
  .nav-controls,
  .lunar-nav-wrapper,
  .lunar-years-nav,
  .lunar-months-nav,
  .lunar-sidebar-panel,
  .tool-actions,
  .action-buttons-container,
  .howto-wrapper,
  .related-tools-section,
  .faq-section,
  .serp-wrapper,
  .tool-aux-wrapper,
  .lunar-faq-wrapper,
  .term-help-btn,
  .astro-info-btn,
  .astro-extra,
  .lunar-modal-overlay,
  .cookie-consent-banner,
  .theme-toggle-button,
  .back-to-top,
  #lunar-toast {
    display: none !important;
  }

  /* === 2. BODY & PAGE SETUP === */
  body {
    background: white !important;
    color: #000 !important;
    margin: 0 !important;
    padding: 1cm !important;
    font-size: 12pt !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* === 3. TITLE HEADER (Visible) === */
  .tool-page-header {
    display: block !important;
    text-align: center !important;
    margin-bottom: 15px !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
  }

  .tool-page-header h1 {
    display: block !important;
    font-size: 22pt !important;
    color: #000 !important;
    margin: 0 0 5px 0 !important;
  }

  .tool-page-header p {
    display: none !important;
  }

  /* === 4. REORDER: Calendar BEFORE Astro Dashboard === */
  /* Wrapper becomes flex column for reordering */
  .lunar-print-reorder {
    display: flex !important;
    flex-direction: column !important;
  }

  /* Hide the "today" card and sidebar */
  .lunar-dashboard-wrapper {
    display: none !important;
  }

  /* Calendar grid - FIRST (order: 1) */
  .lunar-calendar-wrapper {
    order: 1 !important;
    display: block !important;
    width: 100% !important;
    margin-bottom: 20px !important;
    page-break-inside: avoid;
  }

  .lunar-month-grid {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 3px !important;
    border: 1px solid #ccc !important;
    background: #fff !important;
  }

  .weekdays-header {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    background: #f0f0f0 !important;
    border-bottom: 2px solid #333 !important;
  }

  .weekday-label {
    color: #000 !important;
    font-weight: bold !important;
    font-size: 9pt !important;
    padding: 5px !important;
    text-align: center !important;
  }

  .lunar-cal-cell {
    border: 1px solid #ddd !important;
    background: #fff !important;
    min-height: 60px !important;
    padding: 5px !important;
  }

  .lunar-cal-cell.today {
    border: 2px solid #000 !important;
    font-weight: bold !important;
  }

  .cell-date {
    font-size: 11pt !important;
    font-weight: bold !important;
    color: #000 !important;
  }

  .cell-moon-icon {
    font-size: 16pt !important;
  }

  .cell-phase-name {
    font-size: 8pt !important;
    color: #333 !important;
  }

  .cell-illumination {
    font-size: 7pt !important;
    color: #666 !important;
  }

  /* Astro Dashboard - AFTER Calendar (simplified) */
  .lunar-astro-dashboard {
    order: 2 !important;
    border: 1px solid #ccc !important;
    padding: 10px !important;
    background: #fafafa !important;
    page-break-inside: avoid;
  }

  .lunar-astro-dashboard h3 {
    font-size: 14pt !important;
    margin: 0 0 10px 0 !important;
    color: #000 !important;
  }

  .astro-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 10px !important;
  }

  .astro-item {
    background: transparent !important;
    padding: 5px !important;
    border: none !important;
  }

  .astro-label {
    font-size: 9pt !important;
    color: #444 !important;
  }

  .astro-value {
    font-size: 11pt !important;
    font-weight: bold !important;
    color: #000 !important;
  }

  .astro-note {
    font-size: 8pt !important;
    color: #666 !important;
  }

  /* Phases Summary - AFTER Astro */
  .lunar-summary-wrapper {
    order: 3 !important;
    margin-top: 15px !important;
    border: 1px solid #ccc !important;
    padding: 10px !important;
    page-break-inside: avoid;
  }

  .lunar-summary-box h3 {
    font-size: 12pt !important;
    margin: 0 0 10px 0 !important;
  }

  .lunar-summary-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .lunar-summary-item {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 5px 0 !important;
    border-bottom: 1px dashed #ddd !important;
  }

  /* === YEAR MODE: 3-column grid for months === */
  .lunar-months-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 15px !important;
  }

  .lunar-year-view-month {
    break-inside: avoid;
    page-break-inside: avoid;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    padding: 10px !important;
  }
}

/* Lista de Fases no Mini Calendário (Ano) - Horizontal com Separadores */
.lunar-mini-phase-list {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-color);
}

body.dark-mode .lunar-mini-phase-list {
  border-top-color: #38383a;
}

.lunar-mini-phase-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  /* Horizontal */
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  /* Alinhado a esquerda */
}

.lunar-mini-phase-list li {
  font-size: 0.75rem;
  color: var(--secondary-color);
  display: flex;
  align-items: center;
  padding: 0;
  border: none;
}

/* Separador entre itens */
.lunar-mini-phase-list li:not(:last-child)::after {
  content: "|";
  margin-left: 8px;
  color: var(--border-color);
  font-weight: 300;
}

body.dark-mode .lunar-mini-phase-list li:not(:last-child)::after {
  color: #444;
}

.lunar-mini-phase-list .p-icon {
  font-size: 0.85rem;
  margin-right: 4px;
  /* Espaço pequeno */
  opacity: 0.9;
}

.lunar-mini-phase-list .p-date {
  font-weight: 600;
  color: var(--text-color);
  font-size: 0.75rem;
  margin-left: 4px;
}

/* ==========================================================================
   DASHBOARD ASTRONÔMICO
   ========================================================================== */
.lunar-astro-dashboard {
  max-width: 1250px;
  margin: 0 auto 30px auto;
  padding: 25px 20px;
  background: var(--content-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

body.dark-mode .lunar-astro-dashboard {
  background: #1c1c1e;
  border-color: #38383a;
}

.lunar-astro-dashboard h3 {
  margin: 0 0 20px 0;
  font-size: 1.1rem;
  color: var(--text-color);
  font-weight: 700;
  font-family: "Poppins", "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0.01em;
}

.astro-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

@media (max-width: 900px) {
  .astro-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .astro-grid {
    grid-template-columns: 1fr;
  }
}

.astro-item {
  background: var(--light-bg);
  border-radius: 12px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.astro-item--info {
  cursor: pointer;
}

.astro-item--info:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

body.dark-mode .astro-item {
  background: #2c2c2e;
}

.astro-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--secondary-color);
  font-weight: 600;
}

.astro-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-color);
}

.astro-extra {
  font-size: 0.8rem;
  color: var(--secondary-color);
}

.astro-note {
  margin: 15px 0 0 0;
  font-size: 0.8rem;
  color: var(--secondary-color);
  text-align: center;
  font-style: italic;
}

/* ==========================================================================
   MODAL DE DETALHES
   ========================================================================== */
.lunar-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.lunar-modal-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lunar-day-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.lunar-modal-content {
  background: var(--content-bg);
  width: 90%;
  max-width: 500px;
  position: relative;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  border: 1px solid var(--border-color);
}

#lunar-modal .lunar-day-modal-content {
  width: 100%;
  max-width: 900px;
  max-height: 95vh;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96);
  transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  z-index: 2;
}

#lunar-modal.open .lunar-day-modal-content {
  transform: scale(1);
}

.lunar-modal-overlay.open .lunar-modal-content {
  transform: translateY(0);
}

body.dark-mode .lunar-modal-content {
  background: #1c1c1e;
  border-color: #38383a;
}

.lunar-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.65);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  z-index: 3;
  transition:
    background 0.2s,
    border-color 0.2s;
}

.lunar-modal-close:hover {
  background: rgba(255, 255, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.95);
}

#lunar-modal .lunar-modal-header {
  background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
  color: #fff;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  flex-shrink: 0;
}

#lunar-modal .lunar-modal-close {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  padding: 0;
}

#lunar-modal .lunar-modal-close:hover {
  color: #dce4ff;
}

.modal-moon-icon {
  font-size: 3.5rem;
  line-height: 1;
}

.modal-header-info h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.modal-phase-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

#lunar-modal .lunar-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex-grow: 1;
  -webkit-overflow-scrolling: touch;
}

.lunar-modal-section-title {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-color);
}

.modal-astro-title-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.modal-astro-title-prefix {
  font-size: 1rem;
  line-height: 1;
}

.modal-astro-info-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(63, 87, 170, 0.35);
  background: rgba(63, 87, 170, 0.1);
  color: #1f5fae;
}

#lunar-modal .modal-astro-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

#lunar-modal .modal-astro-group {
  display: block;
}

#lunar-modal .modal-astro-group-title {
  margin: 0 0 10px 0;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-color);
}

#lunar-modal .modal-astro-group-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

#lunar-modal .modal-astro-separator {
  height: 1px;
  margin: 16px 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #d7e0ef 15%,
    #d7e0ef 85%,
    transparent 100%
  );
}

#lunar-modal .modal-astro-grid .astro-item {
  padding: 12px;
  min-height: 92px;
  border: 1px solid var(--border-color);
  background: var(--light-bg);
  cursor: pointer;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease,
    border-color 0.2s ease;
}

#lunar-modal .modal-astro-grid .astro-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(26, 35, 126, 0.1);
  border-color: #c4d5f3;
}

#lunar-modal .modal-astro-grid .astro-value {
  font-size: 1.05rem;
  line-height: 1.2;
}

#lunar-modal .modal-astro-grid .astro-label {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.82rem;
}

#lunar-modal .modal-astro-grid .astro-extra {
  font-size: 0.82rem;
}

.lunar-day-modal-footer {
  padding: 14px;
  background: #f9f9f9;
  border-top: 1px solid #eceff4;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.05);
}

.btn-open-lunar-day-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 320px;
  border: 2px solid #1f5fae;
  color: #1f5fae;
  background: #eef5ff;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-open-lunar-day-page:hover {
  background: #1f5fae;
  border-color: #1f5fae;
  color: #fff;
}

.btn-close-lunar-modal {
  display: inline-block;
  width: 100%;
  max-width: 320px;
  border: 2px solid #667287;
  color: #334155;
  background: transparent;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-close-lunar-modal:hover {
  background: #334155;
  border-color: #334155;
  color: #fff;
}

@media (max-width: 1024px) {
  #lunar-modal .modal-astro-group-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  #lunar-modal {
    align-items: flex-end;
    padding: 0;
  }

  #lunar-modal .lunar-day-modal-content {
    width: 100%;
    max-width: 100%;
    height: 90vh;
    max-height: 90vh;
    border-radius: 16px 16px 0 0;
    position: absolute;
    bottom: 0;
  }

  #lunar-modal .lunar-modal-header {
    padding: 14px 16px;
  }

  #lunar-modal .lunar-modal-close {
    right: 12px;
  }

  #lunar-modal .lunar-modal-body {
    padding: 14px 16px;
  }

  #lunar-modal .lunar-day-modal-footer {
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 520px) {
  #lunar-modal .modal-astro-group-grid {
    grid-template-columns: 1fr;
  }
}

body.dark-mode .modal-astro-info-btn {
  border-color: rgba(165, 180, 252, 0.45);
  background: rgba(129, 140, 248, 0.2);
  color: #c7d2fe;
}

body.dark-mode #lunar-modal .modal-astro-grid .astro-item {
  border-color: #3c4658;
  background: #232a36;
}

body.dark-mode #lunar-modal .modal-astro-grid .astro-item:hover {
  border-color: #5e79b4;
  box-shadow: 0 8px 16px rgba(18, 30, 70, 0.35);
}

body.dark-mode #lunar-modal .modal-astro-separator {
  background: linear-gradient(
    90deg,
    transparent 0%,
    #3a4d70 15%,
    #3a4d70 85%,
    transparent 100%
  );
}

body.dark-mode .lunar-day-modal-footer {
  background: #191f2b;
  border-top-color: #323d52;
}

body.dark-mode .btn-open-lunar-day-page {
  border-color: #9fb1d4;
  color: #d7e1f5;
  background: rgba(159, 177, 212, 0.12);
}

body.dark-mode .btn-open-lunar-day-page:hover {
  background: #d7e1f5;
  border-color: #d7e1f5;
  color: #182135;
}

body.dark-mode .btn-close-lunar-modal {
  border-color: #9fb1d4;
  color: #d7e1f5;
}

body.dark-mode .btn-close-lunar-modal:hover {
  background: #d7e1f5;
  border-color: #d7e1f5;
  color: #182135;
}

/* ==========================================================================
   TERM HELP BUTTONS
   ========================================================================== */
.term-help-btn,
.astro-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(79, 70, 229, 0.15);
  border: 1px solid rgba(79, 70, 229, 0.3);
  color: #4f46e5;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  margin-left: 4px;
  vertical-align: middle;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
}

.term-help-btn:hover,
.astro-info-btn:hover {
  background: #4f46e5;
  color: white;
  transform: scale(1.15);
}

.astro-info-btn {
  font-size: 12px;
  width: 22px;
  height: 22px;
  background: transparent;
  border: none;
}

body.dark-mode .term-help-btn,
body.dark-mode .astro-info-btn {
  background: rgba(129, 140, 248, 0.2);
  border-color: rgba(129, 140, 248, 0.4);
  color: #818cf8;
}

body.dark-mode .term-help-btn:hover,
body.dark-mode .astro-info-btn:hover {
  background: #818cf8;
  color: #1c1c1e;
}

#lunar-modal .modal-astro-info-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(63, 87, 170, 0.35);
  background: rgba(63, 87, 170, 0.1);
  color: #1f5fae;
  margin-left: 0;
  flex-shrink: 0;
}

#lunar-modal .modal-astro-info-btn:hover {
  background: #1f5fae;
  border-color: #1f5fae;
  color: #fff;
  transform: none;
}

body.dark-mode #lunar-modal .modal-astro-info-btn {
  border-color: rgba(165, 180, 252, 0.45);
  background: rgba(129, 140, 248, 0.2);
  color: #c7d2fe;
}

/* ==========================================================================
   TERM MODAL
   ========================================================================== */
.term-modal-content {
  max-width: 400px;
  text-align: center;
}

.term-modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.term-modal-header .term-icon {
  font-size: 2.5rem;
}

.term-modal-header h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
}

.astro-info-modal-header {
  gap: 6px;
}

.astro-info-modal-head-value,
.astro-info-modal-head-date {
  margin: 0;
  color: rgba(255, 255, 255, 0.96);
  text-align: center;
}

.astro-info-modal-head-value {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}

.astro-info-modal-head-date {
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.25;
  opacity: 0.95;
}

.term-modal-body {
  padding: 25px;
}

.term-modal-body p {
  font-size: 1rem;
  line-height: 1.7;
  color: #4b5563;
  margin: 0;
}

.astro-info-modal-date,
.astro-info-modal-extra,
.astro-info-modal-how {
  font-size: 0.92rem !important;
  line-height: 1.45 !important;
}

.astro-info-modal-date {
  color: var(--secondary-color) !important;
  margin-top: 10px !important;
}

.astro-info-modal-extra {
  color: var(--secondary-color) !important;
  margin-top: 6px !important;
}

.astro-info-modal-how {
  margin-top: 10px !important;
}

/* ==========================================================================
   TERM MODAL
   ========================================================================== */
.term-modal-content {
  max-width: 400px;
  text-align: center;
}

.term-modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.term-modal-header .term-icon {
  font-size: 2.5rem;
}

.term-modal-header h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
}

.term-modal-body {
  padding: 25px;
}

.term-modal-body p {
  font-size: 1rem;
  line-height: 1.7;
  color: #4b5563;
  margin: 0;
}

body.dark-mode .term-modal-body p {
  color: #d1d5db;
}

body.dark-mode .astro-info-modal-date,
body.dark-mode .astro-info-modal-extra {
  color: #aeb7c7 !important;
}

/* Term Modal Value Display */
.term-modal-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 15px;
  display: block;
  text-align: center;
}

/* ==========================================================================
   LUNAR HERO - .lh-* namespace
   ========================================================================== */
.lh {
  --lh-bg-1: #f9fcff;
  --lh-bg-2: #ecf6ff;
  --lh-bg-3: #ffffff;
  --lh-card: rgba(255, 255, 255, 0.94);
  --lh-border: rgba(78, 132, 196, 0.2);
  --lh-text: #10253d;
  --lh-muted: rgba(16, 37, 61, 0.72);
  --lh-accent: #1f74d8;
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 26px;
  display: grid;
  gap: 18px;
  background: linear-gradient(144deg, var(--lh-bg-1) 0%, var(--lh-bg-2) 46%, var(--lh-bg-3) 100%);
  color: var(--lh-text);
  box-shadow: 0 14px 26px rgba(41, 95, 160, 0.14);
}

.lh::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 8% 20%, rgba(26, 91, 170, 0.14), transparent),
    radial-gradient(1px 1px at 28% 70%, rgba(26, 91, 170, 0.1), transparent),
    radial-gradient(1px 1px at 63% 18%, rgba(26, 91, 170, 0.12), transparent),
    radial-gradient(1px 1px at 84% 64%, rgba(26, 91, 170, 0.1), transparent);
}

.lh > * {
  position: relative;
  z-index: 1;
}

.lh-mini-moon {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background:
    radial-gradient(circle at 32% 28%, #fff8eb 0%, #e6d8bb 55%, #9a8b6f 100%)
    center / cover no-repeat;
  box-shadow: inset -8px 0 14px rgba(8, 14, 22, 0.42);
}

.lh-main {
  display: grid;
  gap: 14px;
}

.lh-card {
  background: var(--lh-card);
  border: 1px solid var(--lh-border);
  border-radius: 16px;
  padding: 14px;
}

.lh-card--today {
  padding: 18px 20px 18px 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(241, 248, 255, 0.96) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.lh-today-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(96px, 32%);
  align-items: center;
  gap: 14px;
  margin-bottom: 2px;
}

.lh-today-copy {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.lh-today-icon {
  width: 100%;
  max-width: 156px;
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  padding: 0;
  background: transparent;
  box-shadow: none;
  flex: 0 0 auto;
  justify-self: end;
}

.lh-today-icon .lh-mini-moon {
  width: 100%;
  height: 100%;
}

.lh-kicker {
  margin: 0;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lh-muted);
  font-weight: 700;
}

.lh-title {
  margin: 0;
  font-size: clamp(1.25rem, 2.4vw, 2rem);
  line-height: 1.14;
  max-width: 22ch;
}

.lh-date {
  margin: 0;
  color: var(--lh-text);
  font-size: clamp(1.2rem, 2.5vw, 1.58rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  max-width: 26ch;
}

.lh-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.lh-card__title {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--lh-text);
}

.lh-data-list {
  margin: 0;
  display: grid;
  gap: 8px;
}

.lh-data-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.lh-data-row dt,
.lh-data-row dd {
  margin: 0;
}

.lh-data-row dt {
  font-size: 0.8rem;
  color: var(--lh-muted);
}

.lh-data-row dd {
  text-align: right;
  font-size: 0.93rem;
  font-weight: 600;
}

.lh-muted {
  font-size: 0.78rem;
  color: var(--lh-muted);
}

.lh-region-picker {
  margin-top: 10px;
  display: grid;
  gap: 4px;
}

.lh-region-picker__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lh-muted);
}

.lh-region-picker__select {
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--lh-border);
  background: #fff;
  color: var(--lh-text);
  font-size: 0.88rem;
  padding: 0 10px;
  outline: none;
}

.lh-region-picker__select:focus-visible {
  border-color: var(--lh-accent);
  box-shadow: 0 0 0 2px rgba(31, 116, 216, 0.2);
}

.lh-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lh-toggle {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #1f74d8 0%, #0f5ebf 100%);
  color: #f5fbff;
  font-size: 0.87rem;
  font-weight: 700;
  padding: 10px 16px;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.2s ease;
}

.lh-toggle:hover {
  filter: brightness(1.06);
}

.lh-toggle:active {
  transform: scale(0.98);
}

.lh-toggle:focus-visible {
  outline: 2px solid #1f74d8;
  outline-offset: 2px;
}

.lh-interactive {
  display: grid;
  grid-template-columns: 260px 1fr;
  align-items: center;
  gap: 18px;
  margin-top: 10px;
  padding: 14px;
  border: 1px solid var(--lh-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.lh-stage-wrap {
  display: grid;
  place-items: center;
}

.lh-stage {
  width: 240px;
  height: 240px;
  position: relative;
  border-radius: 50%;
  overflow: hidden;
  background: transparent;
}

.lh-svg,
.lh-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

#lh-sky-bg,
#lh-arc,
#lh-horizon {
  display: none;
}

#lh-shadow {
  fill: rgba(11, 22, 36, 0.92);
}

#lh-moon-texture {
  pointer-events: none;
}

.lh-rim {
  fill: none;
  stroke: rgba(255, 255, 255, 0.3);
  stroke-width: 1;
}

.lh-craters circle {
  pointer-events: none;
}

.lh-controls {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 4px 0 0;
  display: grid;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.lh-interactive-header {
  display: grid;
  gap: 4px;
}

.lh-interactive-title {
  margin: 0;
  font-size: 0.94rem;
  color: var(--lh-text);
}

.lh-interactive-subtitle {
  margin: 0;
  font-size: 0.82rem;
  color: var(--lh-muted);
}

.lh-mode-group {
  margin: 0;
  border: 0;
  padding: 4px;
  border-radius: 999px;
  background: rgba(31, 116, 216, 0.08);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.lh-mode {
  position: relative;
}

.lh-mode input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.lh-mode span {
  display: block;
  text-align: center;
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 0.78rem;
  color: var(--lh-muted);
  font-weight: 600;
  cursor: pointer;
}

.lh-mode input:checked + span {
  background: rgba(31, 116, 216, 0.17);
  color: #0f4f97;
}

.lh-mode input:focus-visible + span {
  outline: 2px solid #1f74d8;
  outline-offset: 1px;
}

.lh-slider {
  width: 100%;
  min-height: 34px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  touch-action: manipulation;
  pointer-events: auto;
  position: relative;
  z-index: 2;
}

.lh-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(31, 116, 216, 0.42) 0%, rgba(31, 116, 216, 0.18) 100%);
}

.lh-slider::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(90deg, rgba(31, 116, 216, 0.42) 0%, rgba(31, 116, 216, 0.18) 100%);
}

.lh-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -6px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: #1f74d8;
  touch-action: none;
}

.lh-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: #1f74d8;
}

.lh-slider:focus-visible {
  outline: 2px solid #1f74d8;
  outline-offset: 2px;
  border-radius: 4px;
}

.lh-slider-meta {
  margin: 0;
  min-height: 40px;
  font-size: 0.9rem;
  color: var(--lh-text);
  line-height: 1.4;
}

.lh-noscript {
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--lh-border);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.lh-noscript__moon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff 0%, #ece4d5 50%, #c7bfaf 100%);
  box-shadow: inset -8px 0 16px rgba(6, 14, 24, 0.45);
}

.lh-noscript__text {
  display: grid;
  gap: 2px;
  color: var(--lh-text);
  font-size: 0.86rem;
}

.lh-u-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}

.lh.lh-js .lh-interactive {
  display: none;
}

.lh.lh-js.lh--open .lh-interactive {
  display: grid;
}

@media (max-width: 920px) {
  .lh-interactive {
    grid-template-columns: 1fr;
  }

  .lh-stage-wrap {
    justify-self: center;
  }
}

@media (max-width: 768px) {
  .lh {
    padding: 16px 14px;
    gap: 14px;
  }

  .lh-cards {
    grid-template-columns: 1fr;
  }

  .lh-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .lh-toggle {
    display: inline-flex;
    justify-content: center;
  }

  .lh-interactive {
    display: none;
  }

  .lh.lh--open .lh-interactive {
    display: grid;
    grid-template-columns: 1fr;
  }

  .lh.lh--open .lh-toggle {
    display: none;
  }

  .lh-stage {
    width: 220px;
    height: 220px;
  }

  .lh-today-top {
    grid-template-columns: minmax(0, 1fr) minmax(84px, 34%);
    gap: 10px;
  }

  .lh-today-copy {
    gap: 8px;
  }

  .lh-today-icon {
    max-width: 112px;
  }

  .lh-slider {
    min-height: 38px;
  }

  .lh-slider::-webkit-slider-runnable-track,
  .lh-slider::-moz-range-track {
    height: 8px;
  }

  .lh-slider::-webkit-slider-thumb,
  .lh-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
  }

  .lh-slider::-webkit-slider-thumb {
    margin-top: -7px;
  }
}

@media (min-width: 769px) {
  .lh-toggle {
    display: none;
  }
}

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

body.dark-mode .lh {
  --lh-bg-1: #071324;
  --lh-bg-2: #0d223d;
  --lh-bg-3: #112b4a;
  --lh-card: rgba(8, 24, 44, 0.72);
  --lh-border: rgba(184, 213, 255, 0.2);
  --lh-text: #eef4ff;
  --lh-muted: rgba(221, 236, 255, 0.72);
  --lh-accent: #f2c14b;
  box-shadow: 0 24px 46px rgba(0, 0, 0, 0.55);
}

body.dark-mode .lh::before {
  background-image:
    radial-gradient(1px 1px at 10% 18%, rgba(255, 255, 255, 0.25), transparent),
    radial-gradient(1px 1px at 36% 64%, rgba(255, 255, 255, 0.16), transparent),
    radial-gradient(1px 1px at 58% 20%, rgba(255, 255, 255, 0.24), transparent),
    radial-gradient(1px 1px at 82% 70%, rgba(255, 255, 255, 0.15), transparent),
    radial-gradient(1px 1px at 90% 34%, rgba(255, 255, 255, 0.18), transparent);
}

body.dark-mode .lh-card--today,
body.dark-mode .lh-noscript,
body.dark-mode .lh-region-picker__select {
  background: rgba(9, 27, 49, 0.72);
}

body.dark-mode .lh-interactive {
  background: rgba(8, 24, 44, 0.62);
  box-shadow: inset 0 1px 0 rgba(184, 213, 255, 0.14);
}

body.dark-mode .lh-today-icon {
  background: transparent;
  box-shadow: none;
}

body.dark-mode .lh-date {
  color: rgba(246, 227, 177, 0.95);
}

body.dark-mode .lh-toggle {
  background: linear-gradient(135deg, #f2c14b 0%, #e09f3e 100%);
  color: #1c170b;
}

body.dark-mode .lh-mode-group {
  background: rgba(3, 16, 32, 0.62);
}

body.dark-mode .lh-mode input:checked + span {
  background: rgba(242, 193, 75, 0.22);
  color: #ffd77a;
}

