/* 奇門遁甲 方位鑑定 - デザインシステム（40〜50代向け・和モダン版） */

/* === カラーパレット === */
:root {
  /* プライマリーカラー（藍） */
  --primary-h: 215;
  --primary-s: 42%;
  --primary-l: 36%;
  --primary: hsl(var(--primary-h), var(--primary-s), var(--primary-l));
  --primary-light: hsl(var(--primary-h), 38%, 50%);
  --primary-dark: hsl(var(--primary-h), 48%, 26%);

  /* セカンダリーカラー（金茶） */
  --secondary: hsl(38, 48%, 42%);
  --secondary-light: hsl(38, 52%, 56%);
  --secondary-dark: hsl(38, 50%, 34%);

  /* アクセント（真鍮） */
  --accent: hsl(40, 55%, 48%);

  /* 五行の色（落ち着いたトーン） */
  --wood: hsl(145, 32%, 42%);
  --fire: hsl(8, 52%, 52%);
  --earth: hsl(35, 50%, 48%);
  --metal: hsl(210, 14%, 52%);
  --water: hsl(205, 42%, 46%);

  /* 吉凶の色（沈んだ色味で品よく） */
  --auspicious: hsl(155, 38%, 36%);
  --inauspicious: hsl(8, 52%, 50%);
  --neutral: hsl(36, 50%, 36%);

  /* 背景・文字（生成り＋墨） */
  --bg-primary: hsl(40, 30%, 96%);
  --bg-secondary: hsl(42, 30%, 99%);
  --bg-tertiary: hsl(40, 26%, 93%);
  --text-primary: hsl(215, 20%, 20%);
  --text-secondary: hsl(215, 14%, 36%);
  --text-muted: hsl(215, 14%, 42%);

  /* エフェクト（控えめな影） */
  --shadow-sm: 0 1px 4px rgba(40, 50, 70, 0.08);
  --shadow-md: 0 4px 14px rgba(40, 50, 70, 0.10);
  --shadow-lg: 0 10px 28px rgba(40, 50, 70, 0.14);
  --shadow-glow: 0 0 0 rgba(0, 0, 0, 0);

  /* カード */
  --glass-bg: hsl(42, 30%, 99%);
  --glass-border: hsl(40, 22%, 86%);

  /* トランジション */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 240ms ease-in-out;
  --transition-slow: 380ms ease-out;
}

/* === リセット & ベーススタイル === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.85;
  font-size: 1.06rem;
  overflow-x: hidden;
  min-height: 100vh;
}

/* 落ち着いた和紙風の背景 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 12% 10%, rgba(196, 168, 120, 0.10) 0%, transparent 40%),
    radial-gradient(circle at 88% 90%, rgba(70, 100, 140, 0.08) 0%, transparent 45%);
  pointer-events: none;
  z-index: -1;
}

/* === タイポグラフィ === */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Shippori Mincho', 'Noto Serif JP', serif;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 0.5em;
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  color: var(--primary-dark);
}

h2 {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 2px solid var(--glass-border);
  padding-bottom: 0.5rem;
}

h3 {
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  color: var(--text-primary);
}

/* === レイアウト === */
.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.5rem;
}

header {
  text-align: center;
  padding: 3rem 1.5rem 1.75rem;
  position: relative;
}

.logo {
  font-family: 'Shippori Mincho', serif;
  font-size: clamp(2.2rem, 5.5vw, 3.2rem);
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--primary-dark);
  letter-spacing: 0.14em;
}

.logo-sub {
  display: block;
  font-size: 0.92rem;
  letter-spacing: 0.42em;
  color: var(--secondary-dark);
  font-weight: 500;
  margin-bottom: 0.7rem;
}

.tagline {
  color: var(--text-secondary);
  font-size: 1.04rem;
  font-weight: 400;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.9;
}

