/* =========================================================
   教師向けガイド 共通スタイル
   使うページ: teacher-guide.php, trial-first.php, trial-detail.php,
   lesson-basics.php, report-guide.php, support-struggling.php,
   elementary-guide.php, teikitest-guide.php, parent-communication.php
   ========================================================= */

:root {
  --g-brand: #2e8b57;
  --g-brand-dark: #1f6f45;
  --g-brand-light: #eef8f2;
  --g-ink: #2f3a36;
  --g-muted: #5f6b66;
  --g-bg: #f7faf8;
  --g-card: #ffffff;
  --g-border: #dde8e2;
  --g-point-bg: #fff8e6;
  --g-point-line: #e0a800;
  --g-ok-bg: #f1fbf4;
  --g-ok-line: #2e8b57;
  --g-ng-bg: #fff4f3;
  --g-ng-line: #d64535;
  --g-note-bg: #f3f6f9;
  --g-line: #06c755;
  --g-radius: 14px;
  --g-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--g-bg);
  color: var(--g-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.85;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; }

a { color: var(--g-brand-dark); }
a:hover { text-decoration: none; }

/* ---------- ヘッダー ---------- */
.g-header {
  background: var(--g-brand);
  color: #fff;
}
.g-header__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.g-header__title {
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  text-decoration: none;
}
.g-header__back {
  color: #fff;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  padding: 4px 12px;
}
.g-header__back:hover { background: rgba(255, 255, 255, 0.12); }

/* ---------- ヒーロー ---------- */
.g-hero {
  background: linear-gradient(180deg, var(--g-brand-light), var(--g-bg));
  border-bottom: 1px solid var(--g-border);
}
.g-hero__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 16px 28px;
}
.g-hero__chapter {
  display: inline-block;
  background: var(--g-brand);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 2px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.g-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(24px, 5vw, 32px);
  line-height: 1.45;
  color: var(--g-brand-dark);
}
.g-hero__lead {
  margin: 0 0 14px;
  color: var(--g-muted);
}
.g-hero__meta {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 14px;
  color: var(--g-muted);
}
.g-hero__meta li { margin: 0; }
.g-hero__meta strong { color: var(--g-ink); font-weight: 700; }

/* ---------- 本文 ---------- */
.g-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 8px;
}
.g-section {
  background: var(--g-card);
  border: 1px solid var(--g-border);
  border-radius: var(--g-radius);
  box-shadow: var(--g-shadow);
  padding: 24px;
  margin: 0 0 20px;
}
.g-section > :first-child { margin-top: 0; }
.g-section > :last-child { margin-bottom: 0; }
.g-section h2 {
  font-size: 21px;
  line-height: 1.5;
  color: var(--g-brand-dark);
  border-left: 5px solid var(--g-brand);
  padding-left: 12px;
  margin: 0 0 16px;
}
.g-section h3 {
  font-size: 17px;
  line-height: 1.5;
  margin: 24px 0 8px;
}
.g-section p { margin: 0 0 14px; }
.g-section ul, .g-section ol { padding-left: 1.4em; margin: 0 0 14px; }
.g-section li { margin: 0 0 6px; }

/* ページ内目次 */
.g-pagetoc {
  background: var(--g-card);
  border: 1px dashed var(--g-border);
  border-radius: var(--g-radius);
  padding: 16px 20px;
  margin: 0 0 20px;
  font-size: 15px;
}
.g-pagetoc strong { display: block; margin-bottom: 6px; }
.g-pagetoc ol { margin: 0; padding-left: 1.4em; }
.g-pagetoc li { margin: 2px 0; }

