/* ==========================================================================
   Gemarisデザイン：報酬・キープシミュレーション（完全版スタイル）
   ========================================================================== */

/* 👑 全体のベース（他ページと完全統一） */
body.gemaris-theme {
  font-family: 'Times New Roman', 'YuMincho', '游明朝', 'Hiragino Mincho ProN', 'Hiragino Sans', serif !important;
  background-color: #fdfaf5 !important;
  color: #3a241c !important;
  line-height: 1.6 !important;
  margin: 0;
  padding: 0;
}

/* 👑 ページタイトルエリア */
.simulation-header {
  text-align: center !important;
  padding: 60px 20px 40px !important;
  background-color: #ffffff !important;
  border-bottom: 1px solid #e2dcd3 !important;
}
.simulation-header h1 {
  font-family: 'YuMincho', '游明朝', serif !important;
  font-size: 26px !important;
  color: #601214 !important;
  margin: 0 0 12px 0 !important;
  letter-spacing: 0.08em !important;
  font-weight: bold !important;
}
.simulation-header h1::after {
  content: "" !important;
  display: block !important;
  width: 40px !important;
  height: 2px !important;
  background-color: #997c56 !important;
  margin: 15px auto 0 auto !important;
}
.simulation-header p {
  font-size: 14px !important;
  color: #666666 !important;
  margin: 0 !important;
  letter-spacing: 0.03em !important;
}

/* 👑 メインコンテンツエリア */
.simulation-main {
  max-width: 640px !important;
  margin: 40px auto 60px auto !important;
  padding: 0 20px !important;
  box-sizing: border-box !important;
}

/* 📢 アプリ別の境界プラカード（中央寄せ完全最適化） */
.app-section-block {
  margin-bottom: 50px;
}
/* ==========================================================================
   📱 媒体別イメージプラカード（画像通りの公式カラーに完全修正版）
   ========================================================================== */

/* 📢 プラカードの基本構造 */
.app-placard {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  padding: 18px 20px !important;
  margin-bottom: 24px !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* 🍊 1枚目の画像：Palmu（鮮やかなオレンジ背景 × 白文字） */
.app-placard.palmu-color {
  background: #ff9300 !important; /* 画像通りの鮮やかなパキッとしたオレンジ */
  border: none !important;
}
.app-placard.palmu-color .app-logo-text {
  color: #ffffff !important;      /* 画像通りの真っ白な文字 */
  font-weight: 800 !important;
  font-size: 1.7rem !important;
  letter-spacing: 0.06em !important;
}
.app-placard.palmu-color .app-sub-text {
  color: #ffffff !important;      /* サブテキストもパキッと白文字 */
  opacity: 0.9 !important;
  margin-top: 4px !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
}

/* 🏳️ 2枚目の画像：Pococha（綺麗な白背景 × パキッとした黒文字） */
.app-placard.pococha-color {
  background: #ffffff !important; /* 画像通りの綺麗な真っ白背景 */
  border: 1px solid #e2dcd3 !important; /* サイトに馴染む綺麗な薄い枠線 */
}
.app-placard.pococha-color .app-logo-text {
  color: #111111 !important;      /* 画像通りのパキッとした黒文字 */
  font-weight: 800 !important;
  font-size: 1.7rem !important;
  letter-spacing: 0.06em !important;
}
.app-placard.pococha-color .app-sub-text {
  color: #555555 !important;      /* サブテキストは少し落ち着いた黒・ダークグレー */
  margin-top: 4px !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
}

/* 👑 アコーディオン（details/summary） */
.table-container {
  width: 100% !important;
  margin-bottom: 25px !important;
  background: #ffffff !important;
  border: 1px solid #e2dcd3 !important;
  border-radius: 8px !important;
  box-shadow: 0 6px 18px rgba(58, 36, 28, 0.04) !important;
  overflow: hidden !important;
}
details {
  width: 100% !important;
}
summary {
  font-family: 'YuMincho', '游明朝', serif !important;
  font-size: 1.15rem !important;
  font-weight: bold !important;
  color: #4a0d0e !important;
  padding: 22px 24px !important;
  cursor: pointer !important;
  list-style: none !important;
  position: relative !important;
  background-color: #ffffff !important;
  user-select: none !important;
  transition: background-color 0.3s ease !important;
}
summary::-webkit-details-marker {
  display: none !important;
}
summary::after {
  content: '◆' !important;
  position: absolute !important;
  right: 24px !important;
  top: 50% !important;
  transform: translateY(-50%) scale(0.8) !important;
  font-size: 1rem !important;
  color: #997c56 !important;
  transition: transform 0.3s ease, color 0.3s ease !important;
}
details[open] summary {
  background-color: #faf6f0 !important;
  border-bottom: 1px solid #e2dcd3 !important;
}
details[open] summary::after {
  transform: translateY(-50%) rotate(45deg) scale(1) !important;
  color: #601214 !important;
}
summary:hover {
  background-color: #faf6f0 !important;
}
.details-content {
  padding: 15px 24px 24px 24px !important;
  background-color: #ffffff !important;
}

/* 👑 テーブル基本構造（報酬シミュレーション用） */
table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin-top: 10px !important;
  font-size: 0.95rem !important;
}
th {
  background-color: #601214 !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  font-family: 'YuMincho', '游明朝', serif !important;
  border: 1px solid #601214 !important;
  padding: 14px 10px !important;
  font-size: 0.9rem !important;
  letter-spacing: 0.05em !important;
}
td {
  border: 1px solid #e2dcd3 !important;
  padding: 13px 10px !important;
  color: #4a3c31 !important;
}

