/* ========================================
   lg.css（Leader Guide / Layout）CLEAN
   - レイアウト/外観の土台
   - 10か条カードは「左：番号+status / 右：本文」前提に一本化
   - 状態依存（チェック/達成）は lg-check.css に集約
   Updated: 2026-01-28
======================================== */

:root{
  --lg-check-bg: #eaf6fc;
  --lg-check-border: #0784c6;

  --lg-promotion-bg-from: #fffbeb;
  --lg-promotion-bg-to: #fef3c7;
  --lg-promotion-border: rgba(245, 158, 11, 0.3);

  --lg-accent: #0784c6;
  --lg-accent-light: #4aa9d4;
  --lg-warning: #f59e0b;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   定義文
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.lg-definition{
  text-align: center;
  margin-bottom: 3rem;
  line-height: 2;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.9);
  position: relative;
  overflow: hidden;
}
.lg-definition::before{
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--lg-accent) 0%, var(--lg-accent-light) 100%);
}
.lg-definition-inner{ max-width: 38rem; margin: 0 auto; text-wrap: balance; }
.lg-definition-inner > *{ margin-left:auto; margin-right:auto; }

.lg-definition p{ margin: 0 0 1.1rem; line-height: 2; }
.lg-definition p:last-of-type{ margin-bottom: 0; }

.lg-def-lead{ margin: 0 0 1.2rem; font-size: 1.35rem; font-weight: 900; color: var(--navy); }
.lg-def-lead strong{ color: var(--lg-accent); }

.lg-def-sub{ margin: 0 auto 1.2rem; max-width: 34em; font-size: 1.03rem; font-weight: 700; color: var(--text); opacity: .92; }
.lg-def-sub strong{ color: var(--navy); font-weight: 900; }

