/* =============================================================================
   Luxury glass dashboard – matches the dual-calendar hero mockup
   Loaded after style.css so these rules win on equal specificity.
   ============================================================================= */

:root {
  --glass-bg: rgba(255, 255, 255, 0.42);
  --glass-bg-strong: rgba(255, 255, 255, 0.58);
  --glass-border: 1px solid rgba(255, 255, 255, 0.72);
  --glass-blur: blur(28px) saturate(1.45);
  --gold: #e8a31a;
  --gold-deep: #d48910;
  --teal: #2aa7b0;
  --teal-deep: #1b8f96;
  --coral: #ef8b86;
  --coral-deep: #e56d68;
  --hijri-blue: #6ec4d8;
  --hijri-blue-deep: #4aadc6;
  --shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 28px rgba(90, 130, 170, 0.08),
    0 28px 64px rgba(90, 130, 170, 0.10);
  --shadow-lg:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 14px 36px rgba(90, 130, 170, 0.10),
    0 36px 80px rgba(90, 130, 170, 0.12);
  --radius: 28px;
}

body.app-body {
  background:
    radial-gradient(980px 540px at 8% -4%, rgba(255, 236, 200, 0.85), transparent 58%),
    radial-gradient(920px 520px at 96% 0%, rgba(176, 220, 248, 0.72), transparent 52%),
    radial-gradient(1100px 420px at 50% 118%, rgba(150, 206, 236, 0.38), transparent 62%),
    linear-gradient(165deg, #fbf6ee 0%, #f3efe6 34%, #e7f2fb 70%, #d5ebf8 100%);
  background-attachment: fixed;
}

main.container-fluid {
  max-width: none;
  margin-inline: 0;
}

/* ---- Wrapper: transparent so the three glass slabs float ---- */
#decisionCard.decision-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0;
  overflow: visible;
  isolation: auto;
  gap: 0.95rem;
  display: flex;
  flex-direction: column;
}

#decisionCard.decision-card > * {
  position: static;
  z-index: auto;
}

.home-score-stage {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#decisionCard.decision-card::before {
  display: none;
}

#decisionCard.decision-card.rec-good,
#decisionCard.decision-card.rec-caution,
#decisionCard.decision-card.rec-bad {
  box-shadow: none;
}