/* ヘッダー下の飾り罫 */
header::after {
  content: '';
  display: block;
  width: 64px;
  height: 2px;
  background: var(--secondary);
  margin: 1.25rem auto 0;
}

/* === カード & パネル === */
.card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 1.85rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.glass-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1.5rem;
}

/* 補足メッセージ */
.hint {
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-left: 4px solid var(--secondary);
  border-radius: 8px;
  padding: 0.95rem 1.15rem;
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.85;
}

/* === 九宮図 === */
.qimen-chart {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1.5rem auto 0;
  max-width: 660px;
}

.palace {
  aspect-ratio: 1;
  background: var(--bg-secondary);
  border: 1.5px solid var(--glass-border);
  border-radius: 10px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.palace::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(0, 0, 0, 0.015));
  pointer-events: none;
}

.palace:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  z-index: 10;
}

.palace.auspicious {
  border-color: var(--auspicious);
  background: linear-gradient(135deg, hsl(155, 30%, 95%), var(--bg-secondary));
}

.palace.inauspicious {
  border-color: var(--inauspicious);
  background: linear-gradient(135deg, hsl(8, 45%, 96%), var(--bg-secondary));
}

.palace-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.palace-number {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.05rem;
  font-family: 'Shippori Mincho', serif;
}

.palace-direction {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
}

.palace-layers {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  font-size: 0.82rem;
}

.layer {
  display: flex;
  justify-content: space-between;
  padding: 0.22rem 0.45rem;
  border-radius: 5px;
  background: hsl(40, 26%, 95%);
}

.layer-label {
  color: var(--text-muted);
  font-size: 0.74rem;
}

.layer-value {
  font-weight: 700;
  color: var(--text-primary);
}

/* === フォーム === */
.input-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 1rem;
}

input[type="date"],
input[type="time"],
select {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-secondary);
  border: 1.5px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1.05rem;
  font-family: inherit;
  transition: all var(--transition-fast);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(60, 90, 130, 0.14);
}

button {
  padding: 0.9rem 2rem;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

button:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow-md);
}

button:active {
  transform: translateY(1px);
}

.btn-main {
  font-size: 1.18rem;
  padding: 1rem 3rem;
  background: var(--primary);
  letter-spacing: 0.08em;
}

.btn-main:hover {
  background: var(--primary-dark);
}

button.secondary {
  background: var(--bg-secondary);
  color: var(--primary-dark);
  border: 1.5px solid var(--primary-light);
  box-shadow: none;
}

button.secondary:hover {
  background: var(--bg-tertiary);
}

/* === バッジ === */
.badge {
  display: inline-block;
  padding: 0.25rem 0.85rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
}

.badge.auspicious {
  background: var(--auspicious);
  color: white;
}

.badge.inauspicious {
  background: var(--inauspicious);
  color: white;
}

.badge.neutral {
  background: var(--neutral);
  color: white;
}

/* === 結果表示 === */
.results-section {
  margin-top: 2rem;
}

.direction-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.direction-card {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  border-top: 3px solid var(--primary);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.direction-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.pattern-item {
  padding: 1.1rem 1.25rem;
  margin: 0.6rem 0;
  border-left: 4px solid var(--primary);
  background: var(--bg-secondary);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

/* === レスポンシブ === */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  body {
    font-size: 1.04rem;
  }

  .qimen-chart {
    gap: 0.45rem;
  }

  .palace {
    padding: 0.5rem;
    border-radius: 8px;
  }

  .palace-layers {
    font-size: 0.72rem;
  }

  .direction-list {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 1.3rem;
  }
}

/* === アニメーション === */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn var(--transition-slow) ease-out;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.85;
  }
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* === ローディング === */
.loading {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 3rem;
  color: var(--text-secondary);
}

