/* 2026-10-03 新デザインの見本から取り込んだ 5 項目の見た目（style.css の次に読む。色・既定のテーマ・配色・背景は触らない）。
   色は style.css・theme-dark.css が持つ変数（--ink・--muted・--green・--line・--bg、ダークでは --surface・--surface2）を使い、
   ライトでは変数が無い --surface・--surface2 は、今までと同じ色（#fff・#eaf2ed）を fallback にする。 */

/* ---- ⑤ 見本に寄せる: カード・見出し・下メニュー（現行 CSS の値は 現行CSSとの対応.md のとおり、すでに同じ。違っていた読みやすさだけ合わせる） ---- */
/* カードの本文は 12px だった。見本に合わせて通常の文字の大きさ（1em）・行間 1.8 にする */
.card p{font-size:1em;line-height:1.8}
.card h3{line-height:1.6}
.card h2{line-height:1.5}
.card{min-width:0;overflow-wrap:anywhere}
/* 操作部分は 46px 以上（見本の通常ボタン） */
.card button.primary,.card button.secondary{min-height:46px}
/* 数値カードのラベルの行間 */
.stat{line-height:1.6}
@media(max-width:850px){
  /* 下メニューの高さと余白。端末の下端（安全領域）を足す。本文・固定ボタンの余白は style.css の --bottom-nav を使い続ける */
  nav{padding-bottom:calc(6px + env(safe-area-inset-bottom,0px))}
  nav button{line-height:1.3}
}

/* ---- ① 今日の学習（ホーム） ---- */
.today-card{margin:0 0 18px}
.today-card h2{margin:8px 0 12px}
.today-bar{height:12px;border-radius:99px;background:var(--line);overflow:hidden}
.today-bar span{display:block;height:100%;min-width:0;border-radius:99px;background:var(--green);transition:width .4s}
.today-nums{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:16px 0 6px}
.today-nums>div{min-width:0;padding:12px;background:var(--bg);border:1px solid var(--line);border-radius:10px}
.today-nums span{display:block;font-size:12px;line-height:1.5;color:var(--muted)}
.today-nums b{display:block;margin-top:2px;font-size:26px;line-height:1.35;color:var(--ink)}
.today-nums b small{margin-left:3px;font-size:12px;font-weight:400;color:var(--muted)}
.today-nums>div>small{display:block;font-size:12px;line-height:1.5;color:var(--muted)}
.today-nums .today-none{font-size:14px;font-weight:700}
.today-card .today-msg{margin:12px 0 0;font-weight:700;color:var(--ink)}
.today-card .today-note{margin:2px 0 0;font-size:13px}
@media(max-width:600px){
  .today-nums{gap:6px}
  .today-nums>div{padding:10px 8px}
  .today-nums b{font-size:22px}
  .today-nums span{font-size:11px}
}

