/* ============================================================
   Horoscope Fortune — スマホ向けCSS
   ============================================================ */

#hf-app {
  font-family: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
  max-width: 480px;
  margin: 0 auto;
  background: #0b0b1a;
  color: #f0eaff;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.hf-hidden { display: none !important; }

/* ─── ヒーロー ─── */
.hf-hero {
  position: relative;
  background: linear-gradient(160deg, #1a0a2e 0%, #0b0b1a 60%);
  padding: 56px 24px 40px;
  text-align: center;
  overflow: hidden;
}
.hf-stars-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, #fff 1px, transparent 1px),
    radial-gradient(circle, #c9b8ff 1px, transparent 1px);
  background-size: 40px 40px, 70px 70px;
  background-position: 0 0, 20px 20px;
  opacity: 0.25;
  pointer-events: none;
}
.hf-logo {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #e8d5ff;
  text-shadow: 0 0 20px #b084ff88;
  margin-bottom: 10px;
}
.hf-sub {
  font-size: 14px;
  color: #b8a0d8;
  line-height: 1.7;
  margin: 0;
}

/* ─── フォームエリア ─── */
.hf-form-area {
  padding: 32px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.hf-label {
  font-size: 13px;
  color: #b8a0d8;
  letter-spacing: 0.05em;
}
.hf-date-input {
  width: 100%;
  padding: 14px 16px;
  background: #1a1230;
  border: 1px solid #4a3570;
  border-radius: 12px;
  color: #f0eaff;
  font-size: 16px;
  font-family: inherit;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}
.hf-date-input:focus {
  outline: none;
  border-color: #9b6ef0;
  box-shadow: 0 0 0 3px #9b6ef022;
}
.hf-btn-main {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s, opacity 0.15s;
}
.hf-btn-main:active { transform: scale(0.97); opacity: 0.9; }
.hf-btn-icon { font-size: 20px; }
.hf-err {
  font-size: 13px;
  color: #f87171;
  text-align: center;
  min-height: 18px;
  margin: 0;
}

/* ─── 結果画面ヘッダー ─── */
.hf-result-header {
  background: #1a0a2e;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #2e1c50;
  position: sticky;
  top: 0;
  z-index: 10;
}
.hf-back-btn {
  background: none;
  border: 1px solid #4a3570;
  border-radius: 8px;
  color: #c9b8ff;
  font-size: 13px;
  padding: 6px 12px;
  font-family: inherit;
  cursor: pointer;
}
.hf-sign-display {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hf-sign-icon { font-size: 24px; }
.hf-sign-name {
  font-size: 18px;
  font-weight: 700;
  color: #e8d5ff;
}

/* ─── セクション共通 ─── */
.hf-section {
  padding: 24px 20px 0;
}
.hf-section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #9b6ef0;
  margin-bottom: 14px;
}

/* ─── カード ─── */
.hf-today-card,
.hf-tomorrow-card {
  background: #1a1230;
  border: 1px solid #3d2870;
  border-radius: 16px;
  padding: 20px;
}
.hf-yesterday-card {
  background: #120d1e;
  border: 1px solid #2a1e42;
  border-radius: 16px;
  padding: 16px 20px;
}
.hf-today-card { border-color: #6d28d9; }
.hf-tomorrow-card { border-color: #2d4e8a; }

/* ─── 星評価 ─── */
.hf-stars-row {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}
.hf-star {
  font-size: 22px;
  transition: transform 0.2s;
}
.hf-star.on { color: #f9c940; }
.hf-star.off { color: #3a2d52; }

/* ─── メインメッセージ ─── */
.hf-main-msg {
  font-size: 15px;
  line-height: 1.75;
  color: #e8d5ff;
  margin: 0 0 16px;
}

/* ─── サブスコア（恋愛・仕事・健康） ─── */
.hf-sub-scores {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.hf-sub-item {
  flex: 1;
  min-width: 80px;
  background: #0e0920;
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
}
.hf-sub-label {
  font-size: 11px;
  color: #9b6ef0;
  margin-bottom: 4px;
  letter-spacing: 0.05em;
}
.hf-sub-bar-wrap {
  height: 6px;
  background: #2a1e42;
  border-radius: 3px;
  overflow: hidden;
}
.hf-sub-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s ease;
}
.hf-sub-bar.love { background: #f472b6; }
.hf-sub-bar.work { background: #60a5fa; }
.hf-sub-bar.health { background: #34d399; }

/* ─── ラッキーグリッド ─── */
.hf-lucky-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.hf-lucky-item {
  background: #0e0920;
  border-radius: 10px;
  padding: 10px 12px;
}
.hf-lucky-label {
  font-size: 10px;
  color: #7c5cbf;
  letter-spacing: 0.05em;
  margin-bottom: 3px;
}
.hf-lucky-value {
  font-size: 13px;
  font-weight: 600;
  color: #e8d5ff;
}

/* ─── アドバイスボックス ─── */
.hf-advice-box {
  background: linear-gradient(135deg, #1e0f38, #0f1e38);
  border-left: 3px solid #9b6ef0;
  border-radius: 0 8px 8px 0;
  padding: 12px 14px;
  font-size: 13px;
  color: #c9b0f0;
  line-height: 1.7;
}
.hf-advice-label {
  font-size: 10px;
  color: #9b6ef0;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

/* ─── 週間グラフ ─── */
.hf-week-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.hf-week-chart {
  display: flex;
  gap: 6px;
  min-width: max-content;
  align-items: flex-end;
  padding: 0 4px 8px;
}
.hf-week-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  width: 52px;
  padding: 10px 4px 8px;
  border-radius: 12px;
  border: 2px solid transparent;
  transition: background 0.2s, border-color 0.2s;
  background: #1a1230;
}
.hf-week-col:active { opacity: 0.8; }
.hf-week-col.active {
  border-color: #9b6ef0;
  background: #2a1650;
}
.hf-week-col.today .hf-week-day {
  color: #f9c940;
  font-weight: 700;
}
.hf-week-day {
  font-size: 12px;
  color: #9b6ef0;
}
.hf-week-bar-wrap {
  width: 28px;
  height: 80px;
  background: #0e0920;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.hf-week-bar {
  width: 100%;
  border-radius: 6px 6px 0 0;
  transition: height 0.7s cubic-bezier(.4,0,.2,1);
}
.hf-week-bar.score-5 { background: linear-gradient(180deg, #f9c940, #e07b00); }
.hf-week-bar.score-4 { background: linear-gradient(180deg, #a78bfa, #7c3aed); }
.hf-week-bar.score-3 { background: linear-gradient(180deg, #60a5fa, #2563eb); }
.hf-week-bar.score-2 { background: linear-gradient(180deg, #34d399, #059669); }
.hf-week-bar.score-1 { background: linear-gradient(180deg, #94a3b8, #475569); }
.hf-week-score {
  font-size: 10px;
  color: #c9b8ff;
}
.hf-week-date {
  font-size: 10px;
  color: #7c5cbf;
}

/* ─── 週間詳細 ─── */
.hf-week-detail {
  margin: 14px 0 32px;
  background: #1a1230;
  border: 1px solid #3d2870;
  border-radius: 14px;
  padding: 18px;
  display: none;
}
.hf-week-detail.show { display: block; }
.hf-detail-date {
  font-size: 12px;
  color: #9b6ef0;
  margin-bottom: 8px;
}
.hf-detail-stars { margin-bottom: 10px; }

/* ─── レスポンシブ ─── */
@media (min-width: 480px) {
  #hf-app {
    border-radius: 16px;
    box-shadow: 0 8px 40px #0008;
    margin: 20px auto;
    min-height: auto;
  }
}

/* ─── アニメーション ─── */
@keyframes hf-slide-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hf-section {
  animation: hf-slide-in 0.4s ease both;
}
.hf-section:nth-child(1) { animation-delay: 0.05s; }
.hf-section:nth-child(2) { animation-delay: 0.1s; }
.hf-section:nth-child(3) { animation-delay: 0.15s; }
.hf-section:nth-child(4) { animation-delay: 0.2s; }