.decision-card.skeleton-card {
  background: var(--glass-bg);
  border: var(--glass-border);
  box-shadow: var(--shadow-lg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

/* Shared luxury glass slab */
.decision-panel,
.dash-top-panel,
.dash-main-panel {
  background: var(--glass-bg);
  border: var(--glass-border);
  border-radius: 32px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

html[data-theme="dark"] .decision-panel,
html[data-theme="dark"] .dash-top-panel,
html[data-theme="dark"] .dash-main-panel {
  background: rgba(14, 32, 44, 0.55);
  border-color: rgba(255, 255, 255, 0.1);
}

/* =============================================================================
   1. TOP BAR
   ============================================================================= */
.dash-top-panel {
  padding: 0.85rem 1rem 0.7rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.32)),
    var(--glass-bg);
}

.dash-top {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 0;
  direction: ltr;
  width: 100%;
}

.dash-badges {
  display: none;
}

.decision-badges {
  display: none;
}

.decision-day-badge,
.lunar-phase-badge {
  min-height: 2.35rem;
  padding: 0.42rem 1.05rem;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0;
  border-radius: 999px;
  border: 0;
  box-shadow:
    0 6px 16px rgba(26, 60, 90, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.45) inset;
}

.decision-day-badge {
  color: #8a5a10;
  background: linear-gradient(180deg, #f8e3a0 0%, #ecc15a 100%);
}

.decision-day-badge i {
  font-size: 0.95rem;
  color: #c98900;
}

.lunar-phase-badge.is-hamal {
  color: #fff;
  background: linear-gradient(180deg, #4ec4c8 0%, #2aa3aa 100%);
  box-shadow:
    0 8px 18px rgba(42, 163, 170, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.4) inset;
}

.lunar-phase-badge.is-fasad {
  color: #8a5a10;
  background: linear-gradient(180deg, #f6d98a 0%, #e8b84a 100%);
}

.lunar-phase-badge i,
.decision-day-badge i {
  margin-inline-end: 0.2rem;
}

.dash-cal-cluster {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  width: 100%;
  flex: 0 1 auto;
  direction: ltr;
}

.dash-split {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.1rem 0.2rem 0.05rem;
}

.dash-split-line {
  flex: 1 1 auto;
  height: 1px;
  border: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(90, 150, 185, 0.22) 18%,
    rgba(90, 150, 185, 0.45) 50%,
    rgba(90, 150, 185, 0.22) 82%,
    transparent 100%
  );
}

.dash-split-mark {
  flex: 0 0 auto;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #eef8fc 0%, #d7eef8 100%);
  color: #3a8fb0;
  font-size: 0.78rem;
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.55),
    0 4px 10px rgba(80, 140, 180, 0.14);
}

.dash-split-toggle {
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.dash-split-toggle:hover,
.dash-split-toggle:focus-visible {
  transform: scale(1.06);
  outline: none;
}

.dash-split-toggle.is-collapsed i {
  opacity: 0.65;
}

html[data-theme="dark"] .dash-split-line {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(126, 200, 227, 0.18) 18%,
    rgba(126, 200, 227, 0.42) 50%,
    rgba(126, 200, 227, 0.18) 82%,
    transparent 100%
  );
}

html[data-theme="dark"] .dash-split-mark {
  background: linear-gradient(180deg, #1d3a4c 0%, #163044 100%);
  color: #7ec8e3;
  box-shadow:
    0 0 0 4px rgba(20, 34, 46, 0.55),
    0 4px 10px rgba(0, 0, 0, 0.25);
}

.dash-cal-dates {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  flex: 1 1 auto;
  min-width: 0;
}

.cal-leaf {
  flex: 1 1 0;
  width: auto;
  max-width: none;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 10px 24px rgba(80, 120, 160, 0.10),
    0 2px 6px rgba(80, 120, 160, 0.05),
    0 1px 0 rgba(255, 255, 255, 0.95) inset;
}

.cal-leaf-head {
  padding: 0.38rem 0.4rem;
}

.cal-leaf-h .cal-leaf-head {
  background: linear-gradient(180deg, #8ed4e6 0%, #62b9d0 100%);
}

.cal-leaf-g .cal-leaf-head {
  background: linear-gradient(180deg, #f6b4b0 0%, #ee8a84 100%);
}

.cal-leaf-tag {
  display: block;
  width: 100%;
  text-align: center;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.cal-leaf-body {
  padding: 0.45rem 0.35rem 0.55rem;
  gap: 0.08rem;
}

.cal-leaf-month {
  font-size: 0.78rem;
  font-weight: 800;
  color: #3d5a6c;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cal-leaf-day {
  font-size: 2.05rem;
  font-weight: 800;
  color: #1a3550;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0.08rem 0 0.04rem;
}

.cal-leaf-weekday {
  font-size: 0.78rem;
  font-weight: 700;
  color: #5f7588;
}

.cal-leaf-year {
  font-size: 0.78rem;
  font-weight: 700;
  color: #7a8f9e;
  margin-top: 0.18rem;
  padding-top: 0;
  width: auto;
  border-top: 0;
}

.cal-leaf-foot {
  display: none;
}

.btn-day-nav {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  z-index: 2;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.95);
  color: #6a8496;
  box-shadow:
    0 6px 16px rgba(80, 120, 160, 0.10),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

#prevDayBtn:disabled,
#nextDayBtn:disabled {
  opacity: 0.4;
}

.btn-day-nav i {
  font-size: 1.05rem;
}

.day-nav-hint {
  font-size: 0.72rem;
  font-weight: 600;
  color: #7a91a3;
  margin: 0.45rem 0 0;
  letter-spacing: 0.01em;
}

/* ---- Trip digital clocks (left) ---- */
.trip-clocks {
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.38rem;
  direction: rtl;
  width: 100%;
}

.digi-clock {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 10px 24px rgba(80, 120, 160, 0.10),
    0 2px 6px rgba(80, 120, 160, 0.05),
    0 1px 0 rgba(255, 255, 255, 0.95) inset;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.digi-clock-head {
  position: relative;
  padding: 0.28rem 1.15rem;
  text-align: center;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.digi-reset {
  appearance: none;
  position: absolute;
  left: 0.18rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  line-height: 1;
}

.digi-reset i {
  font-size: 0.68rem;
}

.digi-reset:hover,
.digi-reset:focus-visible {
  background: rgba(255, 255, 255, 0.32);
  outline: none;
}

.digi-clock.is-start .digi-clock-head {
  background: linear-gradient(180deg, #7ed0c8 0%, #3aa89f 100%);
}

.digi-clock.is-end .digi-clock-head {
  background: linear-gradient(180deg, #7eb6e6 0%, #4a8ec8 100%);
}

.digi-clock.is-duration {
  flex: 0.72 1 0;
}

.digi-clock.is-duration .digi-clock-head {
  background: linear-gradient(180deg, #f0c56b 0%, #d49a22 100%);
}

.digi-duration-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.45rem 0.4rem 0.55rem;
}

.digi-duration-input {
  width: 100%;
  max-width: 4.6rem;
  height: 2.35rem;
  box-sizing: border-box;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #16352c 0%, #0d241e 100%);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45);
  color: #6dffc2;
  text-shadow: 0 0 8px rgba(109, 255, 194, 0.35);
  font-family: var(--font-en), ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  padding: 0.38rem 0.2rem;
  outline: none;
  overflow: visible;
  -moz-appearance: textfield;
}

.digi-duration-input::-webkit-outer-spin-button,
.digi-duration-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.digi-duration-input::placeholder {
  color: rgba(109, 255, 194, 0.35);
}

.digi-duration-input:focus {
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.45),
    0 0 0 2px rgba(212, 154, 34, 0.45);
}

.digi-duration-unit {
  font-size: 0.72rem;
  font-weight: 800;
  color: #3d5a6c;
}

.digi-clock-lcd {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0.1rem;
  margin: 0.32rem 0.28rem 0.16rem;
  padding: 0.22rem 0.22rem 0.18rem;
  border-radius: 10px;
  background: linear-gradient(180deg, #16352c 0%, #0d241e 100%);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.25);
  direction: ltr;
  overflow: visible;
}

.digi-col {
  display: grid;
  grid-template-rows: 0.82rem 2.2rem 0.82rem;
  align-items: center;
  justify-items: center;
}

.digi-spin {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(110, 255, 196, 0.55);
  width: 2.3rem;
  height: 0.82rem;
  padding: 0;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.digi-spin:hover,
.digi-spin:focus-visible {
  color: #8fffd0;
  outline: none;
}

.digi-spin i {
  font-size: 0.7rem;
}

.digi-num {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  width: 2.05rem;
  height: 1.95rem;
  margin: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 0 0.12rem;
  font-family: var(--font-en), ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #6dffc2;
  text-shadow: 0 0 8px rgba(109, 255, 194, 0.35);
  line-height: 1.95rem;
  text-align: center;
  direction: ltr;
  caret-color: #6dffc2;
  outline: none;
  overflow: visible;
}

.digi-num:focus {
  background: rgba(109, 255, 194, 0.1);
  box-shadow: 0 0 0 1px rgba(109, 255, 194, 0.45);
}

.digi-num::selection {
  background: rgba(109, 255, 194, 0.35);
  color: #e9fff6;
}

.digi-colon {
  font-family: var(--font-en), ui-monospace, monospace;
  font-size: 1.12rem;
  font-weight: 700;
  color: #6dffc2;
  line-height: 1.95rem;
  height: 1.95rem;
  margin: 0.82rem 0;
  padding: 0;
  animation: digiBlink 1.1s step-end infinite;
}

@keyframes digiBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.22; }
}

.digi-clock-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  padding: 0.22rem 0.35rem 0.38rem;
}

.digi-period {
  font-size: 0.72rem;
  font-weight: 800;
  color: #3d5a6c;
}

.digi-nextday {
  appearance: none;
  border: 1px solid rgba(74, 142, 200, 0.28);
  background: rgba(74, 142, 200, 0.08);
  color: #4a6a80;
  border-radius: 999px;
  font-size: 0.5rem;
  font-weight: 800;
  padding: 0.1rem 0.28rem;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
}

.digi-nextday.is-on {
  background: #4a8ec8;
  border-color: #4a8ec8;
  color: #fff;
}

html[data-theme="dark"] .digi-clock {
  background: rgba(20, 34, 46, 0.78);
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .digi-period {
  color: #b7cbd6;
}

html[data-theme="dark"] .digi-nextday {
  color: #9bb4c0;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .digi-nextday.is-on {
  background: #4a8ec8;
  color: #fff;
}

html[data-theme="dark"] .digi-duration-unit {
  color: #b7cbd6;
}

/* =============================================================================
   2. MAIN HERO: sticky score, factor cards scroll underneath via page scroll
   ============================================================================= */
.dash-main-panel {
  padding: 0.7rem 0.75rem 0.8rem;
  background:
    linear-gradient(180deg, rgba(252, 248, 242, 0.96), rgba(244, 250, 253, 0.94));
  display: flex;
  flex-direction: column;
  overflow: visible;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.decision-panel.dash-main-panel {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html[data-theme="dark"] .dash-main-panel {
  background: linear-gradient(180deg, rgba(12, 28, 40, 0.96), rgba(14, 32, 46, 0.94));
}

.dash-hero {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  width: 100%;
  margin: 0;
  direction: ltr;
  overflow: visible;
}

.dash-hero.score-moon-split {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: visible;
}

.score-live-stack {
  order: 1;
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  min-height: auto;
  overflow: visible;
}

.moon-phase-card {
  order: 2;
}

.moon-phase-card,
.score-moon-col-score,
.score-moon-col-factors,
.score-live-stack {
  direction: rtl;
}

html.lang-en .moon-phase-card,
html.lang-en .score-moon-col-score,
html.lang-en .score-moon-col-factors,
html.lang-en .score-live-stack {
  direction: ltr;
}

.score-moon-col-score {
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0.55rem 0.75rem 0.7rem;
  margin: -0.7rem -0.75rem 0;
  text-align: center;
  background: #f7f3ec;
  box-shadow: 0 14px 20px -12px rgba(40, 80, 120, 0.35);
  border-radius: 32px 32px 0 0;
}

html[data-theme="dark"] .score-moon-col-score {
  background: #0e1e28;
  box-shadow: 0 14px 20px -12px rgba(0, 0, 0, 0.55);
}

.score-moon-split.is-moon-hidden .score-moon-col-score {
  flex: 0 0 auto;
}

.score-moon-col-score .decision-notes-hint {
  margin: 0.2rem 0 0;
  font-size: 0.68rem;
  line-height: 1.3;
}

.score-moon-col-factors {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  min-width: 0;
  gap: 0.45rem;
  max-height: none;
  overflow: visible;
  padding: 0.15rem 0.08rem 0.2rem;
  position: relative;
  z-index: 1;
}

.score-moon-col-factors .dash-mini-grid {
  flex: 0 0 auto;
}

.score-moon-sep {
  display: none;
}

/* ---- Moon ---- */
.moon-phase-card {
  max-width: none;
  width: 100%;
  min-height: 0;
  flex: 0 0 auto;
  padding: 0.7rem 0.75rem 0.75rem;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(214, 236, 252, 0.55) 0%, rgba(255, 255, 255, 0.72) 58%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow:
    0 12px 28px rgba(80, 120, 160, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.85) inset;
  gap: 0.2rem;
}

.moon-stage {
  position: relative;
  width: 100%;
  height: 158px;
  border-radius: 0;
  overflow: visible;
  margin-bottom: 0.15rem;
  background: transparent;
  box-shadow: none;
  display: grid;
  place-items: center;
}

.moon-star {
  position: absolute;
  width: 7px;
  height: 7px;
  background: #fff;
  clip-path: polygon(50% 0%, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0% 50%, 38% 38%);
  box-shadow: 0 0 8px 2px rgba(255, 255, 255, 0.9);
  opacity: 0.95;
}
.moon-star.s1 { top: 16%; left: 14%; width: 6px; height: 6px; }
.moon-star.s2 { top: 22%; right: 16%; width: 5px; height: 5px; opacity: 0.75; }
.moon-star.s3 { top: 10%; right: 34%; width: 7px; height: 7px; }
.moon-star.s4 { top: 38%; left: 10%; width: 4px; height: 4px; opacity: 0.6; }
.moon-star.s5 { top: 18%; left: 48%; width: 4px; height: 4px; opacity: 0.7; }

.moon-cloud,
.moon-crescent-art {
  display: none;
}

.moon-horizon-glow {
  position: absolute;
  left: 50%;
  bottom: 18%;
  width: 132px;
  height: 34px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(230, 242, 255, 0.75) 0%, rgba(180, 210, 235, 0.28) 42%, transparent 72%);
  filter: blur(5px);
  pointer-events: none;
  z-index: 1;
}

.moon-phase-orb-wrap {
  position: relative;
  width: 118px;
  height: 118px;
  overflow: visible;
  opacity: 1;
  pointer-events: none;
  z-index: 2;
  display: grid;
  place-items: center;
  background: transparent;
  box-shadow: none;
}

#moonPhaseCard .moon-phase-orb-wrap,
#moonPhaseCard .moon-phase-svg {
  width: 118px;
  height: 118px;
}

#moonPhaseCard .moon-phase-svg {
  filter:
    drop-shadow(0 0 14px rgba(220, 235, 255, 0.7))
    drop-shadow(0 8px 18px rgba(40, 70, 110, 0.22));
}

.moon-face {
  stroke: rgba(255, 255, 255, 0.7);
  stroke-width: 0.8;
}

.moon-shadow-disc {
  fill: rgba(18, 28, 46, 0.78);
}

.moon-phase-name {
  font-size: 1.12rem;
  font-weight: 800;
  color: #1a3550;
  margin-top: 0.1rem;
}

.moon-phase-illum {
  font-size: 0.92rem;
  font-weight: 800;
  color: #2a9d8f;
  margin-bottom: 0.45rem !important;
}

.moon-phase-times-wrap {
  display: flex;
  flex-direction: row;
  direction: rtl;
  gap: 0.4rem;
  width: 100%;
}

html.lang-en .moon-phase-times-wrap {
  direction: ltr;
}

.moon-phase-time-item {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 800;
  color: #1a2b3c;
  background: #fff;
  border: 0;
  border-radius: 14px;
  padding: 0.4rem 0.45rem;
  box-shadow: 0 4px 12px rgba(80, 120, 160, 0.08);
}

.moon-sun-icon {
  width: 1.45rem;
  height: 1.45rem;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.moon-sun-icon svg {
  width: 1.35rem;
  height: 1.35rem;
  display: block;
}

.moon-time-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  line-height: 1.2;
}

.moon-time-lbl {
  font-weight: 800;
  font-size: 0.68rem;
  color: #1a2b3c;
}

.moon-time-val {
  font-weight: 800;
  font-size: 0.68rem;
  color: #1a2b3c;
  direction: ltr;
}

.score-ring {
  width: 148px;
  height: 148px;
  filter: drop-shadow(0 12px 24px rgba(224, 160, 20, 0.18));
}

.score-svg {
  position: relative;
  z-index: 1;
}

.score-bg {
  stroke: rgba(232, 196, 120, 0.22);
  stroke-width: 11;
}

.score-fg {
  stroke: url(#scoreGold);
  stroke-width: 11;
}

.decision-card.rec-good .score-fg,
.rec-good .score-fg {
  stroke: url(#scoreGoodGrad);
}

.decision-card.rec-caution .score-fg,
.rec-caution .score-fg {
  stroke: url(#scoreGold);
}

.decision-card.rec-bad .score-fg,
.rec-bad .score-fg {
  stroke: url(#scoreBadGrad);
}

.score-ring::before {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, #ffffff 0%, #f7f4ee 78%);
  box-shadow:
    0 10px 24px rgba(80, 120, 160, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  z-index: 0;
}

.score-center {
  z-index: 1;
}

.score-number {
  font-size: 2.15rem;
  font-weight: 800;
  color: #1a3550;
  letter-spacing: -0.04em;
}

.decision-text {
  font-size: 0.98rem;
  margin-top: 0.28rem;
  margin-bottom: 0;
  color: #c98900;
}

.decision-text-en {
  font-size: 0.82rem;
  font-weight: 700;
  color: #8a7340;
  margin-top: 0.1rem;
}

.rec-good .decision-text { color: #1d9a58; }
.rec-caution .decision-text { color: #c98900; }
.rec-bad .decision-text { color: #d45345; }

/* ---- 8 mini cards ---- */
.dash-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  direction: ltr;
}

#factorMiniGrid {
  direction: rtl;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: none;
  grid-auto-rows: auto;
  align-items: start;
  gap: 0.5rem;
}

html.lang-en #factorMiniGrid {
  direction: ltr;
}

.dash-mini {
  direction: rtl;
}

html.lang-en .dash-mini {
  direction: ltr;
}

.dash-mini {
  --mini-tone: #2f7fd0;
  appearance: none;
  border: 0;
  background: #ffffff;
  border-radius: 18px;
  padding: 0.7rem 0.4rem 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.14rem;
  text-align: center;
  box-shadow:
    0 10px 22px color-mix(in srgb, var(--mini-tone) 16%, transparent),
    0 2px 6px rgba(80, 120, 160, 0.06);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-height: 7.6rem;
}

.dash-mini:hover,
.dash-mini:focus-visible {
  transform: translateY(-3px);
  box-shadow:
    0 16px 30px color-mix(in srgb, var(--mini-tone) 22%, transparent),
    0 2px 6px rgba(80, 120, 160, 0.08);
  outline: none;
}

.dash-mini-icon {
  position: relative;
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 0.18rem;
  font-size: 1.55rem;
  color: var(--mini-tone);
  background: transparent;
  filter: drop-shadow(0 6px 10px color-mix(in srgb, var(--mini-tone) 38%, transparent));
}

.dash-mini-icon::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--mini-tone) 32%, transparent) 0%,
    color-mix(in srgb, var(--mini-tone) 10%, transparent) 48%,
    transparent 72%
  );
  z-index: 0;
  pointer-events: none;
}

.dash-mini-icon i,
.dash-mini-icon svg {
  position: relative;
  z-index: 1;
  line-height: 1;
}

.dash-mini-icon svg {
  width: 1.45rem;
  height: 1.45rem;
  display: block;
}

.dash-mini-label,
.dash-mini-value,
.dash-mini-status {
  color: var(--mini-tone);
}

.dash-mini-label {
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.25;
}

.dash-mini-value {
  font-family: var(--font-en), var(--font-ar), sans-serif;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.15;
  direction: ltr;
  unicode-bidi: isolate;
}

#factorMiniGrid .dash-mini {
  min-height: 0;
  aspect-ratio: 1 / 1;
  width: 100%;
  height: auto;
  padding: 0.5rem 0.4rem 0.4rem;
  gap: 0.06rem;
  box-sizing: border-box;
}

#factorMiniGrid .dash-mini-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.16rem;
  font-size: 0.98rem;
  max-width: 100%;
}

#factorMiniGrid .dash-mini-prefix {
  font-size: 0.72rem;
  font-weight: 800;
}

#factorMiniGrid .dash-mini-unit {
  font-size: 0.66rem;
  font-weight: 800;
  opacity: 0.82;
}

#factorMiniGrid .dash-mini-pct {
  font-size: 0.62rem;
  font-weight: 800;
  opacity: 0.62;
  line-height: 1;
}

.dash-mini-status {
  font-size: 0.68rem;
  font-weight: 800;
}

.dash-mini.tone-humid { --mini-tone: #2aa36a; }
.dash-mini.tone-rain { --mini-tone: #2f6fbf; }
.dash-mini.tone-oxy { --mini-tone: #1f8f8a; }
.dash-mini.tone-sea { --mini-tone: #2f7fd0; }
.dash-mini.tone-cloud { --mini-tone: #c98900; }
.dash-mini.tone-pchange { --mini-tone: #d45345; }
.dash-mini.tone-thigh { --mini-tone: #2f7fd0; }
.dash-mini.tone-tlow { --mini-tone: #c45b55; }

.dash-mini.tone-excellent { --mini-tone: #2aa36a; }
.dash-mini.tone-good { --mini-tone: #2aa36a; }
.dash-mini.tone-mid { --mini-tone: #c98900; }
.dash-mini.tone-poor { --mini-tone: #d48a2a; }
.dash-mini.tone-bad { --mini-tone: #d45345; }
.dash-mini.tone-danger { --mini-tone: #c45b55; }

.dash-mini.is-selected {
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--mini-tone) 45%, transparent),
    0 14px 28px color-mix(in srgb, var(--mini-tone) 20%, transparent);
}

#factorMiniGrid .dash-mini-status {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
  line-height: 1.2;
  font-size: 0.62rem;
}

.dash-mini.is-ignored {
  --mini-tone: #8a9aaa;
  background: #f4f6f8;
  box-shadow: none;
  border: 1.5px dashed #c5d0d8;
  opacity: 0.82;
}

.dash-mini.is-ignored:hover,
.dash-mini.is-ignored:focus-visible {
  transform: none;
  box-shadow: none;
}

/* Weather minis: own glass card, one horizontal row */
.weather-minis-panel {
  padding: 0.85rem 0.9rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.28)),
    var(--glass-bg);
}

.dash-mini-grid.is-horizontal {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  gap: 0.5rem;
  grid-template-columns: none;
  grid-template-rows: auto;
  padding-bottom: 0.2rem;
}

.dash-mini-grid.is-horizontal .dash-mini {
  flex: 0 0 7.1rem;
}

.weather-minis-panel .dash-mini {
  min-height: 7.1rem;
}

/* Moon hidden: score + grid only */
.dash-hero.is-moon-hidden {
  display: flex;
  flex-direction: column;
}
.dash-hero.is-moon-hidden .moon-phase-card,
.dash-hero.is-moon-hidden .score-moon-sep {
  display: none;
}

/* Notes stay but quieter */
.decision-notes-hint {
  margin-top: 0.25rem;
}

/* =============================================================================
   3. BOTTOM METRIC ROW — 2×2 readable widgets (not viewport-based columns)
   ============================================================================= */
.decision-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 0;
  width: 100%;
}

#decisionCard .metric-chip {
  --metric-accent: #2aa7b0;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 0.35rem !important;
  min-width: 0;
  min-height: 0;
  padding: 0.7rem 0.75rem 0.6rem;
  border: 0 !important;
  border-top: 8px solid var(--metric-accent) !important;
  border-radius: 18px;
  background: #fbf8f1 !important;
  box-shadow:
    0 10px 22px rgba(80, 120, 160, 0.13),
    0 2px 4px rgba(80, 120, 160, 0.06);
  overflow: hidden;
  direction: rtl;
  text-align: start;
}

html.lang-en #decisionCard .metric-chip {
  direction: ltr;
}

#decisionCard .metric-chip::before,
#decisionCard .metric-chip::after {
  content: none !important;
  display: none !important;
}

#decisionCard .metric-chip.rec-good { --metric-accent: #2db36e; }
#decisionCard .metric-chip.rec-caution { --metric-accent: #e0a000; }
#decisionCard .metric-chip.rec-bad { --metric-accent: #e25545; }

#decisionCard .metric-chip-head {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

#decisionCard .metric-icon {
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  flex-shrink: 0;
  margin: 0;
  border-radius: 50%;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.5) 0%, transparent 42%),
    linear-gradient(180deg, var(--metric-accent) 0%, color-mix(in srgb, var(--metric-accent) 78%, #111) 100%);
  border: 0;
  box-shadow:
    0 4px 10px color-mix(in srgb, var(--metric-accent) 38%, transparent),
    inset 0 1px 2px rgba(255, 255, 255, 0.5),
    inset 0 -2px 3px rgba(0, 0, 0, 0.18);
}

#decisionCard .metric-icon i,
#decisionCard .metric-dir {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  font-family: var(--font-en), sans-serif;
  line-height: 1;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

#decisionCard .metric-dir {
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

#decisionCard .metric-lbl {
  font-size: 0.88rem;
  font-weight: 800;
  color: #2c4a5c;
  margin: 0;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#decisionCard .metric-val {
  display: block;
  font-family: var(--font-en), sans-serif;
  font-size: 1.28rem;
  font-weight: 800;
  color: #1b3146;
  letter-spacing: -0.03em;
  line-height: 1.25;
  text-align: start;
  direction: ltr;
  unicode-bidi: isolate;
  padding-inline-start: 0.1rem;
  word-break: break-word;
}

#decisionCard .metric-foot {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-top: 0.15rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(60, 90, 110, 0.12);
}

#decisionCard .metric-mood {
  position: static !important;
  display: block;
  width: auto;
  height: auto;
  flex-shrink: 0;
  background: none !important;
  box-shadow: none !important;
  border-radius: 0;
  font-size: 1.05rem;
  line-height: 1;
  filter: none;
}

#decisionCard .metric-mood i {
  display: none;
}

#decisionCard .metric-ideal {
  margin: 0;
  min-width: 0;
  font-size: 0.68rem;
  font-weight: 700;
  color: #8a9eae;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: end;
}

html[data-theme="dark"] #decisionCard .metric-chip,
html[data-theme="dark"] #decisionCard .metric-chip.rec-good,
html[data-theme="dark"] #decisionCard .metric-chip.rec-caution,
html[data-theme="dark"] #decisionCard .metric-chip.rec-bad {
  background: #1a2e3c !important;
}
html[data-theme="dark"] #decisionCard .metric-val { color: #eef5f9; }
html[data-theme="dark"] #decisionCard .metric-lbl { color: #d7e8f0; }
html[data-theme="dark"] #decisionCard .metric-ideal { color: #9bb4c0; }
html[data-theme="dark"] #decisionCard .metric-foot {
  border-top-color: rgba(255, 255, 255, 0.1);
}

