
.home-head {
  --today-moon-width: 12rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--today-moon-width);
  grid-template-areas: "greet greet" "title badge";
  align-items: center;
  column-gap: 12px;
  row-gap: 10px;
  margin-bottom: 20px;
}

.moon-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 8px 13px 8px 8px;
  flex-shrink: 0;
}
.moon-badge.is-full { border-color: var(--gold); background: linear-gradient(color-mix(in srgb, var(--gold) 9%, transparent), color-mix(in srgb, var(--gold) 9%, transparent)), var(--surface-base, transparent); }
.mb-copy { display: flex; flex-direction: column; line-height: 1.3; }
.mb-copy strong { font-size: 13px; }
.mb-copy span { font-size: 11px; color: var(--text-low); }
.mb-copy:has(.mb-sign) { line-height: 1.2; }
.mb-copy .mb-sign {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  margin-top: 2px;
  padding: 0 7px 0 5px;
  border-radius: 99px;
  font-size: 10px;
  line-height: 13px;
  color: var(--text-mid);
  background: color-mix(in srgb, var(--purple-glow) 16%, var(--surface-underlay, transparent));
  border: 1px solid color-mix(in srgb, var(--purple-glow) 26%, transparent);
  white-space: nowrap;
}
.mb-sign-glyph { display: inline-flex; color: var(--purple-pale); }

.voc-line {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 16px;
  margin: -7.5px 0 5.5px;
  font-size: 12px;
  line-height: 16px;
  color: var(--text-mid);
  white-space: nowrap;
  overflow: hidden;
}
.voc-line[hidden] { display: none; }

.home-head > .home-title { display: contents; }
.home-head .eyebrow { grid-area: greet; margin: 0; }
.home-head .home-title > h1 { grid-area: title; margin: 0; min-inline-size: 0; }
.home-head .moon-badge { grid-area: badge; min-inline-size: 0; }
.home-head .mb-copy { min-inline-size: 0; overflow-wrap: anywhere; }
.home-head .mb-sign { max-inline-size: 100%; white-space: normal; }
.home-head .voc-line { grid-column: 1 / -1; margin: 0; white-space: normal; }
.home-head .voc-detail > span { overflow: visible; text-overflow: clip; }
@media (max-width: 359px) {
  .home-head {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "greet" "title" "badge";
  }
  .home-head .moon-badge { inline-size: min(100%, var(--today-moon-width)); }
}
@media (max-width: 375px) and (max-height: 700px) {
  .home-head { --today-moon-width: 9.375rem; }
}
@media (max-width: 375px) and (max-height: 700px), (max-width: 700px) and (max-height: 375px) and (orientation: landscape) and (pointer: coarse) {
  .fit-screen .voc-line,
  .fit-screen.tle-stacked > .fit-flex > .tle-slot[data-section="voc"] { display: none; }
}
@media (min-width: 360px) and (max-width: 375px) and (max-height: 700px) {
  .home-head .moon-badge {
    min-block-size: 5.125rem;
    padding-inline: 8px;
  }
  .home-head .moon-badge > svg {
    flex: 0 0 auto;
    inline-size: 36px;
    block-size: 36px;
  }
  .home-head .mb-copy { flex: 1; }
}
.home-title .h-serif { margin-bottom: 0; }
.voc-line {
  width: fit-content;
  max-width: 100%;
  text-decoration: none;
  height: auto;
  padding-inline-start: 10px;
  border-inline-start: 2px solid color-mix(in srgb, var(--purple-glow) 55%, transparent);
  line-height: normal;
}
.voc-text { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.voc-label {
  font-size: 8.5px;
  line-height: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-low);
  white-space: normal;
}
[dir="rtl"] .voc-label { letter-spacing: 0; font-size: 9.5px; }
.voc-detail { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 11.5px; line-height: 14px; color: var(--text-hi); }
.voc-detail > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.voc-dot {
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--purple-bright);
}
.voc-line.is-void { border-inline-start-color: color-mix(in srgb, var(--gold) 70%, transparent); }
.voc-line.is-void .voc-label { color: var(--gold); }
.voc-line.is-void .voc-dot { background: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold-dim) 34%, transparent); }

.fit-screen :is(.moon-badge:not(.is-full), .dr-pill, .big-cell) {
  background: var(--surface-tint), var(--surface-base, transparent);
}


.big-cell .bg-label { letter-spacing: normal; }
.big-cell .bg-sign { transform: translateY(-0.02em); }

.big-cell.is-unknown .bg-sign { color: var(--text-low); }
.big-cell.is-unknown .bg-glyph { opacity: 0.5; }

.big-cell.is-swapped .bg-label { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 849px) {
  .home-head ~ .fit-flex {
    --wheel-w: min(100cqw, calc(0.78 * var(--screen-h)), 420px, calc(100cqh - var(--below-wheel)));
    --spare: max(0px, calc(100cqh - var(--wheel-w) - var(--below-wheel)));
    --gap-top: min(calc(var(--spare) / 3), 10px);
    --gap-rest: calc((var(--spare) - var(--gap-top)) / 2);
  }
  .home-head ~ .fit-flex > :first-child { margin-top: var(--gap-top); }
  .home-head ~ .fit-flex > .big-three {
    margin-top: calc(10px + var(--gap-rest));
    margin-bottom: calc(var(--cards-after) + var(--gap-rest));
  }
}
@media (max-width: 849px) and (max-height: 560px) {
  .home-head ~ .fit-flex { --wheel-w: min(100cqw, calc(0.62 * var(--screen-h)), 340px, calc(100cqh - var(--below-wheel))); }
}

.mw-rows { display: flex; flex-direction: column; padding: 4px 6px 8px; }
.mw-row { display: grid; grid-template-columns: 5.6em 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 8px; border-radius: var(--r-md); font-size: 13px; color: var(--text-mid); }
.mw-row.is-today { background: color-mix(in srgb, var(--purple-glow) 14%, var(--surface-underlay, transparent)); color: var(--text-hi); }
.mw-date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.mw-glyph { display: inline-flex; justify-content: center; }
.mw-phase { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.mw-phase strong { color: var(--text-hi); font-weight: 600; }
.mw-phase span { font-size: 11.5px; color: var(--text-low); }
.mw-sign { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-size: 12px; }
.mw-sign-glyph { display: inline-flex; color: var(--purple-pale); }