.spinner {
  width: 46px;
  height: 46px;
  border: 3px solid var(--glass-border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* === 用語解説 === */
.explanation-section {
  margin-bottom: 1.75rem;
}

.explanation-section h3 {
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
  color: var(--secondary-dark);
}

.explanation-desc {
  color: var(--text-secondary);
  font-size: 0.98rem;
  margin-bottom: 1.25rem;
}

.explanation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.9rem;
}

.explanation-item {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.explanation-item:hover {
  border-color: var(--primary);
}

.explanation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.explanation-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.12rem;
  font-family: 'Shippori Mincho', serif;
}

.explanation-meaning {
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.explanation-item.auspicious-bg {
  background: linear-gradient(135deg, hsl(155, 30%, 95%), var(--bg-secondary));
  border-left: 4px solid var(--auspicious);
}

.explanation-item.inauspicious-bg {
  background: linear-gradient(135deg, hsl(8, 45%, 96%), var(--bg-secondary));
  border-left: 4px solid var(--inauspicious);
}

/* Palace Score */
.palace-score {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 5px;
  background: hsl(40, 26%, 92%);
}

.score-plus {
  color: var(--auspicious);
}

.score-minus {
  color: var(--inauspicious);
}

/* === 折りたたみ === */
details.advanced {
  margin-top: 1rem;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  background: var(--bg-secondary);
  overflow: hidden;
}

details.advanced > summary {
  cursor: pointer;
  padding: 1rem 1.25rem;
  font-weight: 700;
  color: var(--secondary-dark);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  user-select: none;
}

details.advanced > summary::-webkit-details-marker {
  display: none;
}

details.advanced > summary::after {
  content: '＋';
  margin-left: auto;
  font-size: 1rem;
  transition: transform var(--transition-fast);
}

details.advanced[open] > summary::after {
  content: '－';
}

details.advanced > .details-body {
  padding: 0 1.25rem 1.25rem;
}

/* ステップ番号 */
.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 0.98rem;
  font-family: 'Shippori Mincho', serif;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

/* おすすめ方位のヒーロー表示 */
.best-hero {
  text-align: center;
  padding: 1.75rem 1rem;
  background: linear-gradient(135deg, hsl(215, 30%, 96%), hsl(40, 30%, 96%));
  border-radius: 12px;
  border: 1px solid var(--glass-border);
}

.best-hero .best-dir {
  font-family: 'Shippori Mincho', serif;
  font-size: clamp(2.6rem, 9vw, 4rem);
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.2;
}

.best-hero .best-label {
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 1.02rem;
}

/* 方角の相性 */
.kokuo-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
}

.kokuo-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.kokuo-row .kokuo-dir {
  font-weight: 700;
  min-width: 4.5rem;
  font-family: 'Shippori Mincho', serif;
}

.kokuo-row .kokuo-effect {
  color: var(--text-secondary);
  font-size: 0.94rem;
  flex: 1;
  min-width: 12rem;
}

/* モーダル */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 40, 55, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100;
  animation: fadeIn 0.2s ease-out;
}

.modal-card {
  background: var(--bg-secondary);
  border-radius: 14px;
  padding: 1.85rem;
  max-width: 390px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--glass-border);
  border-top: 4px solid var(--primary);
}

.modal-card h3 {
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

.modal-card .modal-row {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--glass-border);
}

.modal-card .modal-row span:first-child {
  color: var(--text-muted);
  font-weight: 700;
}

.modal-card .modal-close {
  margin-top: 1.25rem;
  width: 100%;
}

/* PR / おすすめ枠（アフィリエイト用） */
.pr-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  padding: 1px 7px;
  margin-bottom: 0.6rem;
}

.pr-slot {
  display: grid;
  gap: 0.75rem;
}

.pr-item {
  display: block;
  padding: 1.1rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--secondary);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-normal);
}

.pr-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.pr-item .pr-title {
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.25rem;
  font-family: 'Shippori Mincho', serif;
}

.pr-item .pr-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.pr-placeholder {
  border: 2px dashed var(--glass-border);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.85;
}