.score-moon-col-score .btn-score-breakdown {
  top: 0;
  left: 0;
}

/* =============================================================================
   Responsive
   ============================================================================= */
@media (max-width: 1100px) {
  .digi-clock { width: auto; }
  .digi-clock.is-duration { width: auto; }
  .digi-num {
    width: 2.05rem;
    font-size: 1.12rem;
  }
  .digi-colon { font-size: 1.12rem; }
  .cal-leaf { width: auto; }
  .dash-hero {
    display: flex;
    flex-direction: column;
  }
  .dash-hero.is-moon-hidden {
    display: flex;
    flex-direction: column;
  }
  .dash-mini-grid.is-horizontal {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.5rem;
  }
  .dash-mini-grid.is-horizontal .dash-mini {
    flex: 0 0 7.2rem;
  }
}

@media (max-width: 760px) {
  .dash-top {
    flex-direction: column;
    min-height: 0;
    gap: 0.75rem;
  }
  .trip-clocks {
    width: 100%;
    justify-content: center;
  }
  .dash-cal-cluster {
    width: 100%;
  }
  .cal-leaf {
    width: auto;
  }
  .cal-leaf-day { font-size: 1.7rem; }
  .dash-hero {
    display: flex;
    flex-direction: column;
  }
  #factorMiniGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
  }
  .dash-mini-grid.is-horizontal {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.5rem;
    padding-bottom: 0.2rem;
  }
  .dash-mini-grid.is-horizontal .dash-mini {
    flex: 0 0 7.1rem;
    min-height: 6.9rem;
  }
  .moon-phase-card { max-width: none; }
  .score-ring { width: 148px; height: 148px; }
  .score-number { font-size: 2.2rem; }
}

