/* AI と一緒に開発する。style.css と flow.css の上に重ねる（紫は AI の印） */
.tgrid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.tcard { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.tcard h3 { margin: 0; font-size: 15px; }
.tcard .ex { font-size: 11.5px; color: #5b21b6; font-weight: 700; }
.tcard p { margin: 0; font-size: 12.5px; color: var(--ink2); }
.tcard .gd, .tcard .cr { font-size: 12px; border-radius: 8px; padding: 6px 9px; }
.tcard .gd { background: #f0fdf4; color: #14532d; margin-top: auto; }
.tcard .cr { background: #fef2f2; color: #7f1d1d; }
.tcard .gd b, .tcard .cr b { display: block; font-size: 11px; }

/* 任せ方チェッカー */
.dlayout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.dtasks { display: flex; flex-wrap: wrap; gap: 6px; }
.dtask { --c: #64748b; appearance: none; font: inherit; font-size: 13px; font-weight: 700; text-align: left; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 10px; padding: 8px 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.dtask i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.dtask:hover { border-color: #94a3b8; }
.dtask[aria-pressed="true"] { border-color: var(--c); box-shadow: inset 0 0 0 1px var(--c); background: color-mix(in srgb, var(--c) 7%, white); }
.dtask:focus-visible, .pbtn:focus-visible, .pall:focus-visible, .mlist input:focus-visible, .ckreset:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
.lv-low { --c: #16a34a; } .lv-mid { --c: #d97706; } .lv-high { --c: #dc2626; }
.dlegend { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--muted); width: 100%; }
.dlegend span { display: inline-flex; align-items: center; gap: 6px; }
.dlegend i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.dresult { padding: 14px 16px; display: grid; gap: 10px; }
.dresult h3 { margin: 0; font-size: 16px; }
.dlv { display: inline-block; font-size: 13px; font-weight: 700; color: #fff; background: var(--c); border-radius: 8px; padding: 4px 10px; }
.dlv small { font-weight: 500; opacity: .9; margin-left: 6px; }
.dresult p { margin: 0; font-size: 13px; color: var(--ink2); }
.dresult .ck { background: var(--line2); border-radius: 8px; padding: 8px 10px; }
.dresult .ck b { display: block; font-size: 11px; color: var(--k-test); }
.dresult a { font-size: 12.5px; color: #1d4ed8; }

/* 頼み方の組み立て */
.playout { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 14px; align-items: start; }
.pparts, .pout { padding: 14px 16px; }
.pbtns { display: grid; gap: 6px; }
.pbtn { appearance: none; font: inherit; text-align: left; border: 1px solid var(--line); background: var(--paper); border-radius: 10px; padding: 8px 12px; cursor: pointer; display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 2px 8px; }
.pbtn::before { content: "+"; grid-row: span 2; width: 20px; height: 20px; border-radius: 6px; background: var(--line2); color: var(--ink2); display: grid; place-items: center; font-weight: 700; }
.pbtn b { font-size: 13.5px; }
.pbtn span { font-size: 12px; color: var(--muted); }
.pbtn[aria-pressed="true"] { border-color: #6d28d9; background: #f5f3ff; }
.pbtn[aria-pressed="true"]::before { content: "✓"; background: #6d28d9; color: #fff; }
.pall { appearance: none; font: inherit; font-size: 12.5px; font-weight: 700; margin-top: 10px; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.pmeter { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; margin-bottom: 10px; font-size: 13px; font-weight: 700; color: #5b21b6; }
.pbar { height: 10px; border-radius: 999px; background: var(--line2); overflow: hidden; }
.pbar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #a78bfa, #6d28d9); transform: scaleX(0); transform-origin: left center; transition: transform .3s; }
.ptext { margin: 0; white-space: pre-wrap; font-family: var(--sans); font-size: 13.5px; line-height: 1.75; background: #0f172a; color: #e2e8f0; border-radius: 10px; padding: 12px 14px; min-height: 120px; }
.pmiss { margin: 8px 0 0; font-size: 12.5px; color: var(--ink2); }

/* 進め方・研究・学ぶ・気をつける */
.fgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; counter-reset: fg; }
.fgrid li { counter-increment: fg; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px 11px 46px; position: relative; font-size: 12.5px; color: var(--ink2); }
.fgrid li::before { content: counter(fg); position: absolute; left: 14px; top: 11px; width: 22px; height: 22px; border-radius: 6px; background: #6d28d9; color: #fff; font-family: var(--latin); font-weight: 600; font-size: 12px; display: grid; place-items: center; }
.fgrid b { display: block; font-size: 14px; color: var(--ink); margin-bottom: 2px; }
.fgrid a { display: inline-block; margin-top: 4px; font-size: 12px; color: #1d4ed8; }
.sgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.scard { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; display: flex; flex-direction: column; gap: 6px; }
.scard .big { font-family: var(--latin); font-size: 30px; font-weight: 600; color: #5b21b6; line-height: 1.1; }
.scard .big small { font-family: var(--sans); font-size: 12.5px; font-weight: 700; color: var(--ink2); margin-left: 6px; }
.scard .who { font-size: 12px; font-weight: 700; color: var(--muted); }
.scard p { margin: 0; font-size: 12.5px; color: var(--ink2); }
.scard .ss { margin-top: auto; font-size: 11.5px; }
.scard .ss a, .lcard a, .ccard a { color: #1d4ed8; }
.lgrid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.cgrid2 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.lcard, .ccard { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; font-size: 12.5px; color: var(--ink2); display: flex; flex-direction: column; gap: 4px; }
.lcard b, .ccard b { font-size: 14px; color: var(--ink); }
.ccard a { font-size: 12px; margin-top: auto; }
#care .src { margin-top: 14px; }

/* チェックリスト */
.mlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mlist label { display: flex; gap: 10px; align-items: flex-start; padding: 7px 4px; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.mlist label:hover { background: var(--line2); }
.mlist input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--k-test); flex: none; }
.mlist input:checked + span { color: var(--muted); text-decoration: line-through; }
.ckfoot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.mcount { font-size: 12.5px; font-weight: 700; color: var(--k-test); }
.ckreset { appearance: none; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink2); cursor: pointer; }

@media (max-width: 1100px) {
  .tgrid, .lgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sgrid, .cgrid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dlayout, .playout { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .tgrid, .lgrid, .sgrid, .cgrid2, .fgrid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .pbar i { transition: none; } }

/* AI と気持ち */
.hint { display: inline-block; font-size: 11px; font-weight: 700; line-height: 1.5; color: #475569; background: #f8fafc; border: 1px dashed #94a3b8; border-radius: 999px; padding: 0 8px; white-space: nowrap; vertical-align: middle; margin-right: 8px; }
.mgroup { margin-bottom: 18px; }
.mgroup h3 { margin: 0; font-size: 15.5px; }
.mlead { margin: 4px 0 10px; font-size: 13px; color: var(--ink2); }
.mgroup .scard .big { font-size: 26px; }
.mdo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mdocol { padding: 13px 15px; display: flex; flex-direction: column; gap: 10px; }
.mdocol h3 { margin: 0; font-size: 14.5px; }
.mdoitem b { display: block; font-size: 13.5px; }
.mdoitem p { margin: 2px 0 0; font-size: 13px; color: var(--ink2); }
.mdoitem .ss { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.mdoitem .ss a { color: #1d4ed8; }
.mhint { margin: 12px 0 0; font-size: 13px; color: var(--ink2); }
@media (max-width: 760px) { .mdo { grid-template-columns: minmax(0, 1fr); } }