/* ---------- 囲みボックス ---------- */
.g-point, .g-ok, .g-ng, .g-note {
  border-radius: 10px;
  padding: 14px 18px;
  margin: 16px 0;
  border-left: 5px solid;
}
.g-point { background: var(--g-point-bg); border-color: var(--g-point-line); }
.g-ok    { background: var(--g-ok-bg);    border-color: var(--g-ok-line); }
.g-ng    { background: var(--g-ng-bg);    border-color: var(--g-ng-line); }
.g-note  { background: var(--g-note-bg);  border-color: #9aa8b4; font-size: 15px; }
.g-point > :last-child, .g-ok > :last-child, .g-ng > :last-child, .g-note > :last-child { margin-bottom: 0; }
.g-point > strong:first-child, .g-ok > strong:first-child, .g-ng > strong:first-child, .g-note > strong:first-child {
  display: block;
  margin-bottom: 4px;
}
.g-ok ul, .g-ng ul, .g-point ul { margin-bottom: 0; }

/* ---------- 表 ---------- */
.g-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0;
}
.g-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 15px;
}
.g-table th, .g-table td {
  border: 1px solid var(--g-border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.g-table th {
  background: var(--g-brand-light);
  color: var(--g-brand-dark);
  white-space: nowrap;
}

/* ---------- 手順 ---------- */
.g-steps {
  list-style: none;
  counter-reset: gstep;
  padding: 0 !important;
  margin: 16px 0;
}
.g-steps > li {
  counter-increment: gstep;
  position: relative;
  padding: 0 0 16px 48px;
  margin: 0;
}
.g-steps > li::before {
  content: counter(gstep);
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--g-brand);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}
.g-steps > li > strong:first-child { display: block; }

/* ---------- 目次ページのカード ---------- */
.g-toc-chapter { margin: 0 0 28px; }
.g-toc-chapter h2 {
  font-size: 19px;
  color: var(--g-brand-dark);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.g-toc-chapter h2 span {
  background: var(--g-brand);
  color: #fff;
  border-radius: 999px;
  font-size: 13px;
  padding: 1px 10px;
}
.g-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 720px) {
  .g-cards { grid-template-columns: 1fr 1fr; }
}
.g-card {
  display: block;
  background: var(--g-card);
  border: 1px solid var(--g-border);
  border-radius: var(--g-radius);
  padding: 16px 18px;
  color: var(--g-ink);
  text-decoration: none;
  box-shadow: var(--g-shadow);
  transition: border-color .15s, transform .15s;
}
.g-card:hover { border-color: var(--g-brand); transform: translateY(-1px); }
.g-card__title {
  display: block;
  font-weight: 700;
  color: var(--g-brand-dark);
  margin-bottom: 4px;
}
.g-card__desc { display: block; font-size: 14px; color: var(--g-muted); line-height: 1.7; }

.g-first-steps {
  background: var(--g-point-bg);
  border: 1px solid #f1dfa6;
  border-radius: var(--g-radius);
  padding: 18px 20px;
  margin: 0 0 28px;
}
.g-first-steps strong { display: block; margin-bottom: 6px; }
.g-first-steps ol { margin: 0; padding-left: 1.4em; }
.g-first-steps li { margin: 2px 0; }

/* ---------- FAQ ---------- */
.g-faq details {
  border: 1px solid var(--g-border);
  border-radius: 10px;
  padding: 12px 16px 12px 34px; /* 左は開閉の三角（▶）が枠の内側に収まる分を空ける */
  margin: 0 0 10px;
  background: #fff;
}
.g-faq summary {
  cursor: pointer;
  font-weight: 700;
  list-style-position: outside;
}
.g-faq details p { margin: 10px 0 0; }

/* ---------- コピー用テキスト ---------- */
.g-copy {
  position: relative;
  margin: 16px 0;
}
.g-copy textarea {
  width: 100%;
  min-height: 300px;
  font: inherit;
  font-size: 15px;
  line-height: 1.8;
  padding: 14px;
  border: 1px solid var(--g-border);
  border-radius: 10px;
  background: #fbfcfb;
  color: var(--g-ink);
  resize: vertical;
}
.g-copy button {
  margin-top: 8px;
  background: var(--g-brand);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 10px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.g-copy button:hover { background: var(--g-brand-dark); }

/* ---------- 関連ページ・フッター ---------- */
.g-related {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}
.g-related__box {
  background: var(--g-card);
  border: 1px solid var(--g-border);
  border-radius: var(--g-radius);
  padding: 18px 20px;
  margin: 0 0 20px;
}
.g-related__box strong { display: block; margin-bottom: 6px; }
.g-related__box ul { margin: 0; padding-left: 1.3em; }
.g-related__box li { margin: 4px 0; }

.g-footer {
  max-width: 960px;
  margin: 0 auto;
  padding: 8px 16px 40px;
  text-align: center;
}
.g-footer__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0 0 20px;
}
.g-btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--g-brand);
  color: var(--g-brand-dark);
  background: #fff;
}
.g-btn:hover { background: var(--g-brand-light); }
.g-btn--line {
  background: var(--g-line);
  border-color: var(--g-line);
  color: #fff;
}
.g-btn--line:hover { background: #05b04b; }
.g-footer__copy { font-size: 13px; color: var(--g-muted); margin: 0; }

@media (max-width: 600px) {
  .g-table { min-width: 0; font-size: 14px; }
  .g-table th, .g-table td { padding: 8px; }
  .g-table th { white-space: normal; }
  .g-table--time td:first-child { white-space: nowrap; }
  .g-section { padding: 20px 16px; }
  .g-section h2 { font-size: 19px; }
  .g-hero__inner { padding: 24px 16px 20px; }
}