@media (max-width: 420px) {
  #factorMiniGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #factorMiniGrid .dash-mini {
    min-height: 0;
    padding: 0.45rem 0.32rem 0.35rem;
  }
  #factorMiniGrid .dash-mini-label {
    font-size: 0.62rem;
  }
  .metric-val { font-size: 1.15rem; }
  #decisionCard .metric-chip { padding: 0.65rem 0.65rem 0.5rem; }
  #decisionCard .metric-icon { width: 2rem; height: 2rem; }
  #decisionCard .metric-lbl { font-size: 0.8rem; }
  #decisionCard .metric-ideal { font-size: 0.62rem; }
}

/* Dark mode polish */
html[data-theme="dark"] .cal-leaf {
  background: rgba(20, 34, 46, 0.78);
}
html[data-theme="dark"] .cal-leaf-month,
html[data-theme="dark"] .cal-leaf-weekday,
html[data-theme="dark"] .cal-leaf-year {
  color: #b7cbd6;
}
html[data-theme="dark"] .moon-stage {
  background: transparent;
}
html[data-theme="dark"] .moon-phase-name { color: #f0f5f8; }
html[data-theme="dark"] .moon-phase-illum { color: #7ec8e3; }
html[data-theme="dark"] .score-number { color: #f2f6f9; }
html[data-theme="dark"] .score-ring::before {
  background: radial-gradient(circle at 50% 42%, #173044 0%, #0e2230 78%);
}
html[data-theme="dark"] .dash-mini {
  background: #163044;
}
html[data-theme="dark"] .dash-mini.is-ignored {
  background: rgba(22, 48, 68, 0.45);
  border-color: rgba(255, 255, 255, 0.18);
}
html[data-theme="dark"] .day-nav-hint { color: #9bb4c0; }

/* =============================================================================
   Times view (solunar) — compact, no wrapping clocks
   ============================================================================= */
.solunar-panel {
  overflow: visible;
}

.solunar-summary {
  align-items: stretch;
  gap: 0.4rem;
  padding: 0.65rem 0.55rem;
}

.solunar-summary-main {
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
}

.solunar-summary-text {
  font-size: 0.8rem;
  line-height: 1.45;
  font-weight: 700;
  max-width: 100%;
}

.solunar-body {
  padding: 0.8rem 0.7rem 0.9rem;
}

.solunar-heading {
  font-size: 0.88rem;
  margin: 0 0 0.65rem;
}

.solunar-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  align-items: start;
}

.solunar-col-title {
  font-size: 0.75rem;
  margin: 0 0 0.4rem;
}

.solunar-list {
  gap: 0.45rem;
}

.solunar-period {
  padding: 0.5rem 0.5rem 0.45rem;
  min-width: 0;
}

.solunar-period-top {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}

.solunar-period-dot {
  width: 0.85rem;
  height: 0.85rem;
  margin-top: 0.22rem;
  border-width: 2.5px;
}

.solunar-period-main {
  min-width: 0;
  flex: 1;
}

.solunar-period-activity {
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.3;
  flex-wrap: nowrap;
}

.solunar-period-time {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 0.22rem;
  margin-top: 0.28rem;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  color: var(--sea-800);
}

.solunar-clock {
  font-family: var(--font-en), var(--font-ar), sans-serif;
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
  flex: 0 0 auto;
}

.solunar-time-sep {
  flex: 0 0 auto;
  opacity: 0.55;
  font-weight: 800;
}

.solunar-period-label {
  margin-top: 0.12rem;
  font-size: 0.68rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.solunar-period-pct {
  font-size: 0.78rem;
  padding: 0.12rem 0.38rem;
  align-self: flex-start;
}

.solunar-period-note {
  margin: 0.32rem 0 0;
  font-size: 0.66rem;
  line-height: 1.35;
  font-family: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.solunar-theory {
  margin-top: 0.65rem !important;
  font-size: 0.68rem;
  line-height: 1.45;
}

.activity-gauge-ring {
  width: 148px;
  height: 148px;
}

.activity-gauge-center {
  font-size: 1.95rem;
}

.activity-gauge-ar {
  font-size: 0.95rem;
}

.activity-gauge-en {
  font-size: 0.82rem;
}

.solunar-chart-wrap {
  margin-top: 0.55rem;
  height: 148px;
  padding: 0.4rem 0.25rem 0.15rem;
}

/* --- Solunar cards redesign (match reference style) --- */
.solunar-cols {
  gap: 0.9rem;
}

.solunar-col-title {
  font-size: 0.86rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
}

.solunar-list {
  gap: 0.72rem;
}

.solunar-period {
  border-radius: 20px;
  padding: 0.65rem 0.7rem;
  border-width: 1.5px;
  box-shadow: 0 8px 18px rgba(35, 70, 110, 0.08);
}

.solunar-period.tone-mid,
.solunar-period.tone-good,
.solunar-period.tone-excellent {
  border-color: rgba(68, 142, 82, 0.35);
  background: linear-gradient(180deg, #fbfff8 0%, #f6fcf1 100%);
}

.solunar-period.tone-poor,
.solunar-period.tone-bad {
  border-color: rgba(214, 141, 56, 0.45);
  background: linear-gradient(180deg, #fffaf1 0%, #fff5e8 100%);
}

.solunar-card-layout {
  display: grid;
  grid-template-columns: 78px 1fr;
  align-items: center;
  gap: 0.68rem;
}

.solunar-pct-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  position: relative;
  display: grid;
  place-items: center;
  background: conic-gradient(#2c9a45 var(--ring-fill, 180deg), #e6ece8 0deg);
}

.solunar-period.tone-mid .solunar-pct-ring,
.solunar-period.tone-good .solunar-pct-ring,
.solunar-period.tone-excellent .solunar-pct-ring {
  background: conic-gradient(#2c9a45 var(--ring-fill, 180deg), #e6ece8 0deg);
}

.solunar-period.tone-poor .solunar-pct-ring,
.solunar-period.tone-bad .solunar-pct-ring {
  background: conic-gradient(#8e8e8e var(--ring-fill, 118deg), #ececec 0deg);
}

.solunar-pct-ring::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #fff;
}

.solunar-pct-ring .solunar-period-pct {
  position: relative;
  z-index: 1;
  font-size: 0.98rem;
  font-weight: 900;
  color: #2a3f53;
  background: transparent !important;
  padding: 0;
}

.solunar-period-maincopy {
  min-width: 0;
  padding-inline-start: 0.52rem;
  border-inline-start: 1px dashed rgba(74, 104, 130, 0.28);
}

.solunar-period-row {
  gap: 0.42rem;
  justify-content: flex-start;
}

.solunar-period-icon {
  font-size: 1.7rem;
}

.solunar-period-activity-text {
  font-size: 0.86rem;
  font-weight: 900;
  color: #16344b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.solunar-period-time-row {
  margin-top: 0.18rem;
  font-size: 0.94rem;
  font-weight: 900;
  color: #0e3c60;
}

.solunar-clock {
  font-size: 0.94rem;
}

html[data-theme="dark"] .solunar-period {
  box-shadow: none;
}

html[data-theme="dark"] .solunar-period-maincopy {
  border-inline-start-color: rgba(255, 255, 255, 0.2);
}

html[data-theme="dark"] .solunar-pct-ring::after {
  background: #132736;
}

html[data-theme="dark"] .solunar-pct-ring .solunar-period-pct {
  color: #e9f4fb;
}

/* =============================================================================
   Sea view — mobile cards instead of a wide web table
   ============================================================================= */
.marine-slots-panel,
.marine-chart-panel {
  padding: 0.85rem 0.75rem 0.85rem;
}

.slots-head,
.chart-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}

.slots-head .section-title,
.chart-head .section-title {
  font-size: 0.95rem;
}

.slots-day-nav {
  justify-content: center;
  width: 100%;
}

.slots-date-badge {
  min-width: 0;
  flex: 1;
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slots-intro {
  font-size: 0.75rem;
  line-height: 1.5;
}

.marine-slot-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.marine-slot-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.85rem 0.8rem;
  box-shadow: 0 6px 16px rgba(80, 120, 160, 0.07);
}

.marine-slot-card.warn-caution {
  border-color: rgba(224, 168, 0, 0.4);
  background: linear-gradient(180deg, rgba(224, 168, 0, 0.1), rgba(255, 255, 255, 0.72));
}

.marine-slot-card.warn-danger {
  border-color: rgba(226, 85, 69, 0.4);
  background: linear-gradient(180deg, rgba(226, 85, 69, 0.1), rgba(255, 255, 255, 0.72));
}

.marine-slot-head {
  display: none;
}

.marine-slot-weather {
  display: none;
}

.marine-slot-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.7rem;
}

.marine-slot-icon-big {
  flex-shrink: 0;
}

.marine-slot-icon-big img,
.marine-slot-icon-big i {
  font-size: 2.4rem;
  color: var(--sea-700);
}

.marine-slot-icon-big img {
  width: 2.6rem;
  height: 2.6rem;
}

.marine-slot-header-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
}

.marine-slot-card .slot-hour {
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--sea-800);
}

.marine-slot-weather-text {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--ink);
}

.marine-slot-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}

.marine-slot-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.22rem;
  padding: 0.55rem 0.3rem;
  border-radius: 14px;
  background: rgba(18, 130, 162, 0.07);
}

.marine-slot-chip i {
  font-size: 1.5rem;
  color: var(--sea-700);
}

.marine-slot-chip-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--muted);
}