.lg-note{ font-size: .95rem; color: var(--text-light); font-weight: 500; margin-top: 1.8rem; padding-top: 1.5rem; border-top: 1px solid rgba(0,0,0,.06); }
.lg-note strong{ color: var(--lg-accent); font-weight: 700; font-size: 1.05rem; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Controls
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.lg-controls{
  margin: 2rem auto 3rem;
  max-width: 520px;
  padding: 1.25rem 1rem;
  background: rgba(255,255,255,.86);
  border: 1px solid var(--border);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
}
.lg-month-switch{ display:flex; justify-content:center; align-items:center; gap:1.5rem; margin: 0 auto 1rem; }
.lg-month-switch button{
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  font-size: 1.1rem;
  color: var(--navy);
  cursor: pointer;
  transition: all .3s cubic-bezier(0.4,0,0.2,1);
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.lg-month-switch button:hover:not(:disabled){
  background: linear-gradient(135deg, var(--lg-accent) 0%, var(--lg-accent-light) 100%);
  color: var(--white);
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(7,132,198,.3);
}
.lg-month-switch button:disabled{ opacity:.3; cursor:not-allowed; }
.lg-month-label{ font-weight:800; font-size:1.25rem; letter-spacing:.08em; color:var(--navy); min-width:120px; text-align:center; font-family:"Poppins",sans-serif; }

.lg-progress{
  text-align:center;
  font-size:1rem;
  margin: 0 auto 1rem;
  color: var(--text);
  padding: 1.25rem 1rem;
  background: linear-gradient(135deg, var(--emerald-light) 0%, #eaf6fc 100%);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(7,132,198,.15);
}
.lg-progress strong{ font-size:2rem; font-weight:900; color:var(--lg-accent); margin-left:.5rem; font-family:"Poppins",sans-serif; }

.lg-mode-toggle{ text-align:center; display:grid; gap:.5rem; }
.lg-mode-toggle .mini-btn{ justify-self:center; min-width:240px; min-height:44px; }
.lg-mode-hint{ margin:0; font-size:.85rem; color:var(--text-light); font-weight:500; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   10か条（ここを一本化）
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.lg-creed-list{
  list-style:none;
  padding:0;
  margin:0;
  display:grid;
  grid-template-columns: 1fr;     /* SP: 1列 */
  gap: 1.25rem;
}
@media (min-width: 768px){
  .lg-creed-list{
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* Tablet+: 2列 */
    gap: 1.5rem;
  }
}
@media (min-width: 1024px){
  .lg-creed-list{ gap: 1.8rem 2rem; }
}

.lg-creed-list li{
  display:flex;
  gap:1.1rem;
  align-items:flex-start;
  padding: 1.35rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
  position: relative;
  overflow: hidden;
  height: 100%;
}

/* 偶数・奇数：薄い面だけ変える */
.lg-creed-list li:nth-child(odd){
  background: linear-gradient(135deg, rgba(15,23,42,.02), rgba(15,23,42,0));
}
.lg-creed-list li:nth-child(even){
  background: linear-gradient(135deg, rgba(99,102,241,.03), rgba(99,102,241,0));
}

/* 左：番号＋status */
.lg-left{
  flex: 0 0 72px;
  display:flex;
  flex-direction: column;
  align-items: center;
  gap: .7rem;
}
.lg-no{
  width: 36px; height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0784c6, #08699f);
  color: #fff;
  font-weight: 900;
  font-size: .9rem;
  display:grid;
  place-items:center;
  font-family: "Poppins", system-ui, sans-serif;
  box-shadow: 0 6px 16px rgba(99,102,241,.22);
}

/* 右：本文 */
.lg-content{ flex: 1; min-width: 0; }
.lg-content h3{ margin:0 0 .55rem; font-size:1.08rem; font-weight:900; color:var(--navy); line-height:1.35; }
.lg-content p{ margin:0; font-size:.98rem; line-height:1.75; color:var(--text); opacity:.92; }

@media (max-width: 640px){
  .lg-creed-list li{ padding:1.25rem 1.05rem; gap:1rem; }
  .lg-left{ flex-basis: 68px; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   メモ
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.lg-memo{
  margin: 3rem 0 1rem;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, #fefefe 0%, #f8fafc 100%);
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.9);
  position: relative;
}
.lg-memo::before{
  content:"";
  position:absolute;
  top:0; left:0; right:0;
  height:4px;
  background: linear-gradient(90deg, #0784c6 0%, #08699f 100%);
  border-radius: 24px 24px 0 0;
}
.lg-memo h2{ text-align:center; font-size:1.4rem; font-weight:900; margin:0 0 .8rem; color:var(--navy); }
.lg-memo-note{ text-align:center; font-size:.88rem; color:var(--text-light); margin:0 0 2rem; font-weight:500; }

#monthlyMemo{
  width:100%;
  min-height:200px;
  padding:1.5rem;
  border-radius:16px;
  border:2px solid #e2e8f0;
  font-family:inherit;
  font-size:1.05rem;
  line-height:1.8;
  background:var(--white);
  resize:vertical;
  transition: all .3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  -webkit-overflow-scrolling: touch;
}
#monthlyMemo::placeholder{ color:#94a3b8; line-height:1.6; }
#monthlyMemo:focus{
  outline:none;
  border-color:#0784c6;
  box-shadow: 0 0 0 4px rgba(99,102,241,.1), 0 4px 16px rgba(0,0,0,.08);
  transform: translateY(-2px);
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   リーダー昇格との関係（復活）
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.lg-promotion{
  margin: 4rem 0 2rem;
  padding: 2rem 2rem;
  background: linear-gradient(135deg, var(--lg-promotion-bg-from) 0%, var(--lg-promotion-bg-to) 100%);
  border-radius: 24px;
  border: 2px solid var(--lg-promotion-border);
  box-shadow:
    0 12px 48px rgba(245,158,11,.2),
    inset 0 1px 0 rgba(255,255,255,.8);
  position: relative;
  overflow: hidden;
}

.lg-promotion h2{
  text-align: center;
  font-size: 1.5rem;
  font-weight: 900;
  margin: 0 0 1.2rem;
  color: #92400e;
  letter-spacing: .02em;
}

.lg-promotion > p{
  text-align: center;
  max-width: 700px;
  margin: 0 auto 2rem;
  color: #78350f;
  line-height: 2;
}

.lg-promotion-list{
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px){
  .lg-promotion-list{
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
  }
}

.lg-promotion-list li{
  padding: 1.4rem 1.25rem;
  background: var(--white);
  border-radius: 16px;
  border: 1px solid rgba(245,158,11,.3);
  line-height: 1.9;
  color: #78350f;
  box-shadow: 0 4px 16px rgba(245,158,11,.1);
}

.lg-promotion-list strong{
  display: block;
  margin-bottom: .2rem;
  color: #92400e;
  font-weight: 900;
  font-size: 1.3rem;
}

.lg-promotion-note{
  text-align: center;
  font-weight: 800;
  color: #92400e;
  margin: 0;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   昇格判定フロー（GFI正式基準）復活
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.lg-promotion-flow{
  margin-top: 3rem;
  padding: 2.5rem 2rem;
  background: linear-gradient(135deg, var(--bg) 0%, #f1f5f9 100%);
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow:
    0 8px 32px rgba(0,0,0,.08),
    inset 0 1px 0 rgba(255,255,255,.9);
}

.lg-promotion-flow h2{
  font-size: 1.5rem;
  font-weight: 900;
  margin: 0 0 1rem;
  color: var(--navy);
}

.lg-promotion-lead{
  margin: 0 0 1.8rem;
  line-height: 2;
  color: var(--text);
}

.lg-rank-table{
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px){
  .lg-rank-table{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.lg-rank-card{
  background: var(--white);
  padding: 1.6rem 1.5rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,.04);
  position: relative;
  overflow: hidden;
}

.lg-rank-card::before{
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #0784c6 0%, #08699f 100%);
  opacity: .9;
}

.lg-rank-card h3{
  margin: 0 0 .75rem;
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--navy);
}

.lg-rank-card ul{
  margin: 0;
  padding-left: 1.2rem;
  line-height: 2;
  color: var(--text);
}

.lg-rank-card.is-exec{
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  border-color: #818cf8;
  text-align: center;
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.2);
}

.lg-promotion-flow .lg-promotion-note{
  margin-top: 1.4rem;
  text-align: center;
  font-size: .9rem;
  color: var(--text-light);
  font-style: italic;
}

/* =========================
   SP最適化：カードを読みやすく
========================= */
@media (max-width: 640px){

  /* カード全体：余白を少し減らす */
  .lg-creed-list li{
    padding: 1.05rem .95rem;
    gap: .85rem;
    border-radius: 16px;
  }

  /* 左カラム（SPでも縦積み）：番号の下にステータス/連続を置く */
  .lg-left{
    flex: 0 0 64px;
    width: 64px;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
    margin-top: 0;
  }

  /* 番号を小さく */
  .lg-no{
    width: 32px;
    height: 32px;
    border-radius: 11px;
    font-size: .85rem;
  }

  /* タイトルと本文の文字を少し締める */
  .lg-content h3{
    font-size: 1.02rem;
    line-height: 1.35;
  }
  .lg-content p{
    font-size: .95rem;
    line-height: 1.65;
  }
}
