/* 版4.0（2026-10-03）トップの再構成。他のCSSのあとに読み込み、上書きだけを行う。
   色は style.css の --brand-* を使い、新しい色は作らない。
   並び順：保存済みなら「あなたの今日」が最初、未保存なら「今日の一行」のすぐ下に入力欄。 */

.home-flow { display: flex; flex-direction: column; }
.home-flow > * { order: 10; }
.home-flow > #daily-preview { order: 0; }
.home-flow > #you-today-result { order: 1; }
.home-flow > #today-card { order: 2; }
.home-flow > #you-today-prompt { order: 3; }
.home-flow > #birthdate-status { order: 4; }
.home-flow > #today-facts-card { order: 4; }

/* 5分でできること */
.today-action-label,
.you-today-do .today-action-label {
  display: inline-block;
  margin: 0 .6em .2em 0;
  padding: .1em .7em;
  font-size: .78rem;
  font-weight: 900;
  line-height: 1.7;
  color: #fff;
  background: var(--brand-rose, #b42364);
  border-radius: 999px;
  vertical-align: middle;
}
.home-today-card .today-action { font-size: 1.05rem; line-height: 1.9; }

/* 十二直の翻訳語と1行注記 */
.today-facts .fact-word {
  display: block;
  margin-top: .15em;
  font-size: .8rem;
  font-style: normal;
  font-weight: 900;
  color: var(--brand-rose, #b42364);
}
.facts-note {
  margin: 8px 0 0;
  font-size: .78rem;
  line-height: 1.7;
  color: #6b5a74;
}
.facts-note.caution-note { font-size: .82rem; }

/* 今日の一行は長めの文なので、スマホでは全幅で読み、画像は小さく添える */
@media (max-width: 620px) {
  .home-today-card .daily-thought-main {
    grid-template-columns: minmax(0, 1fr) clamp(84px, 24vw, 120px);
    grid-template-rows: auto auto auto;
    gap: 6px 8px;
    padding: 14px 14px 12px;
  }
  .home-today-card .daily-translator { grid-column: 1 / -1; grid-row: 1; }
  .home-today-card .today-headline {
    grid-column: 1 / -1; grid-row: 2;
    margin: 2px 0 0;
    font-size: clamp(1.18rem, 5.4vw, 1.4rem);
    line-height: 1.75;
  }
  .home-today-card .today-action { grid-column: 1; grid-row: 3; align-self: end; }
  .home-today-card .daily-translator-image { grid-column: 2; grid-row: 3; align-self: end; max-height: 150px; }
  .home-today-card .home-page-title { font-size: .95rem; }
}

/* あなたの今日 */
#you-today-result .you-today-date {
  display: inline-block;
  margin-left: .5em;
  font-size: .8rem;
  font-weight: 700;
  color: var(--brand-rose, #b42364);
}
#you-today-result .you-today-relation-row { margin: 12px 0; padding: 14px 16px; }
#you-today-result .you-today-relation-col { width: 100%; }
#you-today-result .you-today-shuku-name {
  margin: 0;
  font-family: var(--font-display, inherit);
  font-size: clamp(1.4rem, 6vw, 1.9rem);
  font-weight: 900;
  line-height: 1.5;
  color: var(--brand-ink, #392447);
}
#you-today-result #you-today-relation-name { font-size: clamp(.98rem, 3.8vw, 1.15rem); line-height: 1.7; }
.you-today-v4 { margin: 4px 0 12px; }
.you-today-v4 .you-today-state {
  margin: 0 0 8px;
  font-size: clamp(1.15rem, 5vw, 1.4rem);
  font-weight: 900;
  line-height: 1.75;
  color: var(--brand-ink, #392447);
}
.you-today-v4 .you-today-meaning { margin: 0 0 12px; line-height: 1.9; }
.you-today-v4 .you-today-do {
  margin: 0;
  padding: 12px 14px;
  font-weight: 700;
  line-height: 1.9;
  background: #fff;
  border: 2px solid var(--brand-ink, #392447);
  border-radius: 14px;
}

/* 入力欄（未保存のとき、今日の一行のすぐ下） */
#you-today-prompt { margin-top: 16px; }

/* 事実カード（六曜・十二直・二十八宿）は低くして、1画面目に入力欄が届くようにする */
.today-card .today-facts { gap: 8px; margin: 10px 0 0; }
.today-card .today-facts > div { min-height: 0; padding: 8px 10px; }
.today-card .today-facts dt { font-size: .78rem; }
.today-card .today-facts dd { margin-top: 2px; font-size: 1.05rem; line-height: 1.5; }
.today-card .today-facts dd small { display: inline; font-size: .72rem; }

/* お守りはカードの外に出したので、カードと同じ幅・余白を持たせる */
.home-flow > #daily-charm { order: 5; margin: 16px 0 0; }
.home-flow > #you-today-prompt { margin-top: 14px; }

/* お日柄カードは一行カードの下に別カードとして置く */
.home-facts-card { margin-top: 16px; padding: 14px 16px; min-height: 0; }
.home-facts-card::after { content: none; display: none; }
.home-facts-card .today-facts { margin-top: 0; }
@media (min-width: 621px) {
  .home-facts-card { display: block; }
}

/* .home-flow で包んだため main 直下の指定が効かなくなった「黒背景上の案内リンク」を、白で読めるようにする */
.home-flow > .search-entry-links,
.home-flow > .search-entry-links a { color: #fffdf9; }
.home-flow > .search-entry-links a { text-decoration-color: rgba(255, 255, 255, .7); }

/* トップだけフッターがクリーム色なので、運営者の行はこの面に合う濃い色にする */
.site-footer .footer-credit { color: var(--brand-ink, #392447); }
.site-footer .footer-credit a { color: var(--brand-rose, #b42364); text-decoration: underline; }