.marine-slot-chip-val {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.3;
  text-align: center;
}

.marine-slot-grid { display: none; }
.marine-slot-item { display: none; }

.chart-legend-inline {
  justify-content: flex-start;
  gap: 0.55rem 0.85rem;
  font-size: 0.7rem;
}

.chart-canvas-wrap {
  height: 196px;
}

html[data-theme="dark"] .marine-slot-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .marine-slot-card.warn-caution {
  background: linear-gradient(180deg, rgba(224, 168, 0, 0.14), rgba(255, 255, 255, 0.04));
}

html[data-theme="dark"] .marine-slot-card.warn-danger {
  background: linear-gradient(180deg, rgba(226, 85, 69, 0.14), rgba(255, 255, 255, 0.04));
}

html[data-theme="dark"] .marine-slot-chip {
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .marine-slot-item {
  background: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .marine-slot-item dd {
  color: #e8f2f7;
}

/* =============================================================================
   Solunar cards final fix (clean reference-like layout)
   ============================================================================= */
.solunar-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.solunar-col-title {
  text-align: center;
  font-size: 0.92rem;
  font-weight: 900;
  margin: 0 0 0.45rem;
}

.solunar-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.solunar-period {
  border-radius: 22px;
  padding: 0.7rem 0.72rem;
  border: 2px solid transparent;
  box-shadow: 0 6px 16px rgba(30, 60, 100, 0.08);
  overflow: hidden;
}

.solunar-period.tone-excellent,
.solunar-period.tone-good,
.solunar-period.tone-mid {
  background: linear-gradient(180deg, #fbfff8 0%, #f3fbef 100%);
  border-color: rgba(72, 156, 84, 0.35);
}

.solunar-period.tone-poor,
.solunar-period.tone-bad {
  background: linear-gradient(180deg, #fffaf1 0%, #fff3e2 100%);
  border-color: rgba(226, 160, 80, 0.45);
}

.solunar-card-layout {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  direction: ltr;
}

.solunar-card-layout > .solunar-pct-ring {
  flex: 0 0 74px;
}

.solunar-pct-ring {
  width: 74px;
  height: 74px;
  border-radius: 999px;
  position: relative;
  display: grid;
  place-items: center;
  background: conic-gradient(#2f9e44 var(--ring-fill, 0deg), #e5e7eb 0deg);
}

.solunar-period.tone-poor .solunar-pct-ring,
.solunar-period.tone-bad .solunar-pct-ring {
  background: conic-gradient(#8c8f94 var(--ring-fill, 0deg), #e5e7eb 0deg);
}

.solunar-pct-ring::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 999px;
  background: #fff;
}

.solunar-period-pct {
  position: relative;
  z-index: 1;
  font-size: 0.78rem;
  font-weight: 900;
  color: #2b3f55;
  padding: 0 !important;
  background: transparent !important;
}

.solunar-period.tone-excellent .solunar-period-pct,
.solunar-period.tone-good .solunar-period-pct,
.solunar-period.tone-mid .solunar-period-pct {
  color: #1d8f3d;
}

.solunar-period.tone-poor .solunar-period-pct,
.solunar-period.tone-bad .solunar-period-pct {
  color: #5e6671;
}

.solunar-period-maincopy {
  min-width: 0;
  flex: 1 1 auto;
  border-inline-start: 1px dashed rgba(120, 140, 160, 0.45);
  padding-inline-start: 0.62rem;
  direction: rtl;
}

html.lang-en .solunar-period-maincopy {
  direction: ltr;
}

.solunar-period-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.solunar-period-icon {
  font-size: 1.45rem;
  line-height: 1;
  flex-shrink: 0;
}

.solunar-period-activity-text {
  font-size: 0.9rem;
  font-weight: 900;
  color: #18384f;
  white-space: nowrap;
}

.solunar-period-time-row {
  margin-top: 0.18rem;
  font-size: 0.92rem;
  font-weight: 900;
  color: #0f4167;
  white-space: nowrap;
  direction: rtl;
  unicode-bidi: isolate;
}

.solunar-clock {
  font-size: 0.92rem;
  direction: rtl;
  unicode-bidi: isolate;
}

html.lang-en .solunar-period-time-row,
html.lang-en .solunar-clock {
  direction: ltr;
}

@media (max-width: 760px) {
  .solunar-card-layout > .solunar-pct-ring {
    flex-basis: 66px;
  }
  .solunar-pct-ring {
    width: 66px;
    height: 66px;
  }
  .solunar-pct-ring::after {
    inset: 7px;
  }
  .solunar-period-pct {
    font-size: 0.74rem;
  }
  .solunar-period-icon {
    font-size: 1.34rem;
  }
  .solunar-period-activity-text {
    font-size: 0.8rem;
  }
  .solunar-period-time-row,
  .solunar-clock {
    font-size: 0.8rem;
  }
}

@media (max-width: 420px) {
  .solunar-card-layout > .solunar-pct-ring {
    flex-basis: 60px;
  }
  .solunar-pct-ring {
    width: 60px;
    height: 60px;
  }
  .solunar-period-pct {
    font-size: 0.68rem;
  }
  .solunar-period-activity-text {
    font-size: 0.73rem;
  }
  .solunar-period-time-row,
  .solunar-clock {
    font-size: 0.72rem;
  }
}

/* =============================================================================
   Solunar cards fallback (no circular gauges)
   ============================================================================= */

.solunar-cols {
  gap: 0.7rem;
}

.solunar-col-title {
  font-size: 0.9rem;
  font-weight: 900;
  text-align: center;
}

.solunar-period {
  border-radius: 18px;
  padding: 0.65rem 0.7rem;
  border: 1.5px solid var(--border);
  box-shadow: 0 4px 12px rgba(30, 60, 100, 0.06);
}

.solunar-period-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.solunar-period-icon {
  font-size: 1.25rem;
}

.solunar-period-activity-text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.solunar-period-pct {
  font-size: 0.9rem;
  font-weight: 900;
  padding: 0.12rem 0.4rem !important;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72) !important;
}

.solunar-period-time-row {
  margin-top: 0.22rem;
  font-size: 0.86rem;
  font-weight: 800;
  color: #0f4167;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.solunar-clock {
  font-size: 0.86rem;
}