/* 目的別アドバイス */
.advice-card {
  margin-top: 1rem;
  padding: 1.15rem 1.3rem;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-left: 4px solid var(--secondary);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.advice-title {
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.6rem;
  font-family: 'Shippori Mincho', serif;
}

.advice-line {
  margin: 0.45rem 0;
  font-size: 0.98rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.advice-line.good {
  color: var(--text-primary);
}

/* 今日のおすすめ色・品 */
.lucky-card {
  margin-top: 1rem;
  padding: 1.15rem 1.3rem;
  background: linear-gradient(135deg, hsl(40, 34%, 96%), hsl(215, 26%, 96%));
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.lucky-title {
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.7rem;
  font-family: 'Shippori Mincho', serif;
}

.lucky-body {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.lucky-swatch {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.6), var(--shadow-sm);
}

.lucky-color {
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--text-primary);
}

.lucky-item {
  font-size: 0.94rem;
  color: var(--text-secondary);
}

.lucky-mood {
  color: var(--text-muted);
  font-size: 0.86rem;
}

/* シェア */
.share-row {
  margin-top: 1rem;
  text-align: center;
}

.share-btn {
  width: 100%;
}

/* トースト */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translate(-50%, 1rem);
  background: var(--primary-dark);
  color: white;
  padding: 0.85rem 1.4rem;
  border-radius: 8px;
  font-size: 0.96rem;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity var(--transition-normal), transform var(--transition-normal);
  z-index: 200;
  max-width: 90vw;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* トップへ戻る */
.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  padding: 0.8rem 1.4rem;
  font-size: 0.98rem;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(1rem);
  transition: opacity var(--transition-normal), transform var(--transition-normal), visibility var(--transition-normal);
  z-index: 90;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

footer {
  text-align: center;
  padding: 2.5rem 1rem 3rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.9;
}

/* メタ情報 */
.metadata-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.meta-item {
  text-align: center;
  padding: 0.9rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
}

.meta-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.meta-label .furi {
  display: block;
  font-size: 0.66rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  opacity: 0.85;
  margin-top: 0.1rem;
}

.meta-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark);
  font-family: 'Shippori Mincho', serif;
}

.meta-note {
  display: block;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.summary-text {
  font-size: 1.12rem;
  line-height: 2;
  margin: 0.5rem 0;
}

.warnings {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: hsl(8, 45%, 96%);
  border-left: 4px solid var(--inauspicious);
  border-radius: 8px;
}

.warnings h4 {
  margin-bottom: 0.5rem;
  color: var(--inauspicious);
}

.warnings ul {
  margin-left: 1.25rem;
}

.warnings li {
  margin: 0.4rem 0;
}

.no-results {
  text-align: center;
  padding: 1.75rem;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border-radius: 10px;
}

.direction-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.direction-header h4 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--primary-dark);
  font-family: 'Shippori Mincho', serif;
}

.direction-details p {
  margin: 0.4rem 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.reason-list {
  margin: 0.85rem 0 0 1.1rem;
  color: var(--text-primary);
}

.reason-list li {
  margin: 0.3rem 0;
  font-size: 0.94rem;
}

.pattern-item h4 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.pattern-item p {
  margin: 0.4rem 0;
  color: var(--text-secondary);
  font-size: 0.96rem;
}

.pattern-item small {
  color: var(--text-muted);
}

.auspicious-pattern {
  border-left-color: var(--auspicious);
}

.inauspicious-pattern {
  border-left-color: var(--inauspicious);
}

/* === キーボード操作のフォーカス === */
a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible,
summary:focus-visible,
.palace:focus-visible {
  outline: 3px solid var(--secondary);
  outline-offset: 3px;
  border-radius: 8px;
}

/* === モーション控えめ設定 === */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .card:hover,
  .palace:hover,
  .direction-card:hover,
  button:hover {
    transform: none;
  }
}
