/* 無限ドリルの画面。既存の style.css のトークンをそのまま使う
   (--primary / --ink / --bg / --line / --radius / 影の2枚重ね)。
   新しい色や角丸を持ち込まない。 */

.drill-hero {
  background: linear-gradient(180deg, var(--bg-warm), var(--bg));
  padding: 40px 0 28px;
  text-align: center;
}
.drill-hero h1 { font-size: 30px; letter-spacing: .02em; }
.drill-hero .lead { color: var(--ink-soft); margin-top: 10px; }

/* 操作パネル。JSが動くまで隠す(JSなしなら下の説明だけ見せる) */
.drill-panel { display: none; margin: 24px auto 8px; }
.js-ready .drill-panel { display: block; }
.drill-panel noscript { display: block; }

.drill-step {
  background: var(--card);
  border: var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px 18px;
  margin-bottom: 14px;
}
.drill-step h2 {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 10px;
  font-weight: 700;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit;
  font-weight: 700;
  background: #fff;
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  transition: none;
  /* 指で押しやすい大きさを確保する(子どもも触る) */
  min-height: 44px;
}
.chip:hover { border-color: var(--primary); }
.chip.is-on {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.chip-unit { font-weight: 500; }

.summary {
  font-weight: 800;
  font-size: 17px;
  color: var(--primary-deep);
  margin-bottom: 12px;
}

.opts { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 14px; }
.opts label { display: flex; align-items: center; gap: 7px; font-size: 15px; cursor: pointer; }
.opts input { width: 18px; height: 18px; accent-color: var(--primary); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
/* 「画面で確認」「別の問題にする」は保存とは役割が違うので、行を離して置く */
.actions-sub { margin-top: 12px; }
.actions .btn { min-height: 48px; }
.actions .btn[disabled] { opacity: .55; cursor: default; }
/* 「別の問題にする」だけは、保存でも確認でもなく**いまの問題を捨てる**操作。
   隣の「画面で確認」と同じ見た目だと押し間違えるので、色を落として分ける */
#reroll { box-shadow: inset 0 0 0 2px var(--line); color: var(--ink-soft); }
#reroll:hover { box-shadow: inset 0 0 0 2px var(--muted); color: var(--ink); }

.status { margin-top: 12px; font-size: 14px; color: var(--ink-soft); min-height: 1.6em; }
.status.is-working { color: var(--primary-deep); font-weight: 700; }

.note { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.7; }

/* JSなしでも読める説明。ここが検索の受け皿になる */
.drill-doc { padding: 28px 20px 56px; }
.drill-doc h2 {
  font-size: 20px;
  margin: 30px 0 12px;
  padding-left: 12px;
  border-left: 5px solid var(--primary);
}
.drill-doc p, .drill-doc li { line-height: 1.9; }
.drill-doc ol { margin-left: 0; }   /* padding-left(1.4em)だけで足りる */
.unit-list p { margin-bottom: 6px; font-size: 15px; }
.unit-list strong { color: var(--primary-deep); }

/* 紙面の見本。**縮小して並べるので細かい字は読めない。**
   「どんな形のプリントか」を見せるのが役目で、中身は原寸(押すと開く)で見てもらう */
.samples {
  list-style: none;
  padding-left: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 16px 0 8px;
}
.samples li { text-align: center; line-height: 1.5; }
.samples a {
  display: block;
  border: var(--hairline);
  border-radius: 12px;
  overflow: hidden;             /* 角丸から画像の隅がはみ出さないように */
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.samples a:hover { border-color: var(--primary); }
/* width/height は属性で入れてある(読み込み前に場所を取る)。表示は幅に合わせる */
.samples img { display: block; width: 100%; height: auto; }
.samples span {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-soft);
  text-wrap: balance;   /* 2行になるものを均等に折る(効かない環境でも実害なし) */
}

@media (max-width: 720px) {
  .samples { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 380px) {
  .samples { grid-template-columns: 1fr; }
}

.faq details {
  background: var(--card);
  border: var(--hairline);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 8px;
}
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin-top: 8px; color: var(--ink-soft); }

@media (max-width: 600px) {
  .drill-hero h1 { font-size: 24px; }
  .chip { padding: 8px 13px; font-size: 14px; }
  .actions .btn { flex: 1 1 100%; text-align: center; }
}

/* 保存した直後に出すCTA。ページを離れる前に届かせる */
.after-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 16px 20px;
  margin: 4px 0 18px;
}
.after-beast { width: 76px; height: auto; flex: 0 0 auto; }
.after-body { flex: 1 1 auto; }
.after-title { font-size: 15px; line-height: 1.8; margin-bottom: 4px; }
.after-sub { font-size: 13px; color: var(--ink-soft); line-height: 1.7; margin-bottom: 10px; }
.after-title strong { color: var(--primary-deep); }
.after-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.after-badges img { height: 44px; width: auto; }
/* Playのバッジは画像に余白が入っているぶん、同じ高さだと小さく見える */
.after-badges img.play { height: 57px; }
.after-badges.is-ios .badge-android, .after-badges.is-android .badge-ios { opacity: .5; }

@media (max-width: 600px) {
  .after-card { flex-direction: column; text-align: center; }
  .after-badges { justify-content: center; }
}

/* ドリルの下に置くCTA。ここが転換の要なので、ストアへ直接飛ばす */
.drill-cta {
  background: linear-gradient(180deg, var(--bg), var(--bg-warm));
  border-top: var(--hairline);
  padding: 44px 0 56px;
  text-align: center;
}
.cta-beast { width: 120px; height: auto; display: block; margin: 0 auto 4px; }
.cta-logo { width: 260px; max-width: 72%; height: auto; display: block; margin: 0 auto 14px; }
.cta-catch { font-size: 22px; font-weight: 800; color: var(--ink); margin-bottom: 10px; }
.cta-lead { color: var(--ink-soft); max-width: 620px; margin: 0 auto 22px; }

.cta-points {
  list-style: none;
  padding-left: 0;   /* マーカーを出さないので不要。左だけ余白が増えて非対称になる */
  max-width: 560px;
  margin: 0 auto 26px;
  text-align: left;
}
.cta-points li {
  background: var(--card);
  border: var(--hairline);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  font-size: 15px;
  color: var(--ink-soft);
}
.cta-points strong {
  display: block;
  color: var(--primary-deep);
  font-size: 16px;
  margin-bottom: 2px;
}

.cta-badges { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.cta-badges img { height: 56px; width: auto; }
.cta-badges img.play { height: 73px; }
/* 端末が分かるときは、合う方を前に出す(JSなしでも両方見える) */
.cta-badges.is-ios .badge-android, .cta-badges.is-android .badge-ios { opacity: .5; }
.cta-note { font-size: 14px; }

@media (max-width: 600px) {
  .cta-catch { font-size: 19px; }
  .cta-badges img { height: 48px; }
  .cta-badges img.play { height: 62px; }
}
