/* ATP（13ステップ）— COMPASS の style.css の変数をそのまま使う */

.atp-head { padding: 6px 2px 14px; }
.atp-head.sub { padding-top: 2px; }
.atp-kicker {
  font-size: 9px; letter-spacing: 0.22em; font-weight: 700;
  color: var(--sun); margin-bottom: 6px;
}
.atp-termno { font-size: 30px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.1; }
.atp-steptitle { font-size: 22px; font-weight: 800; line-height: 1.25; }
.atp-termdate { font-size: 12px; color: var(--text-dim); margin-top: 5px; }
.atp-back {
  background: none; border: none; color: var(--text-dim);
  font-size: 13px; font-weight: 600; padding: 6px 0; margin-bottom: 4px; cursor: pointer;
}

/* 進み */
.atp-progline { display: flex; align-items: center; gap: 12px; }
.atp-bar {
  flex: 1; height: 8px; border-radius: 999px;
  background: var(--bg-2); overflow: hidden;
}
.atp-bar i { display: block; height: 100%; background: var(--sun-grad); border-radius: 999px; }
.atp-prognum { font-size: 13px; color: var(--text-dim); white-space: nowrap; }
.atp-prognum b { font-size: 20px; color: var(--text); font-weight: 800; }
.atp-pastnote {
  margin-top: 11px; font-size: 12px; line-height: 1.7;
  color: var(--text-dim); border-top: 1px solid var(--line); padding-top: 10px;
}