/* 🎯 修正：各表のランク列を中央寄せにする設定 */
.rank {
  font-weight: bold !important;
  font-family: 'Times New Roman', serif !important;
  background-color: #faf6f0 !important;
  color: #601214 !important;
  text-align: center !important; /* 中央寄せ */
}
.keep-table td.rank-lbl {
  font-weight: 700;
  color: #a9182a;
  text-align: center !important; /* キープ表のランクも中央寄せ */
}

.num {
  text-align: right !important;
  font-variant-numeric: tabular-nums !important;
  font-family: 'Times New Roman', Arial, sans-serif !important;
}
.my-reward {
  font-weight: bold !important;
  color: #601214 !important;
  background-color: #fff9f5 !important;
}
tr:hover td {
  background-color: #fdfaf5 !important;
}
.table-note {
  font-size: 0.75rem !important;
  color: #8a7667 !important;
  margin-top: 12px !important;
  text-align: left !important;
  line-height: 1.5 !important;
}

/* 📊 ランク別還元率専用インジケーター */
.rate-display-block {
  background-color: #fcfbfa;
  border: 1px solid #e6e3df;
  padding: 16px;
  margin-bottom: 20px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rate-tag-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #a9182a;
  letter-spacing: 0.05em;
  border-left: 3px solid #a9182a;
  padding-left: 8px;
  line-height: 1;
}
.rate-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rate-chip {
  background: #f0ede9;
  border: 1px solid #dfdad4;
  padding: 6px 12px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}
.chip-rank { color: #5a5854; font-weight: 500; }
.chip-val { color: #1a1917; font-weight: 700; }
.rate-chip.highlight-ss { background: #fff4f5; border-color: #f7d2d6; }
.rate-chip.highlight-ss .chip-rank { color: #a9182a; font-weight: 700; }
.rate-chip.highlight-ss .chip-val { color: #a9182a; font-size: 0.95rem; }

/* 📊 Palmu専用：ランクキーププラン表用追加スタイル */
.keep-table-wrapper {
  overflow-x: auto;
}
.keep-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-bottom: 15px;
  text-align: center;
}
.keep-table th {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 0.8rem !important;
  white-space: nowrap;
  background-color: #601214 !important; /* 報酬テーブルと統一 */
  color: #ffffff !important;
  padding: 10px;
}
.keep-table td {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  padding: 10px;
  border-bottom: 1px solid #e2dcd3;
  color: #1a1917;
}
.keep-table tr.highlight-s-row { background-color: rgba(169, 24, 42, 0.03); }

.plan-badge { font-weight: 700; font-size: 0.8rem; }
.plan-badge.p-a { color: #2b6cb0; }
.plan-badge.p-b { color: #b7791f; }
.plan-badge.p-c { color: #a9182a; }

.meter-plan-box { margin-top: 15px; padding-top: 15px; border-top: 1px dashed #e6e3df; }
.meter-note-title { font-size: 0.8rem; color: #5a5854; margin-bottom: 10px; font-weight: 500; }
.meter-cards { display: flex; gap: 10px; }
.meter-card { flex: 1; background: #fcfbfa; border: 1px solid #e6e3df; padding: 10px; border-radius: 4px; }
.m-badge { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 2px 6px; color: #fff; border-radius: 3px; margin-bottom: 6px; }
.m-badge.p-a { background-color: #2b6cb0; }
.m-badge.p-b { background-color: #b7791f; }
.m-badge.p-c { background-color: #a9182a; }
.meter-card p { margin: 0; font-size: 0.75rem; color: #5a5854; line-height: 1.4; }

/* 📱 レスポンシブ・各種デバイス最適化（メディアクエリ統合） */
@media screen and (max-width: 768px) {
  .simulation-header { padding: 40px 15px 30px !important; }
  .simulation-header h1 { font-size: 20px !important; }
  .simulation-main { margin: 20px auto 40px auto !important; padding: 0 10px !important; }
  summary { font-size: 1.05rem !important; padding: 16px 18px !important; }
  summary::after { right: 18px !important; }
  .details-content { padding: 10px 12px 18px 12px !important; }
  th, td { padding: 11px 6px !important; font-size: 0.85rem !important; }
}

@media screen and (max-width: 480px) {
  .rate-display-block { 
    padding: 10px; 
  }
  
  /* 📱 スマホで崩れないよう1列（縦並び）でスッキリ収める設定 */
  .rate-chips { 
    display: flex; 
    flex-direction: column; 
    gap: 6px; 
  }
  
  .rate-chip { 
    display: flex;
    justify-content: space-between; 
    align-items: center;
    padding: 8px 12px; 
    font-size: 0.8rem;
  }

  .chip-rank {
    font-size: 0.78rem;
    white-space: nowrap; /* 勝手な改行を防止 */
  }

  .chip-val {
    font-size: 0.88rem;
    white-space: nowrap;
  }
  
  .meter-cards { flex-direction: column; gap: 6px; }
  .meter-card { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; }
  .m-badge { margin-bottom: 0 !important; }
}