/* ---- ② 復習（プレミアム）と、問題の画面の「保存」 ---- */
.review-entry .chip{margin-left:6px;vertical-align:middle}
.review-grid{align-items:start}
.review-block h2{margin:8px 0 4px}
.review-block .tools{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:16px}
.review-list{list-style:none;margin:14px 0 0;padding:0;display:grid;gap:8px}
.review-row{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0;padding:6px 6px 6px 14px;border:1px solid var(--line);border-radius:10px;background:var(--bg);font-size:14px}
.review-row>span{min-width:0}
.review-remove{flex-shrink:0;min-height:44px;padding:6px 14px;font-size:13px}
.review-empty{margin:14px 0 0;padding:14px;border:1px dashed var(--line);border-radius:10px;font-size:14px;color:var(--muted)}
.keep-row{display:flex;justify-content:flex-end;margin:10px 0 0}
.keep-btn{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:8px 14px;border-radius:8px}
.keep-btn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.keep-btn[aria-pressed="true"]{background:var(--surface2,#eaf2ed);border-color:var(--green);color:var(--green);font-weight:700}
.keep-btn[aria-pressed="true"] svg{fill:currentColor}
@media(max-width:850px){.review-grid{grid-template-columns:1fr}}

/* ---- ④ 表示の設定（アカウント画面） ---- */
.display-chooser .display-label{margin:10px 0 4px;font-size:13px;font-weight:700}
.display-chooser .display-note{margin:4px 0 12px;font-size:12px}
.check-row{display:flex;align-items:center;gap:10px;min-height:44px;margin-top:8px;font-size:14px}
.check-row input{flex-shrink:0;width:22px;height:22px;accent-color:var(--green)}
.goal-row{display:grid;gap:6px;margin-top:8px}
.goal-row select{width:100%;min-height:48px;padding:9px 12px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink);font-size:16px}

/* 本文の文字サイズ（16px は今のまま＝属性なし。18px・20px は <html data-fs> で、読む文字だけ大きくする） */
html[data-fs]{--fs-read:18px;--fs-prompt:22px;--fs-sm:15px;--fs-ui:17px}
html[data-fs="20"]{--fs-read:20px;--fs-prompt:24px;--fs-sm:17px;--fs-ui:19px}
html[data-fs] body{font-size:var(--fs-ui)}
html[data-fs] .embedded-prompt{font-size:var(--fs-prompt)}
html[data-fs] .option .option-text,html[data-fs] .explain-summary,html[data-fs] .explain-choices li,html[data-fs] .feedback,html[data-fs] .note-block p,html[data-fs] .note-block li,html[data-fs] .note-block ol,html[data-fs] .note-block .callout,html[data-fs] .note-block .result,html[data-fs] .note-block td,html[data-fs] .note-block th,html[data-fs] .people-steps{font-size:var(--fs-read)}
html[data-fs] .card p,html[data-fs] .intro p,html[data-fs] .muted,html[data-fs] .explain-law,html[data-fs] .explain-note,html[data-fs] .lang-note,html[data-fs] .scoring-note,html[data-fs] .mini-hero span,html[data-fs] .option-status,html[data-fs] .review-row,html[data-fs] .people-note,html[data-fs] .today-note{font-size:var(--fs-sm)}
html[data-fs] .today-card .today-msg{font-size:var(--fs-read)}

/* 画面の動きを減らす（<html data-motion="reduce">。端末の設定「視差効果を減らす」を入れている人は、これまでどおり止まる） */
html[data-motion="reduce"] *,html[data-motion="reduce"] *::before,html[data-motion="reduce"] *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}

/* ---- ③ 要点集の動く図解「売買の人物関係」 ---- */
.note-block .people-row{display:flex;flex-wrap:wrap;align-items:stretch;gap:8px;margin:16px 0}
.note-block .interactive button.people-person{display:flex;flex-direction:column;align-items:flex-start;gap:2px;flex:1 1 150px;min-width:0;min-height:92px;margin:0;padding:12px 14px;border:2px solid var(--line);border-radius:10px;background:var(--surface,#fff);color:var(--ink);font-size:14px;text-align:left}
.note-block .people-person strong{font-size:15px;line-height:1.5}
.note-block .people-person span{font-size:13px;line-height:1.5}
.note-block .people-person em{margin-top:auto;font-style:normal;font-size:12px;line-height:1.5;color:var(--muted)}
.note-block .interactive button.people-person.has-effect{border-color:var(--green)}
.note-block .people-person.has-effect em{color:var(--green);font-weight:700}
.note-block .interactive button.people-person[aria-pressed="true"]{background:var(--green-strong,var(--green))!important;border-color:var(--green);color:#fff}
.note-block .interactive button.people-person[aria-pressed="true"] em,.note-block .interactive button.people-person[aria-pressed="true"] span,.note-block .interactive button.people-person[aria-pressed="true"] strong{color:inherit}
.note-block .people-rel{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;flex:0 0 auto;min-width:88px;font-size:12px;line-height:1.4;text-align:center;color:var(--muted)}
.note-block .people-rel b{font-size:20px;line-height:1;color:var(--green)}
.note-block .people-steps{margin:14px 0 0;padding-left:1.4em;font-size:14.5px}
.note-block .people-steps li{margin:6px 0}
.note-block .people-note{margin:10px 0 0;font-size:13.5px;color:var(--muted)}
@media(max-width:600px){
  .note-block .people-row{flex-direction:column;gap:6px}
  .note-block .interactive button.people-person{flex:none;width:100%;min-height:80px}
  .note-block .people-rel{flex-direction:row;gap:8px;min-width:0}
  .note-block .people-rel b{transform:rotate(90deg)}
}