/* 13ステップの並び */
.atp-list { display: flex; flex-direction: column; }
.atp-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: none; border: none; border-bottom: 1px solid var(--line);
  padding: 12px 2px; text-align: left; cursor: pointer; color: var(--text);
}
.atp-row:last-child { border-bottom: none; }
.atp-row:active { background: var(--card-2); }
.atp-wk {
  flex: 0 0 30px; height: 30px; border-radius: 9px;
  background: var(--bg-2); color: var(--text-dim);
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.atp-row.doing .atp-wk { background: var(--sun-soft); color: var(--sun-2); }
.atp-row.done .atp-wk { background: var(--sun-grad); color: #fff; }
.atp-rowmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.atp-rowtitle { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.atp-ph {
  font-style: normal; font-size: 9px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--gold); background: var(--gold-soft);
  padding: 2px 6px; border-radius: 5px;
}
.atp-rowsub { font-size: 11px; color: var(--text-dim); }
.atp-mark { flex: 0 0 auto; color: var(--sun-2); font-weight: 800; font-size: 15px; }

/* 設問 */
.atp-q + .atp-q { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.atp-qlabel {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px;
  font-size: 14px; font-weight: 700; margin-bottom: 7px;
}
.atp-ta {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card-2); color: var(--text);
  padding: 11px 12px; font: inherit; font-size: 15px; line-height: 1.75;
  resize: vertical; -webkit-appearance: none;
}
.atp-ta:focus { outline: none; border-color: var(--sun); background: #fff; }

/* 前の期の答え */
.atp-prev { margin-top: 8px; }
.atp-prev summary {
  font-size: 11px; color: var(--text-dim); cursor: pointer;
  padding: 5px 0; list-style: none;
}
.atp-prev summary::-webkit-details-marker { display: none; }
.atp-prev summary::before { content: "▸ "; }
.atp-prev[open] summary::before { content: "▾ "; }
.atp-prevbody {
  font-size: 13px; line-height: 1.8; color: var(--text-dim);
  background: var(--bg-2); border-radius: 9px; padding: 10px 12px;
  border-left: 2px solid var(--line-2);
}

/* つづける（○ を押すだけ。日付の縛りなし） */
.atp-pr {
  display: flex; align-items: center; gap: 13px;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.atp-pr:last-of-type { border-bottom: none; }
.atp-prmain { flex: 1; min-width: 0; }
.atp-prname { font-size: 14px; font-weight: 700; line-height: 1.5; }
.atp-prsub {
  font-size: 11px; color: var(--text-dim); margin-top: 3px;
  font-variant-numeric: tabular-nums;
}

/* タップ領域は 44px 確保しつつ、見えるのは 26px の ○ */
.atp-ring {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: none; border: none; padding: 0; cursor: pointer;
}
.atp-ring::before {
  content: "";
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--line-2);
  background: var(--card);
  transition: background .12s ease, border-color .12s ease;
}
.atp-ring:hover::before { border-color: var(--sun); }
.atp-ring.on::before {
  background: var(--sun-grad); border-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}
.atp-ring:focus-visible::before { outline: 2px solid var(--sun); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .atp-ring::before { transition: none; } }

/* 比較 */
.atp-cmpitem + .atp-cmpitem { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.atp-cmpterm {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 13px; font-weight: 800; margin-bottom: 6px;
}
.atp-cmpterm i {
  font-style: normal; font-size: 9px; font-weight: 700;
  color: #fff; background: var(--sun-2); padding: 2px 6px; border-radius: 5px;
}
.atp-cmpterm span { font-size: 11px; font-weight: 600; color: var(--text-dim); }
.atp-cmpbody { font-size: 14px; line-height: 1.8; }
.atp-cmpitem.now .atp-cmpbody { font-weight: 600; }
.atp-cmpbody em { color: var(--text-dim); font-size: 13px; }

/* ボタン */
.atp-outrow { display: flex; gap: 9px; }
.atp-btn {
  flex: 1; border: none; border-radius: 10px; padding: 12px 10px;
  background: var(--sun-grad); color: #fff;
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.atp-btn.ghost { background: var(--card-2); color: var(--text); border: 1px solid var(--line); }
.atp-note { margin-top: 10px; font-size: 11px; line-height: 1.7; color: var(--text-dim); }
.atp-note.tight { margin-top: 0; margin-bottom: 11px; }
.atp-free {
  display: inline-block; font-size: 10px; font-weight: 700;
  color: var(--green); background: color-mix(in srgb, var(--green) 12%, transparent);
  padding: 2px 7px; border-radius: 6px; vertical-align: 1px;
}

@media print {
  #topbar, #tabbar, .atp-back, .atp-outrow, .atp-demobar { display: none !important; }
  .card { break-inside: avoid; box-shadow: none; }
}

/* ---------- 設計図トップ（今までの設計図。並びは変えない） ---------- */
.atp-bphead { padding: 6px 2px 12px; }
.atp-bpbig { font-size: 28px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.15; }

.atp-pills { display: flex; gap: 6px; overflow-x: auto; padding: 0 2px 14px; }
.atp-pill {
  flex: 0 0 auto; font-size: 11px; font-weight: 700;
  padding: 6px 12px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); color: var(--text-dim);
}
.atp-pill.on { background: var(--sun-grad); border-color: transparent; color: #fff; }

.atp-star { text-align: center; padding: 22px 18px; }
.atp-rinenwords { display: flex; justify-content: center; gap: 10px; margin-bottom: 13px; }
.atp-rinenwords span {
  font-size: 12px; font-weight: 800; letter-spacing: 0.1em;
  color: var(--sun-2); background: var(--sun-soft);
  padding: 5px 11px; border-radius: 7px;
}
.atp-rinen { font-size: 17px; font-weight: 700; line-height: 1.7; }
.atp-vision { font-size: 13px; line-height: 1.8; color: var(--text-dim); margin-top: 9px; }

/* ★ 増えるのはこのカードだけ ★ */
.atp-entry { border-color: var(--sun); }
.atp-entrybody { margin-bottom: 11px; }
.atp-entryline {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 7px;
}
.atp-entryline b { font-size: 17px; font-weight: 800; }
.atp-entryline span { font-size: 11px; color: var(--text-dim); font-weight: 600; }
.atp-bar.sm { height: 6px; }

.atp-bpnote {
  font-size: 11px; color: var(--text-dim);
  text-align: center; padding: 6px 0 14px;
}

.atp-bpcard h3 { display: flex; align-items: baseline; gap: 9px; }
.atp-en {
  font-size: 9px; letter-spacing: 0.18em; font-weight: 800;
  color: var(--sun); 
}
.atp-bprow { display: flex; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.atp-bprow:last-child { border-bottom: none; }
.atp-bplabel { flex: 0 0 34%; font-size: 12px; font-weight: 700; color: var(--text-dim); }
.atp-bpvalue { flex: 1; font-size: 13px; line-height: 1.7; }
.atp-sub {
  font-size: 10px; font-weight: 800; letter-spacing: 0.12em;
  color: var(--text-dim); margin: 4px 0 9px;
}
.atp-chips2 { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.atp-chips2 span {
  font-size: 11px; font-weight: 600;
  background: var(--bg-2); color: var(--text);
  padding: 4px 9px; border-radius: 999px;
}
.atp-needrow { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.atp-needname { flex: 0 0 62px; font-size: 11px; font-weight: 700; color: var(--text-dim); }
.atp-needbar { flex: 1; height: 7px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.atp-needbar i { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
.atp-needn { flex: 0 0 auto; font-size: 11px; font-weight: 700; color: var(--text-dim); }

/* さわっていないタブ */
.atp-untouched { text-align: center; padding: 26px 20px; }
.atp-untouchedmark {
  display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: 0.12em;
  color: var(--green); background: color-mix(in srgb, var(--green) 12%, transparent);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}
.atp-untouchedbody { font-size: 13px; line-height: 1.9; color: var(--text-dim); margin-bottom: 18px; }
.atp-untouchedbody b { color: var(--text); }
.atp-untouched .atp-btn { max-width: 260px; margin: 0 auto; display: block; }

/* ---------- 設問 1問ずつ ---------- */
.atp-crumb {
  font-size: 11px; font-weight: 700; color: var(--text-dim);
  line-height: 1.6; margin-bottom: 10px;
}
.atp-qno {
  font-size: 10px; font-weight: 800; letter-spacing: 0.14em;
  color: var(--sun); margin-bottom: 9px;
}
.atp-qtext { font-size: 15px; font-weight: 700; line-height: 1.85; margin-bottom: 13px; }
.atp-para { font-size: 13.5px; line-height: 2; }
.atp-aims { margin: 0; padding-left: 1.15em; }
.atp-aims li { font-size: 13.5px; line-height: 1.95; }

.atp-ex { margin: -4px 0 12px; }
.atp-ex summary {
  font-size: 11px; color: var(--text-dim); cursor: pointer; padding: 5px 0; list-style: none;
}
.atp-ex summary::-webkit-details-marker { display: none; }
.atp-ex summary::before { content: "▸ "; }
.atp-ex[open] summary::before { content: "▾ "; }
.atp-exbody {
  font-size: 12.5px; line-height: 1.9; color: var(--text-dim);
  background: var(--gold-soft); border-radius: 9px; padding: 10px 12px;
}

.atp-field + .atp-field { margin-top: 12px; }
.atp-flabel { display: block; font-size: 12px; font-weight: 700; color: var(--text-dim); margin-bottom: 5px; }

/* あてはまるものに ☑ */
.atp-checks { display: flex; flex-direction: column; }
.atp-check {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: none; border: none; border-bottom: 1px solid var(--line);
  padding: 10px 2px; text-align: left; cursor: pointer;
  font: inherit; font-size: 13.5px; color: var(--text);
}
.atp-check:last-child { border-bottom: none; }
.atp-box {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 5px;
  border: 1.5px solid var(--line-2); background: var(--card);
}
.atp-check.on .atp-box {
  background: var(--sun-grad); border-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}
.atp-check.on { font-weight: 700; }

/* 表に書き込む */
.atp-table { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.atp-trow { display: flex; align-items: stretch; border-bottom: 1px solid var(--line); }
.atp-trow:last-child { border-bottom: none; }
.atp-trow.head { background: var(--bg-2); }
.atp-trow.head .atp-tval { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; color: var(--text-dim); padding: 7px 9px; }
.atp-trow.ex { background: var(--gold-soft); }
.atp-tname {
  flex: 0 0 47%; font-size: 12px; line-height: 1.5;
  padding: 9px; border-right: 1px solid var(--line);
  display: flex; align-items: center;
}
.atp-tval { flex: 1; font-size: 12px; padding: 9px; display: flex; align-items: center; }
.atp-tval.dim { color: var(--text-dim); }
.atp-tin {
  flex: 1; min-width: 0; border: none; background: none; color: var(--text);
  font: inherit; font-size: 13px; padding: 9px;
}
.atp-tin:focus { outline: none; background: var(--sun-soft); }
.atp-tbox {
  flex: 0 0 38px; border: none; border-right: 1px solid var(--line);
  background: var(--card); cursor: pointer; position: relative;
}
.atp-tbox::before {
  content: ""; position: absolute; inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 18px; height: 18px; border-radius: 4px;
  border: 1.5px solid var(--line-2); background: var(--card);
}
.atp-tbox.on::before { background: var(--sun-grad); border-color: transparent; }

/* 13ステップの学習計画 */
.atp-plan { display: flex; flex-direction: column; gap: 7px; }
.atp-planrow { display: flex; align-items: center; gap: 6px; }
.atp-planname { flex: 0 0 40%; font-size: 12px; font-weight: 600; line-height: 1.4; }
.atp-planin {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 7px;
  background: var(--card-2); color: var(--text);
  font: inherit; font-size: 13px; padding: 7px 8px; text-align: center;
}
.atp-planin:focus { outline: none; border-color: var(--sun); background: #fff; }
.atp-planto { flex: 0 0 auto; font-size: 11px; color: var(--text-dim); }

.atp-dates { display: flex; flex-direction: column; gap: 9px; margin-bottom: 11px; }
.atp-daterow { display: flex; align-items: center; gap: 10px; }
.atp-datename { flex: 0 0 44%; font-size: 12px; font-weight: 700; color: var(--text-dim); }
.atp-datein {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 7px;
  background: var(--card-2); color: var(--text);
  font: inherit; font-size: 13px; padding: 8px 9px;
}
.atp-datein:focus { outline: none; border-color: var(--sun); background: #fff; }

/* 前へ / 次へ */
.atp-nav {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 0 8px;
}
.atp-navbtn {
  flex: 1; min-height: 46px; border: 1px solid var(--line); border-radius: 11px;
  background: var(--card); color: var(--text);
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.atp-navbtn.main { background: var(--sun-grad); border-color: transparent; color: #fff; }
.atp-navbtn:disabled { opacity: .35; cursor: default; }
.atp-navpos {
  flex: 0 0 auto; font-size: 11px; color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.atp-cmpq { font-size: 12px; line-height: 1.8; color: var(--text-dim); margin-bottom: 11px; }
.atp-row.waiting { opacity: .45; }
.atp-ph.half { color: var(--sun-2); background: var(--sun-soft); }

/* ---------- 追加の入力型 ---------- */
.atp-part + .atp-part { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.atp-plabel { font-size: 13.5px; font-weight: 700; line-height: 1.8; margin-bottom: 10px; }

/* 同じ組をn回 */
.atp-rep + .atp-rep { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.atp-rephead { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.atp-repno { font-size: 15px; font-weight: 800; color: var(--sun); }
.atp-repfixed { font-size: 14px; font-weight: 700; line-height: 1.6; }
.atp-repin {
  flex: 1; min-width: 0; border: none; border-bottom: 1px solid var(--line-2);
  background: none; color: var(--text); font: inherit; font-size: 15px; padding: 5px 2px;
}
.atp-repin:focus { outline: none; border-bottom-color: var(--sun); }
.atp-repunit { font-size: 12px; color: var(--text-dim); }

/* ☑ は多いとき2列 */
.atp-checks.dense { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.atp-checks.dense .atp-check { font-size: 12.5px; padding: 8px 2px; }
.atp-checks.dense .atp-box { width: 17px; height: 17px; }
.atp-box.round { border-radius: 50%; }

/* 行が自由な表 */
.atp-grid { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.atp-grow { display: grid; grid-template-columns: repeat(var(--gcols), 1fr); border-bottom: 1px solid var(--line); }
.atp-grow:last-child { border-bottom: none; }
.atp-grow.head { background: var(--bg-2); }
.atp-grow.head .atp-gcell { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; color: var(--text-dim); }
.atp-gcell {
  min-width: 0; border: none; border-right: 1px solid var(--line);
  background: none; color: var(--text); font: inherit; font-size: 12.5px;
  padding: 10px 8px; line-height: 1.5;
}
.atp-grow > .atp-gcell:last-child { border-right: none; }
.atp-gcell.fixed { display: flex; align-items: center; color: var(--text-dim); font-weight: 600; }
input.atp-gcell:focus { outline: none; background: var(--sun-soft); }

/* 1〜6 の目盛り */
.atp-scale { margin: 2px 0 4px; }
.atp-dots { display: flex; gap: 6px; }
.atp-dot {
  flex: 1; min-height: 46px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card-2); color: var(--text-dim);
  font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
}
.atp-dot.on { background: var(--sun-grad); border-color: transparent; color: #fff; }
.atp-scaleends {
  display: flex; justify-content: space-between; gap: 14px; margin-top: 7px;
  font-size: 10.5px; line-height: 1.5; color: var(--text-dim);
}
.atp-scaleends span:last-child { text-align: right; }

/* 点数 */
.atp-scores { display: flex; flex-direction: column; gap: 9px; }
.atp-scorerow { display: flex; align-items: center; gap: 9px; }
.atp-scorename { flex: 1; font-size: 13px; font-weight: 600; }
.atp-scorein {
  flex: 0 0 84px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--card-2); color: var(--text);
  font: inherit; font-size: 15px; font-weight: 700; padding: 8px; text-align: center;
}
.atp-scorein:focus { outline: none; border-color: var(--sun); background: #fff; }
.atp-scoreunit { flex: 0 0 auto; font-size: 12px; color: var(--text-dim); }

/* 番号つきリスト */
.atp-numbered { display: flex; flex-direction: column; gap: 7px; }
.atp-numrow { display: flex; align-items: center; gap: 9px; }
.atp-numno {
  flex: 0 0 22px; font-size: 13px; font-weight: 700; color: var(--text-dim);
  text-align: right; font-variant-numeric: tabular-nums;
}
.atp-numin {
  flex: 1; min-width: 0; border: none; border-bottom: 1px solid var(--line);
  background: none; color: var(--text); font: inherit; font-size: 14px; padding: 7px 2px;
}
.atp-numin:focus { outline: none; border-bottom-color: var(--sun); }

/* 文のなかに書き込む */
.atp-sentence {
  background: var(--card-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 15px; font-size: 14px; line-height: 2.2;
}
.atp-sentin {
  border: none; border-bottom: 1.5px solid var(--line-2);
  background: none; color: var(--text); font: inherit; font-size: 15px; font-weight: 600;
  padding: 3px 6px; margin: 0 4px; min-width: 140px; width: 60%;
}
.atp-sentin:focus { outline: none; border-bottom-color: var(--sun); }

/* ---------- 教材の図（SVG） ---------- */
.atp-fig { margin: 4px 0 14px; }
.atp-fig svg { width: 100%; height: auto; display: block; }
.atp-fig figcaption {
  font-size: 10.5px; color: var(--text-dim); text-align: center; margin-top: 7px;
}
.fig-l { stroke: var(--text); stroke-width: 1.4; fill: none; }
.fig-hair { stroke: var(--line); stroke-width: 1; }
.fig-dash { stroke: var(--text-dim); stroke-width: 1.2; stroke-dasharray: 4 4; fill: none; }
.fig-arrow { stroke: var(--text); stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.fig-f { fill: var(--text); stroke: none; }
.fig-box { fill: none; stroke: var(--text); stroke-width: 1.4; }
.fig-ring { fill: none; stroke: var(--text); stroke-width: 1.4; }
.fig-soft { fill: var(--bg-2); stroke: var(--line-2); stroke-width: 1; }
.fig-soft2 { fill: var(--bg-2); stroke: var(--line-2); stroke-width: 1.2; }
.fig-band { fill: var(--sun); opacity: .18; stroke: none; }
.fig-band2 { fill: var(--gold); opacity: .16; stroke: none; }
.fig-t { font-size: 13px; font-weight: 700; fill: var(--text); }
.fig-s { font-size: 11px; fill: var(--text); }
.fig-xs { font-size: 9.5px; fill: var(--text); }
.fig-inv { font-size: 12px; font-weight: 700; fill: var(--card); }
.fig-dim { fill: var(--text-dim); }
.fig-c { text-anchor: middle; }

/* ---------- 教材の読み物（詩など） ---------- */
.atp-reading { background: var(--card-2); }
.atp-readtitle {
  font-size: 17px; font-weight: 800; text-align: center; line-height: 1.5;
}
.atp-readauthor {
  font-size: 12px; color: var(--text-dim); text-align: center;
  margin-top: 5px; margin-bottom: 16px;
}
.atp-readbody {
  font-size: 14px; line-height: 2.1; text-align: center;
  padding: 4px 0 2px;
}
.atp-readsource {
  font-size: 10.5px; color: var(--text-dim); line-height: 1.7;
  margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line);
}

/* ============================================================
   広い画面（PC / iPad）— 13ステップは画面の幅を使う
   ============================================================ */
#view.atp-full { max-width: none; width: 100%; }

@media (min-width: 700px) {
  /* カードは本体の 820px 上限を外して、画面の幅を使う */
  #view.atp-full > .card:not(.full) { max-width: none; }
  #view.atp-full > .atp-head,
  #view.atp-full > .atp-nav { max-width: none; }

  /* 見出しまわりは大きく、縦は詰める */
  #view.atp-full .atp-termno { font-size: 42px; }
  #view.atp-full .atp-steptitle { font-size: 28px; }
  #view.atp-full .atp-bpbig { font-size: 34px; }
  #view.atp-full .atp-crumb { font-size: 12.5px; }

  /* ステップ／セクションの一覧は2列 */
  #view.atp-full .atp-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
  #view.atp-full .atp-row:nth-last-child(2) { border-bottom: none; }

  /* 設問まわりを大きく */
  #view.atp-full .atp-qtext { font-size: 17px; line-height: 1.9; }
  #view.atp-full .atp-para { font-size: 15px; }
  #view.atp-full .atp-aims li { font-size: 15px; }
  #view.atp-full .atp-ta { font-size: 16px; padding: 13px 15px; }

  /* 小見出しつきの欄は2列に流す */
  #view.atp-full .atp-field { break-inside: avoid; }

  /* ☑ は3列 */
  #view.atp-full .atp-checks.dense { grid-template-columns: repeat(3, 1fr); gap: 0 20px; }
  #view.atp-full .atp-checks:not(.dense) { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }

  /* 表・タイムラインは横を広く使い、行ラベルを細く */
  #view.atp-full .atp-tname { flex-basis: 34%; }
  #view.atp-full .atp-planname { flex-basis: 30%; }
  #view.atp-full .atp-numbered { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 28px; }

  /* 図は大きくしすぎない（読みやすい上限） */
  #view.atp-full .atp-fig { max-width: 720px; margin-left: auto; margin-right: auto; }

  /* 前へ／次へ は中央に置く */
  #view.atp-full .atp-nav { max-width: 520px; margin-left: auto; margin-right: auto; }

  /* 周の比較は2列 */
  #view.atp-full .atp-cmpitem { break-inside: avoid; }
}

@media (min-width: 1100px) {
  /* 1問ずつの画面: 設問と入力を並べず、横幅いっぱいに大きく使う */
  #view.atp-full .atp-list { grid-template-columns: repeat(3, 1fr); }
  #view.atp-full .atp-fields2 { column-count: 2; column-gap: 32px; }
  #view.atp-full .atp-checks.dense { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 書いたもの（済んだ問の一覧） ---------- */
.atp-wlist { display: flex; flex-direction: column; }
.atp-wrow {
  display: flex; flex-direction: column; gap: 5px; width: 100%;
  background: none; border: none; border-bottom: 1px solid var(--line);
  padding: 13px 2px; text-align: left; cursor: pointer; color: var(--text); font: inherit;
}
.atp-wrow:last-child { border-bottom: none; }
.atp-wrow:active { background: var(--card-2); }
.atp-wmeta {
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--sun-2); text-transform: none;
}
.atp-wq {
  font-size: 11.5px; color: var(--text-dim); line-height: 1.6;
  overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1;
}
.atp-wa {
  font-size: 14px; line-height: 1.85;
  overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4;
}

@media (min-width: 700px) {
  /* 広い画面では2列に流す */
  #view.atp-full .atp-wlist { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
  #view.atp-full .atp-wa { font-size: 15px; -webkit-line-clamp: 5; }
}
@media (min-width: 1100px) {
  #view.atp-full .atp-wlist { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- 折りたたみの見出し ---------- */
.atp-fold {
  display: flex; align-items: center; gap: 9px;
  cursor: pointer; user-select: none;
  margin-bottom: 12px;
}
.atp-fold.closed { margin-bottom: 0; }
.atp-foldmark {
  flex: 0 0 auto; width: 9px; height: 9px;
  border-right: 1.6px solid var(--text-dim);
  border-bottom: 1.6px solid var(--text-dim);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .15s ease;
}
.atp-fold.closed .atp-foldmark { transform: rotate(-45deg) translate(-1px, 1px); }
.atp-foldn {
  margin-left: auto; font-size: 11px; font-weight: 600;
  letter-spacing: 0; color: var(--text-dim); text-transform: none;
}
@media (prefers-reduced-motion: reduce) { .atp-foldmark { transition: none; } }

/* ---------- セクションのカード（折りたたみ） ---------- */
.atp-seccard { padding: 0; overflow: hidden; }
.atp-seccard .atp-fold {
  margin: 0; padding: 15px 16px;
  font-size: 11px; letter-spacing: 0.02em;
}
.atp-seccard .atp-fold:not(.static):active { background: var(--card-2); }
.atp-fold.static { cursor: pointer; }
.atp-foldmark.ghost { opacity: .28; }

.atp-secno {
  flex: 0 0 26px; height: 26px; border-radius: 8px;
  background: var(--bg-2); color: var(--text-dim);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; letter-spacing: 0;
}
.atp-secno.part { background: var(--sun-soft); color: var(--sun-2); }
.atp-secno.full { background: var(--sun-grad); color: #fff; }
.atp-sectitle {
  flex: 1; min-width: 0; font-size: 15px; font-weight: 700;
  letter-spacing: 0; line-height: 1.4; text-transform: none; color: var(--text);
}
.atp-seccard .atp-wlist { padding: 0 16px; border-top: 1px solid var(--line); }
.atp-seccard .atp-wlist .atp-wrow:first-child { padding-top: 14px; }
.atp-seccard .atp-go { margin: 4px 16px 16px; width: calc(100% - 32px); }
.atp-secday {
  padding: 0 16px 14px 51px; margin-top: -4px;
  font-size: 11px; color: var(--text-dim);
}
.atp-seccard.waiting { opacity: .5; }
.atp-seccard.waiting .atp-sectitle { font-weight: 600; }

@media (min-width: 700px) {
  #view.atp-full .atp-seccard .atp-wlist { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
  #view.atp-full .atp-sectitle { font-size: 17px; }
  #view.atp-full .atp-seccard .atp-go { max-width: 320px; }
}
@media (min-width: 1100px) {
  #view.atp-full .atp-seccard .atp-wlist { grid-template-columns: repeat(3, 1fr); }
}
