/* まめ道具室：2026-12-04 以降に作った道具の共通の見た目（デザインの型ができたら、ここをまとめて直す） */
:root { --ink:#1f2328; --sub:#59636e; --line:#d0d7de; --bg:#f6f8fa; --accent:#0b6bcb; --ok:#1a7f37; --bad:#cf222e; }
* { box-sizing: border-box; }
body { margin:0; font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif; color:var(--ink); line-height:1.7; }
header, main, footer { max-width: 860px; margin: 0 auto; padding: 0 20px; }
header { padding-top: 28px; }
.crumb { font-size: .85rem; } .crumb a { color: var(--sub); }
h1 { font-size: 1.6rem; margin: 4px 0; }
.lead { color: var(--sub); margin: 0 0 8px; }
.safe { display:inline-block; background:#eaf6ee; color:var(--ok); border-radius: 6px; padding: 2px 10px; font-size: .9rem; }
.tool { border:1px solid var(--line); border-radius: 10px; padding: 18px; margin-top: 20px; }
.tabs { display:flex; flex-wrap: wrap; gap:6px; margin: 24px 0 0; border-bottom: 1px solid var(--line); }
.tabs button { border:1px solid var(--line); border-bottom:none; background:var(--bg); padding:8px 14px; border-radius:8px 8px 0 0; cursor:pointer; font: inherit; color: inherit; }
.tabs button[aria-selected="true"] { background:#fff; font-weight:600; position:relative; top:1px; }
.panel { border:1px solid var(--line); border-top:none; border-radius: 0 0 8px 8px; padding: 20px; }
.hidden { display:none !important; }
.row { display:flex; flex-wrap:wrap; gap: 6px 18px; align-items:center; margin-bottom: 10px; }
.row b { min-width: 4em; }
label { cursor:pointer; }
.fields { display:grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.fields label, .lbl { display:block; font-size: .9rem; color: var(--sub); }
input[type=number], input[type=date], input[type=text], input[type=time], select { font: inherit; padding: 6px 8px; border:1px solid var(--line); border-radius: 6px; }
.fields input, .fields select { width:100%; font-size: 1.1rem; }
input[type=number] { text-align: right; }
textarea { width:100%; min-height: 150px; border:1px solid var(--line); border-radius: 6px; padding: 8px; font: inherit; font-family: ui-monospace, "BIZ UDGothic", "MS Gothic", monospace; }
.out-head { display:flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; }
.btn { background: var(--accent); color:#fff; border:none; border-radius: 6px; padding: 6px 16px; cursor:pointer; font: inherit; }
.btn.sub { background:#fff; color: var(--accent); border:1px solid var(--accent); }
.results { margin-top: 16px; }
.res { background: var(--bg); border-radius: 8px; padding: 10px 14px; margin-bottom: 8px; }
.res.main { background:#eef6ff; }
.res .lbl { margin-bottom: 2px; }
.res b { font-size: 1.25rem; }
.grid2 { display:grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.err { margin-top: 12px; color: var(--bad); }
table.out { border-collapse: collapse; width: 100%; font-size: .95rem; margin-top: 8px; }
table.out th, table.out td { border:1px solid var(--line); padding: 4px 8px; text-align: left; }
table.out th { background: var(--bg); }
table.out td.n, table.out th.n { text-align: right; }
.note { color: var(--sub); font-size: .85rem; }
article { margin-top: 36px; }
article h2 { font-size: 1.25rem; border-bottom: 1px solid var(--line); padding-bottom: 4px; margin-top: 32px; }
article table { border-collapse: collapse; width: 100%; font-size: .95rem; }
article th, article td { border:1px solid var(--line); padding: 6px 10px; text-align:left; vertical-align: top; }
article th { background: var(--bg); }
footer { margin-top: 48px; padding-top: 16px; padding-bottom: 40px; border-top: 1px solid var(--line); color: var(--sub); font-size: .85rem; }
footer a { color: var(--sub); }
