/* クライマーOS(2026-11-21 管理画面セッション)。「○○塾 管理画面」の部品をもとに、左のメニューの形にした。
   見た目は Apple のような落ち着いた白とグレー、色はデジタル屋さんの緑。 */
  :root {
    --bg: #f5f5f7; --card: #ffffff; --text: #1d1d1f; --muted: #6e6e73; --line: #e5e5ea; --soft: #f2f2f7;
    --primary: #22b52b; --primary-dark: #1b9122; --accent: #22b52b; --tint: #def3df; --alt: #eef9ee; --deep: #135f18; /* キーカラー #22b52b(2026-11-21 一哲) */
    --btn: #17851f; --btn-dark: #126b19; /* 白い字のボタンだけ濃い緑(読みやすさ。2026-11-22 一哲「ボタンだけ濃くする」) */
    --warn: #a55a00; --danger: #c62828; --line-green: #06c755;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.05);
  }
  * { box-sizing: border-box; }
  html { font-size: 17px; }
  body { margin: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif; line-height: 1.65; -webkit-font-smoothing: antialiased; }
  .hidden { display: none !important; }
  .demo { background: #fff6ea; color: var(--warn); text-align: center; font-size: 0.8rem; font-weight: 700; padding: 5px 16px; }
  h2 { font-size: 1.15rem; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .badge { display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--tint); color: var(--deep); }
  .muted { color: var(--muted); font-size: 0.88rem; }
  .card { background: var(--card); border-radius: 18px; padding: 20px 22px; margin-bottom: 14px; box-shadow: var(--shadow); }
  button { font: inherit; cursor: pointer; min-height: 44px; padding: 8px 18px; border-radius: 999px; border: none; background: var(--soft); color: var(--text); font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
  button:hover { background: #e8e8ed; }
  button.primary { background: var(--btn); color: #fff; }
  button.primary:hover { background: var(--btn-dark); }
  button.danger { background: #fdecec; color: var(--danger); }
  button.small { min-height: 36px; padding: 4px 14px; font-size: 0.85rem; }
  a.btnlink { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 24px; border-radius: 999px; background: var(--btn); color: #fff; font-weight: 700; text-decoration: none; }
  a.btnlink:hover { background: var(--btn-dark); }
  a.btnlink:focus-visible { outline: 3px solid #86efac; outline-offset: 2px; }
  .classroom-code { margin: 0 0 14px; font-size: 0.95rem; }
  .classroom-code strong { font-size: 1.4rem; letter-spacing: 0.08em; margin-left: 6px; }
  button.white { background: #fff; border: 1px solid var(--line); }
  button:disabled { opacity: 0.45; cursor: not-allowed; }
  button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #86efac; outline-offset: 2px; }
  input[type="text"], input[type="password"], input[type="search"], select { font: inherit; min-height: 46px; padding: 6px 12px; border: 1px solid #d2d2d7; border-radius: 12px; background: #fff; color: var(--text); max-width: 100%; }
  details.help { display: inline-block; }
  details.help summary { list-style: none; cursor: pointer; display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 50%; font-size: 0; color: transparent; }
  details.help summary::-webkit-details-marker { display: none; }
  details.help summary::before { content: "?"; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--primary); color: var(--primary); font-size: 0.8rem; font-weight: 700; box-sizing: border-box; }
  details.help[open] summary::before { background: var(--primary); color: #fff; }
  .helptext { font-size: 0.88rem; color: var(--muted); font-weight: 400; background: var(--soft); border-radius: 12px; padding: 10px 14px; margin: 6px 0 10px; width: 100%; }
  .msg { border-radius: 12px; padding: 10px 14px; font-size: 0.92rem; margin: 0 0 14px; }
  .msg.ok { background: var(--alt); color: var(--deep); }
  .msg.err { background: #fdecec; color: #7f1d1d; }
  .msg.warn { background: #fff6ea; color: #5c3a00; }
  .code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 1.25rem; letter-spacing: 0.08em; background: #fff; border: 1px dashed var(--accent); border-radius: 10px; padding: 4px 12px; display: inline-block; user-select: all; }
  /* 今日やること */
  .steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
  .steps li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: var(--soft); }
  .steps li.next { background: var(--alt); outline: 2px solid var(--accent); }
  .steps .mark { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex: none; background: #fff; color: var(--muted); border: 1.5px solid var(--line); }
  .steps li.done .mark { background: var(--primary); color: #fff; border-color: var(--primary); }
  .steps li.next .mark { color: var(--primary); border-color: var(--primary); }
  .steps .txt { flex: 1; min-width: 0; }
  .steps .txt b { display: block; font-size: 1.02rem; }
  .steps .txt span { color: var(--muted); font-size: 0.88rem; }
  .steps .tag { font-size: 0.75rem; font-weight: 700; color: var(--primary); display: block; }
  /* 表 */
  table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
  th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
  th { color: var(--muted); font-size: 0.8rem; font-weight: 600; }
  td.act { text-align: right; white-space: nowrap; }
  .pill { display: inline-block; font-size: 0.8rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--soft); color: var(--muted); white-space: nowrap; }
  .pill.ok { background: var(--tint); color: var(--deep); }
  .pill.wait { background: #fff1db; color: var(--warn); }
  .toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 4px 0 12px; }
  .form { display: grid; gap: 10px; background: var(--soft); border-radius: 14px; padding: 14px 16px; margin: 0 0 12px; }
  .form .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
  .form label { font-size: 0.85rem; color: var(--muted); font-weight: 600; min-width: 4em; }
  .waitlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
  .waitlist li { background: #fff6ea; border-radius: 14px; padding: 12px 14px; display: grid; gap: 8px; }
  .contacts { list-style: none; margin: 0; padding: 0; }
  .contacts li { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); align-items: center; }
  .contacts li:last-child { border-bottom: none; }
  .contacts .kind { font-weight: 800; color: var(--primary); min-width: 3em; }
  .contacts .sum { grid-column: 2 / 4; color: var(--muted); font-size: 0.9rem; }
  .stat { font-size: 1.9rem; font-weight: 800; line-height: 1.2; }
  .stat small { font-size: 0.9rem; color: var(--muted); font-weight: 600; }
  .bar2 { height: 10px; border-radius: 999px; background: var(--soft); overflow: hidden; margin: 8px 0 4px; }
  .bar2 i { display: block; height: 100%; background: var(--accent); }
  .grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
  /* 入口 */
  .loginwrap { max-width: 440px; margin: 40px auto; padding: 0 16px; }
  .brand { text-align: center; margin-bottom: 18px; }
  .brand .logo { width: 56px; height: 56px; border-radius: 16px; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.3rem; }
  .brand h1 { margin-top: 10px; }
  .linebtn { width: 100%; min-height: 56px; background: var(--line-green); color: #fff; font-size: 1.1rem; border-radius: 14px; }
  .linebtn:hover { background: var(--line-green); }
  .or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.85rem; margin: 18px 0; }
  .or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
  .field { display: grid; gap: 4px; margin-bottom: 12px; }
  .field label { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
  .field input { width: 100%; }
  .wide { width: 100%; }
  .linkbtn { background: none; color: var(--primary); padding: 4px 2px; min-height: 36px; }
  .linkbtn:hover { background: none; text-decoration: underline; }
  .busy { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); background: rgba(29,29,31,0.88); color: #fff; padding: 8px 16px; border-radius: 999px; font-size: 0.85rem; z-index: 10; }
  .confirm { background: #fff6ea; border-radius: 12px; padding: 10px 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; font-size: 0.9rem; }
  @media (max-width: 640px) {
    html { font-size: 16px; }
    .hide-sm { display: none; }
    .card { padding: 16px; }
    .steps li { flex-wrap: wrap; }
    .steps li > button { width: 100%; }
    td.act { white-space: normal; }
    td.act button { display: block; width: 100%; margin: 4px 0 0 !important; }
    th, td { padding: 10px 4px; }
    td { overflow-wrap: anywhere; }
    td.act button { padding: 4px 10px; }
  }
  /* ===== 出席扱いの支援(2026-11-17) ===== */
  input[type="date"], input[type="time"], input[type="number"], textarea { font: inherit; min-height: 46px; padding: 6px 12px; border: 1px solid #d2d2d7; border-radius: 12px; background: #fff; color: var(--text); max-width: 100%; }
  textarea { width: 100%; line-height: 1.6; resize: vertical; }
  textarea:disabled { background: var(--soft); }
  input:focus-visible, textarea:focus-visible { outline: 3px solid #86efac; outline-offset: 2px; }
  .form .field { margin: 0; }
  .form .field.wide2 { width: 100%; }
  .form .field input[type="text"] { min-width: 12em; }
  .wide2 input { width: 100%; }
  .subnav { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
  .subnav button { min-height: 38px; padding: 6px 16px; font-size: 0.9rem; font-weight: 700; color: var(--muted); }
  .subnav button.on { background: var(--btn); color: #fff; }
  .kv { display: grid; grid-template-columns: 9em 1fr; gap: 6px 14px; font-size: 0.95rem; margin: 0; }
  .kv dt { color: var(--muted); font-size: 0.85rem; font-weight: 600; padding-top: 2px; }
  .kv dd { margin: 0; }
  .note { background: var(--soft); border-radius: 12px; padding: 10px 14px; font-size: 0.92rem; white-space: pre-wrap; }
  .consent { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .consent .what { flex: 1; }
  .cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
  .cal .wd { text-align: center; color: var(--muted); font-size: 0.78rem; font-weight: 700; }
  .cal .d { min-height: 86px; background: var(--soft); border-radius: 12px; padding: 6px 7px; font-size: 0.78rem; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  .cal .d.out { background: transparent; }
  .cal .d.today { outline: 2px solid var(--accent); }
  .cal .d .n { font-weight: 700; color: var(--muted); }
  .cal .d.sat .n { color: #2563eb; } .cal .d.sun .n { color: var(--danger); }
  .chip { display: inline-block; border-radius: 8px; padding: 2px 6px; font-weight: 700; line-height: 1.35; font-size: 0.78rem; overflow-wrap: anywhere; }
  .chip.room { background: var(--primary); color: #fff; }
  .chip.online { background: #dbeafe; color: #1e3a8a; }
  .chip.short { background: #fff; color: var(--muted); border: 1px dashed #c7c7cc; font-weight: 600; }
  .chip.warn { background: #fff1db; color: var(--warn); }
  .chip small { display: block; font-weight: 600; opacity: 0.9; }
  .legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: 0.85rem; color: var(--muted); align-items: center; }
  .sum3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
  .sum3 .box { background: var(--soft); border-radius: 14px; padding: 12px 14px; }
  tr.removed td { color: var(--muted); text-decoration: line-through; }
  tr.removed td.act, tr.removed td .pill { text-decoration: none; }
  details.fixlog { font-size: 0.8rem; color: var(--muted); }
  details.fixlog ul { margin: 4px 0 0; padding-left: 1.2em; }
  .printcard { display: flex; gap: 16px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; width: fit-content; max-width: 100%; }
  .printcard img { width: 180px; height: 180px; image-rendering: pixelated; flex: none; }
  .printcard .nm { font-weight: 800; font-size: 1.15rem; }
  /* 受付(タブレット) */
  .recep { max-width: 1040px; margin: 0 auto; padding: 18px 16px 48px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; align-items: start; }
  .cam { background: #1d1d1f; border-radius: 22px; min-height: 430px; position: relative; overflow: hidden; color: #fff; }
  .cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .cam .frame { position: absolute; left: 50%; top: 45%; width: 220px; height: 220px; transform: translate(-50%, -50%); border: 4px solid #86efac; border-radius: 22px; box-shadow: 0 0 0 999px rgba(0,0,0,0.35); }
  .cam .hint { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; font-size: 1.15rem; font-weight: 700; padding: 0 12px; }
  .cam .cammsg { position: absolute; left: 16px; right: 16px; top: 16px; background: rgba(255,255,255,0.95); color: #7f1d1d; border-radius: 12px; padding: 10px 14px; font-size: 0.92rem; }
  .flashok { background: var(--alt); border-radius: 18px; padding: 18px 20px; display: flex; gap: 14px; align-items: center; margin-bottom: 14px; outline: 2px solid var(--accent); }
  .flashok.out { background: #eff6ff; outline-color: #93c5fd; }
  .flashok .okmark { width: 46px; height: 46px; border-radius: 50%; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 800; flex: none; }
  .flashok.out .okmark { background: #1e3a8a; }
  .flashok .big { font-size: 1.6rem; font-weight: 800; line-height: 1.3; }
  .card.idle { color: var(--muted); text-align: center; padding: 26px; }
  .scanlog { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow-y: auto; }
  .scanlog li { display: flex; justify-content: space-between; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
  .scanlog li:last-child { border-bottom: none; }
  .inout { font-weight: 800; }
  .inout.in { color: var(--primary); } .inout.out { color: #1e3a8a; }
  @media (max-width: 760px) {
    .recep { grid-template-columns: 1fr; }
    .cam { min-height: 340px; }
  }
  @media (max-width: 640px) {
    .kv { grid-template-columns: 1fr; gap: 0 14px; }
    .kv dd { margin-bottom: 8px; }
    .cal { gap: 3px; }
    .cal .d { min-height: 58px; padding: 4px; font-size: 0.7rem; border-radius: 8px; }
    .chip { font-size: 0.66rem; padding: 1px 3px; }
    .chip small { display: none; }
    .printcard { flex-direction: column; }
  }
  @media print {
    body * { visibility: hidden; }
    .printcard, .printcard * { visibility: visible; }
    .printcard { position: absolute; left: 0; top: 0; border: 1px solid #999; }
    .busy, .demo { display: none !important; }
  }

  /* ===== クライマーOS の枠 ===== */
  :root { --side: 256px; }
  h1 { font-size: 1.5rem; margin: 0; letter-spacing: 0.01em; }
  .center { text-align: center; }
  .small { font-size: 0.82rem; }
  .ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
  .logo { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(160deg, #22a04b, var(--primary-dark)); display: inline-flex; align-items: center; justify-content: center; flex: none; }
  .logo svg { width: 22px; height: 22px; fill: #fff; }
  .logo.big { width: 64px; height: 64px; border-radius: 18px; }
  .logo.big svg { width: 44px; height: 44px; }
  .brandrow { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; }
  .logoimg { display: block; height: 30px; width: auto; max-width: 100%; }
  .logoimg.big { height: auto; width: 320px; margin: 4px auto 10px; }
  .mobilebar .logoimg { height: 24px; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: var(--side); background: rgba(250,250,252,0.92); backdrop-filter: blur(18px); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 14px 14px; gap: 14px; z-index: 20; overflow-y: auto; }
  body:has(#demoBanner:not(.hidden)) .side { top: 28px; }
  /* 受付(QR)の画面の上の帯 */
  header.top { background: rgba(255,255,255,0.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
  header.top .in { max-width: 1040px; margin: 0 auto; padding: 12px 16px; }
  .titlerow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .titlerow .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
  .sidetop { display: flex; align-items: center; justify-content: space-between; padding: 0 6px; }
  .schoolbox { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: grid; gap: 6px; }
  .schoolbox b { font-size: 0.98rem; line-height: 1.4; }
  .schoolbox .label { font-size: 0.75rem; color: var(--muted); font-weight: 700; }
  .schoolbox select { width: 100%; min-height: 40px; font-weight: 700; }
  .schoolbox .badge { justify-self: start; }
  .sidenav { display: grid; gap: 2px; }
  .sidenav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.97rem; }
  .sidenav a .ico { color: var(--muted); }
  .sidenav a:hover { background: var(--soft); }
  .sidenav a.on { background: var(--tint); color: var(--deep); }
  .sidenav a.on .ico { color: var(--primary); }
  .sidenav a:focus-visible { outline: 3px solid #86efac; outline-offset: 1px; }
  .sidefoot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 6px 0; border-top: 1px solid var(--line); font-size: 0.9rem; }
  .iconbtn { min-height: 40px; width: 40px; padding: 0; border-radius: 12px; background: transparent; }
  .iconbtn:hover { background: var(--soft); }
  .iconbtn .ico { width: 22px; height: 22px; }
  .closenav, .mobilebar, .scrim { display: none; }
  .pagecol { margin-left: var(--side); min-height: 100vh; }
  main { max-width: 1080px; margin: 0 auto; padding: 28px 28px 56px; }
  .pagehead { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 0 0 18px; }
  /* 生徒の名簿 */
  .tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.roster th.feat, table.roster td.feat { text-align: center; white-space: nowrap; }
  table.roster th.chk, table.roster td.chk { width: 34px; padding-right: 0; }
  table.roster input[type="checkbox"], .checkline input { width: 20px; height: 20px; accent-color: var(--primary); }
  table.roster tr.sel td { background: var(--alt); }
  .thbtn { background: none; min-height: 32px; padding: 2px 4px; border-radius: 8px; color: var(--muted); font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
  .thbtn:hover { background: var(--soft); }
  .thbtn.on { color: var(--primary); }
  .switch { width: 50px; min-height: 30px; height: 30px; padding: 0; border-radius: 999px; background: #e5e5ea; position: relative; display: inline-block; vertical-align: middle; transition: background 0.15s; }
  .switch:hover { background: #d8d8de; }
  .switch .knob { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.25); transition: left 0.15s; }
  .switch.on { background: var(--accent); }
  .switch.on:hover { background: var(--primary); }
  .switch.on .knob { left: 23px; }
  .featchips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
  .fchip { min-height: 38px; padding: 4px 14px; background: var(--soft); font-size: 0.88rem; }
  .fchip b { margin-left: 6px; font-weight: 800; }
  .fchip.on { background: var(--btn); color: #fff; }
  .bulkbar { position: sticky; top: 8px; z-index: 3; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--deep); color: #fff; border-radius: 14px; padding: 10px 14px; margin: 0 0 12px; box-shadow: var(--shadow); }
  .bulkbar select { min-height: 38px; }
  .bulkbar .linkbtn { color: #d1fae5; }
  .checkline { display: inline-flex; align-items: center; gap: 6px; font-size: 0.95rem !important; color: var(--text) !important; font-weight: 600; min-width: 0 !important; margin-right: 10px; }
  .featstats { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
  .featstats li { display: flex; justify-content: space-between; background: var(--soft); border-radius: 12px; padding: 10px 14px; }
  .contacts.schools li.on { background: var(--alt); border-radius: 12px; padding-left: 10px; padding-right: 10px; }
  @media (max-width: 900px) {
    .side { transform: translateX(-105%); transition: transform 0.2s; box-shadow: 0 0 40px rgba(0,0,0,0.18); top: 0 !important; }
    body.navopen .side { transform: none; }
    body.navopen .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.25); z-index: 15; }
    .closenav { display: inline-flex; }
    .pagecol { margin-left: 0; }
    .mobilebar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,0.92); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); padding: 8px 12px; }
    .mobilebar .mschool { margin-left: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 45vw; }
    main { padding: 18px 16px 48px; }
  }
  @media print {
    .side, .mobilebar, .scrim { display: none !important; }
    .pagecol { margin-left: 0; }
  }

  /* ===== 月次テストと生徒ごとの画面(2026-11-22 段2) ===== */
  .pill.ng { background: #fdecec; color: var(--danger); }
  .pill.info { background: #e0edff; color: #1e3a8a; }
  .namelink { color: var(--text); font-weight: 700; text-decoration: none; border-bottom: 1px dashed #b7b7bd; }
  .namelink:hover { color: var(--primary-dark); border-bottom-color: var(--primary); }
  .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.04em; }
  .gbadge { display: inline-flex; align-items: center; justify-content: center; min-width: 1.7em; height: 1.7em; border-radius: 7px; font-weight: 800; font-size: 0.82rem; background: var(--soft); color: var(--muted); }
  .gbadge.S { background: var(--btn); color: #fff; } .gbadge.A { background: var(--tint); color: var(--deep); }
  .gbadge.B { background: #e0edff; color: #1e3a8a; } .gbadge.C { background: #fff1db; color: var(--warn); } .gbadge.D { background: #fdecec; color: var(--danger); }
  .rcard.approved { border-left: 4px solid var(--primary); }
  .rhead { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
  .fields { list-style: none; padding: 0; margin: 10px 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.9rem; color: var(--muted); }
  .commentbox { white-space: pre-wrap; background: var(--soft); border-radius: 12px; padding: 12px 14px; }
  .rcard h3, .card h3 { font-size: 0.92rem; margin: 14px 0 6px; color: var(--muted); }
  .sumrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
  .sumlabel { font-weight: 700; min-width: 4.5em; }
  .sectiontitle { margin: 22px 0 10px; font-size: 1.05rem; }
  .featlist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
  .featlist li { display: flex; justify-content: space-between; align-items: center; background: var(--soft); border-radius: 12px; padding: 8px 12px; font-weight: 600; }
  .logininfo { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 8px; font-size: 1.05rem; }
  .logininfo dt { color: var(--muted); font-size: 0.9rem; }
  .logininfo dd { margin: 0; font-weight: 700; }
  .goalrow, .unitrow { margin: 0 0 6px; }
  .bar2.thin { height: 5px; margin: 4px 0 0; }
  .preview { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 4px; }
  td.qtext { white-space: pre-wrap; min-width: 16em; }
  .fieldpick { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 6px; }
  .form .row.top { align-items: flex-start; }
  .checklines { list-style: none; padding: 0; margin: 10px 0 0; font-size: 0.9rem; }
  .checklines li { padding: 3px 0; }
  .checklines li.head { font-weight: 800; margin-top: 8px; }
  .checklines li.bad { color: var(--danger); font-weight: 700; }
  .checklines li.warn { color: var(--warn); }
  .toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: rgba(29,29,31,0.92); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 0.9rem; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 60; max-width: calc(100vw - 32px); }
  .toast.show { opacity: 1; transform: translate(-50%, 0); }
  .mtprint { display: none; }
  @media print {
    body.printing .mtprint, body.printing .mtprint * { visibility: visible; }
    body.printing .mtprint { display: block; position: absolute; left: 0; top: 0; width: 100%; }
    body.printing #app { display: none; }
    .paperpage { page-break-after: always; padding: 8mm; color: #000; }
    .paperpage h2 { font-size: 18pt; margin: 4px 0 10px; }
    .pschool { font-size: 10pt; color: #444; }
    .psubj { border: 1px solid #999; border-radius: 6px; padding: 8px 10px; margin: 0 0 10px; }
    .phead { font-weight: 800; margin-bottom: 6px; }
    .psubj table, .phist { width: 100%; border-collapse: collapse; font-size: 10pt; }
    .psubj th, .psubj td, .phist th, .phist td { border: 1px solid #bbb; padding: 3px 6px; }
    .pcomment { white-space: pre-wrap; margin: 8px 0; }
    .pgoal { font-weight: 700; }
    .pnote { font-size: 9pt; color: #555; }
    .logincard { display: inline-block; width: 46%; margin: 0 2% 12px 0; border: 1px dashed #777; padding: 10px; vertical-align: top; page-break-inside: avoid; color: #000; }
    .logincard h3 { font-size: 10pt; margin: 0 0 6px; color: #000; }
    .logincard dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0; font-size: 12pt; }
    .logincard dd { margin: 0; font-family: ui-monospace, Menlo, monospace; font-weight: 700; }
  }
  input[type="number"] { width: 6em; }
  /* 出題の表(2026-11-22 一哲「ズラーっと並んでるのも見づらい」) */
  table.gridtable { width: auto; min-width: 100%; border-collapse: separate; border-spacing: 8px; margin: 0 -8px; }
  table.gridtable th { text-align: left; font-size: 0.95rem; border: none; padding: 4px 6px; }
  table.gridtable td { border: none; padding: 0; }
  .cell { width: 100%; min-height: 64px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 14px; border-radius: 14px; background: var(--soft); border: 2px solid transparent; text-align: left; }
  .cell.ok { background: var(--alt); }
  .cell.todo { background: #fff8ec; }
  .cell.fix { background: #fdf1f1; }
  .cell.on { border-color: var(--primary); }
  /* デジタル屋さん(2026-11-23 段4) */
  .grid4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 14px; }
  .grid4 .card h2 { font-size: 0.95rem; }
  .digital .tablewrap table { min-width: 560px; }
  .digital .tablewrap table.digitable { min-width: 900px; }
  .nowrap { white-space: nowrap; }
  table.digitable td { vertical-align: top; }
  table.digitable td .pill { margin-top: 2px; }
  tr.muted td { color: var(--muted); }
  /* バーチャル教室(2026-11-23 段3) */
  .vcpresence { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
  .vccall { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--alt); border-radius: 14px; padding: 12px 14px; }
  .vcqs { display: grid; gap: 12px; }
  .vcq { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
  .vcq.done { background: var(--soft); border-color: transparent; }
  .vcqhead { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
  .vcqtext { margin: 8px 0; white-space: pre-wrap; }
  .vcanswer { border-left: 3px solid var(--primary); padding-left: 10px; margin-top: 8px; }
  img.qphoto { display: block; max-width: 100%; max-height: 260px; border-radius: 10px; margin: 6px 0; }
  img.qphoto.small { max-height: 90px; display: inline-block; margin: 0; }
  .vcpage textarea { width: 100%; }
  table.vcvisits td { vertical-align: top; }
  .vcpage .tablewrap table.vcvisits, .stu-vc .tablewrap table.vcvisits { min-width: 620px; }
