/* 教育。style.css・flow.css・fm.css の上に重ねる（接頭辞 sh-） */
.sh-lead { margin: 0 0 8px; font-size: 13px; color: var(--ink2); }
.sh-note { margin: 8px 0 0; font-size: 12.5px; color: var(--ink2); background: var(--line2); border-radius: 8px; padding: 6px 10px; }
.sh-judge { margin: 8px 0 0; font-size: 13px; font-weight: 700; border-radius: 8px; padding: 7px 10px; }
.sh-judge.ok { background: #f0fdf4; color: #14532d; }
.sh-judge.ng { background: #fef2f2; color: #7f1d1d; }
.sh-judge.mid { background: #fffbeb; color: #78350f; }
.sh-flbl { margin: 10px 0 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.sh-box > .sh-flbl:first-child, .sh-box > h3:first-child { margin-top: 0; }
.sh-cast small { display: block; margin-top: 2px; font-size: 12px; font-weight: 700; color: #0f766e; }

/* だれが何をするか */
.sh-map { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: stretch; }
.sh-side { background: var(--line2); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sh-side.pref { background: #f5f3ff; }
.sh-side.local { background: #f0fdfa; }
.sh-sideh { margin: 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.sh-sbtns { display: grid; gap: 6px; }
.sh-sbtn { appearance: none; font: inherit; text-align: left; cursor: pointer; border: 1px solid var(--line); background: var(--paper); border-radius: 10px; padding: 8px 10px; color: var(--ink); display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sh-sbtn b { font-size: 13.5px; }
.sh-sbtn small { font-size: 11.5px; color: var(--muted); }
.sh-sbtn:hover { border-color: #94a3b8; }
.sh-sbtn[aria-pressed="true"] { background: #0f172a; border-color: #0f172a; color: #fff; }
.sh-sbtn[aria-pressed="true"] small { color: #cbd5e1; }
.sh-info { padding: 12px 16px; margin-top: 10px; }
.sh-info h3 { margin: 0 0 8px; font-size: 16px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.sh-info h3 small { font-size: 12px; font-weight: 500; color: var(--muted); }
.sh-dl { margin: 0; display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 6px 12px; font-size: 13.5px; }
.sh-dl dt { font-size: 12px; font-weight: 700; color: var(--muted); padding-top: 2px; }
.sh-dl dd { margin: 0; color: var(--ink2); }

/* 道具の箱 */
.sh-tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.sh-box { padding: 12px 14px; min-width: 0; }
.sh-box > h3 { margin: 0 0 8px; font-size: 15px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.sh-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.sh-fields.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sh-fields.one { grid-template-columns: minmax(0, 1fr); }
.sh-fields label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 700; color: var(--ink2); min-width: 0; }
.sh-fields input { font: inherit; font-size: 15px; font-weight: 500; color: var(--ink); background: #f8fafc; border: 1px solid #cbd5e1; border-radius: 9px; padding: 6px 9px; min-width: 0; width: 100%; box-sizing: border-box; }
.sh-out { margin-top: 10px; }
.sh-ntab th, .sh-dtab th { font-size: 12.5px; width: 9em; }
.sh-ntab td, .sh-dtab td { font-size: 13px; color: var(--ink2); }
.sh-ntab small, .sh-dtab small { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.sh-dtab th { width: auto; }
.sh-dtab td.n { text-align: right; font-family: var(--latin); white-space: nowrap; color: var(--ink); }
.sh-dtab tr.tot th, .sh-dtab tr.tot td { font-weight: 700; border-top: 2px solid var(--line); }
.sh-big2 { font: 700 20px var(--sans); color: #1d4ed8; }

/* 表簿の保存 */
.sh-rtab th { font-weight: 500; }
.sh-rtab td.sh-y { font-weight: 700; white-space: nowrap; }

/* 学校コード */
.sh-code { max-width: 46em; }
.sh-parts { margin: 10px 0 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.sh-parts span { display: inline-flex; flex-direction: column; align-items: flex-start; background: var(--line2); border-radius: 8px; padding: 4px 9px; font-size: 11.5px; color: var(--muted); }
.sh-parts b { font: 600 15px var(--latin); color: var(--ink); }
.sh-ctab { border-collapse: collapse; font-size: 12px; width: 100%; }
.sh-ctab th { text-align: left; font-weight: 700; color: var(--muted); padding: 3px 6px 3px 0; white-space: nowrap; font-size: 11.5px; }
.sh-ctab td { text-align: center; font-family: var(--latin); padding: 3px 2px; border-bottom: 1px solid var(--line2); min-width: 1.6em; }
.sh-ctab td.sh-ten { background: #fef3c7; font-weight: 700; }
.sh-ctab td.sh-sum { font-weight: 700; color: #1d4ed8; padding-left: 8px; }
.sh-ctab tr.ge th, .sh-ctab tr.gt th { color: var(--ink2); }
.sh-cds { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--ink2); }
.sh-cds b { font: 700 16px var(--latin); color: #1d4ed8; }

/* 練習（重要性分類・生成 AI） */
.sh-quiz { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sh-q { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sh-q > p:first-child { margin: 0; font-size: 13.5px; color: var(--ink); }
.sh-q.ok { border-color: #86efac; }
.sh-q.ng { border-color: #fca5a5; }
.sh-two, .sh-four { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sh-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sh-two button, .sh-four button { appearance: none; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; border: 1px solid var(--line); background: var(--paper); border-radius: 10px; padding: 7px 8px; color: var(--ink2); }
.sh-four button { font-size: 15px; color: var(--ink); }
.sh-two button:hover, .sh-four button:hover { border-color: #94a3b8; }
.sh-two button[aria-pressed="true"], .sh-four button[aria-pressed="true"] { background: #0f172a; border-color: #0f172a; color: #fff; }
.sh-fb { margin: 0; font-size: 12.5px; border-radius: 8px; padding: 6px 10px; background: var(--line2); color: var(--ink2); }
.sh-fb .srcl { display: block; margin-top: 4px; font-size: 11.5px; }
.sh-q.ok .sh-fb { background: #f0fdf4; color: #14532d; }
.sh-q.ng .sh-fb { background: #fef2f2; color: #7f1d1d; }
.sh-score { margin: 8px 0 0; font-size: 13px; font-weight: 700; color: var(--ink2); }

/* データの形 */
.sh-tbl dl { margin: 6px 0 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 10px; font-size: 12.5px; }
.sh-tbl dt { font: 600 12px var(--latin); color: var(--ink); overflow-wrap: anywhere; }
.sh-tbl dd { margin: 0; color: var(--ink2); }
#shDataNotes { margin-top: 10px; }

.sh-sbtn:focus-visible, .sh-two button:focus-visible, .sh-four button:focus-visible, .sh-fields input:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
@media (max-width: 1100px) {
  .sh-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sh-tools { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .sh-map, .sh-quiz { grid-template-columns: minmax(0, 1fr); }
  .sh-dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .sh-dl dd { margin-bottom: 6px; }
  .sh-fields, .sh-fields.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sh-ntab th { width: auto; }
  .sh-ctab th { white-space: normal; max-width: 6em; }
  .sh-ctab td { min-width: 0; padding: 3px 1px; }
  /* 表は 1 行ずつのカードに */
  .sh-rtab thead { display: none; }
  .sh-rtab tr, .sh-dtab tr { display: grid; grid-template-columns: minmax(0, 1fr); border-bottom: 1px solid var(--line); padding: 6px 0; }
  .sh-rtab th, .sh-rtab td, .sh-dtab th, .sh-dtab td { border: 0; padding: 2px 4px; text-align: left !important; white-space: normal !important; }
  .sh-rtab td[data-l]::before { content: attr(data-l); display: block; font: 700 11px var(--sans); color: var(--muted); }
}
