/* 板金展開計算アプリ 共通スタイル */
* { box-sizing: border-box; }

body {
  font-family: "Meiryo", "メイリオ", "Hiragino Kaku Gothic ProN", sans-serif;
  background: #f4f6f8;
  color: #222;
  margin: 0;
  padding: 0;
}

header.topbar {
  background: #003399;
  color: #fff;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
header.topbar h1 {
  margin: 0;
  font-size: 18px;
  font-weight: normal;
}
header.topbar a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
}
header.topbar a:hover { text-decoration: underline; }

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

h2 {
  color: #003399;
  border-bottom: 2px solid #003399;
  padding-bottom: 6px;
  margin-top: 28px;
  font-size: 16px;
}

/* メニューカード（図+番号+タイトル+説明） */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.menu-card {
  background: #fff;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  text-decoration: none;
  color: #222;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.menu-card:hover {
  border-color: #0066cc;
  box-shadow: 0 3px 10px rgba(0,51,153,0.15);
  transform: translateY(-2px);
}
.menu-card .thumb {
  width: 100%;
  height: 160px;
  background: #f4f6f8;
  border-bottom: 1px solid #e0e6ed;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.menu-card .thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.menu-card .thumb .ph {
  color: #a8b4c4;
  font-size: 12px;
  text-align: center;
  padding: 10px;
}
.menu-card .thumb .ph .label {
  display: block;
  font-weight: bold;
  color: #8090a5;
  margin-bottom: 4px;
  font-size: 13px;
}
.menu-card .body {
  padding: 12px 16px 14px;
  border-left: 4px solid #003399;
}
.menu-card:hover .body {
  border-left-color: #0066cc;
}
.menu-card .num {
  color: #006600;
  font-weight: bold;
  font-size: 12px;
}
.menu-card .title {
  font-size: 16px;
  font-weight: bold;
  margin: 2px 0 4px;
}
.menu-card .ver-badge {
  display: inline-block;
  background: #6c7a89;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 7px;
  border-radius: 8px;
  margin-left: 6px;
  vertical-align: middle;
}

/* フッター（免責リンク） */
.site-footer {
  text-align: center;
  padding: 24px 12px;
  margin-top: 24px;
  font-size: 12px;
  color: #888;
  border-top: 1px solid #e0e6ed;
}
.site-footer a {
  color: #888;
  text-decoration: underline;
  margin-right: 12px;
}
.site-footer a:hover { color: #003399; }
@media print { .site-footer { display: none !important; } }
.menu-card .desc {
  font-size: 12px;
  color: #666;
  line-height: 1.5;
}

/* テーブル形式の計算フォーム */
table.calc {
  border-collapse: collapse;
  background: #fff;
  margin-top: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  width: 100%;
}
table.calc th, table.calc td {
  border: 1px solid #d0d7de;
  padding: 6px 8px;
  text-align: center;
  font-size: 13px;
}
table.calc th {
  background: #eef2f8;
  color: #003399;
  font-weight: bold;
  white-space: nowrap;
}
table.calc td.result {
  background: #f6fbf6;
  color: #006600;
  font-weight: bold;
}
table.calc td.sum {
  background: #fff4e6;
  color: #cc6600;
  font-weight: bold;
}

/* 入力欄 */
input[type="number"], input[type="text"], select {
  width: 90px;
  padding: 4px 6px;
  border: 1px solid #bbb;
  border-radius: 3px;
  font-size: 13px;
  text-align: right;
}
input[type="number"]:focus, select:focus {
  outline: none;
  border-color: #003399;
  background: #fffde7;
}
select { text-align: left; width: 80px; }

/* 単一行フォーム（仕上寸法など） */
.single-form {
  background: #fff;
  padding: 20px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  margin-top: 10px;
}
.single-form .row {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}
.single-form label {
  display: inline-block;
  min-width: 140px;
  font-size: 13px;
  color: #333;
}
.single-form .result-box {
  background: #f6fbf6;
  border: 1px solid #b5d5b5;
  color: #006600;
  padding: 4px 10px;
  border-radius: 3px;
  font-weight: bold;
  min-width: 90px;
  display: inline-block;
  text-align: right;
}

.note {
  background: #fffbe6;
  border-left: 3px solid #f0ad4e;
  padding: 8px 12px;
  margin: 12px 0;
  font-size: 12px;
  color: #666;
}

/* 計算結果に対する注意とお問い合わせ案内（各ツールページ共通） */
.contact-note {
  background: #f0f7ff;
  border: 1px solid #b8d6ff;
  border-left: 4px solid #0066cc;
  padding: 12px 16px;
  margin: 20px 0 8px;
  font-size: 14px;
  color: #1a3d6b;
  border-radius: 4px;
  line-height: 1.6;
}
.contact-note p { margin: 0; }
.contact-note a {
  color: #003399;
  font-weight: bold;
  text-decoration: underline;
}
.contact-note a:hover { color: #0066cc; }

/* 図解カード（案A方式: 大きめSVG + ラベル外出し） */
.diagram-card {
  background: #fff;
  padding: 16px 20px;
  border: 1px solid #e0e6ed;
  border-radius: 6px;
  margin-bottom: 16px;
}
.diagram-card h3 {
  color: #003399;
  font-size: 15px;
  margin-bottom: 8px;
}
.diagram-card .desc {
  font-size: 13px;
  color: #555;
  margin-bottom: 10px;
  line-height: 1.7;
}
.diagram-card .formula {
  display: inline-block;
  background: #eef2f8;
  border: 1px solid #cfd8e8;
  padding: 3px 10px;
  border-radius: 3px;
  font-family: "Consolas", monospace;
  font-size: 13px;
  color: #003399;
  margin-top: 6px;
}
.diagram-card svg {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 8px auto 0;
}
.diagram-card img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  margin: 8px auto 0;
}

/* 印刷時: A4×1枚に収める */
@media print {
  header.topbar        { display: none !important; }
  #bendingroll-top-menu { display: none !important; }
  .contact-note        { display: none !important; }
  .img-placeholder     { display: none !important; }
  main            { padding: 8px 14px; }
  .diagram-card   { padding: 8px 12px; margin-bottom: 8px; }
  .diagram-card img {
    max-height: 3.5cm;
    max-width: 100%;
    width: auto;
    height: auto;
  }
  h2              { margin-top: 12px; font-size: 14px; padding-bottom: 3px; }
  .single-form    { padding: 10px 14px; }
  .single-form .row            { margin-bottom: 4px; gap: 4px; }
  .single-form .row small      { display: none; }
  @page           { margin: 12mm 10mm; }
}

/* 画像プレースホルダ（後で差し替え予定） */
.img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f6f8;
  border: 2px dashed #c8d0dd;
  border-radius: 6px;
  color: #8a96a8;
  font-size: 13px;
  padding: 40px 20px;
  margin: 10px auto 0;
  max-width: 520px;
  min-height: 180px;
  text-align: center;
}
.img-placeholder .label {
  font-weight: bold;
  color: #6b7688;
  display: block;
  margin-bottom: 4px;
}

/* ツール説明＋図エリア */
.tool-header {
  background: #fff;
  padding: 16px 20px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  margin-bottom: 14px;
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}
.tool-diagram { flex: 0 0 auto; }
.tool-diagram svg { display: block; max-width: 100%; height: auto; }
.tool-explain {
  flex: 1;
  min-width: 260px;
  font-size: 14px;
  color: #333;
  line-height: 1.7;
}
.tool-explain h3 {
  font-size: 16px;
  color: #003399;
  margin-bottom: 8px;
}
.tool-explain ul {
  margin: 6px 0 0 0;
  padding: 0;
  list-style: none;
}
.tool-explain ul li {
  padding: 3px 0 3px 22px;
  position: relative;
}
.tool-explain ul li::before {
  content: "●";
  color: #2266cc;
  position: absolute;
  left: 4px;
  top: 3px;
  font-size: 11px;
}
.tool-explain .formula {
  display: inline-block;
  background: #eef2f8;
  border: 1px solid #cfd8e8;
  padding: 2px 8px;
  border-radius: 3px;
  font-family: "Consolas", monospace;
  font-size: 13px;
  color: #003399;
}

/* 大きめの入力欄（タブレットでも押しやすく） */
table.calc.big th, table.calc.big td {
  padding: 10px 12px;
  font-size: 15px;
}
table.calc.big input[type="number"],
table.calc.big input[type="text"] {
  width: 120px;
  padding: 8px 10px;
  font-size: 16px;
}
table.calc.big select {
  width: 100px;
  padding: 8px 6px;
  font-size: 15px;
}
table.calc.big td.result, table.calc.big td.sum {
  font-size: 18px;
}

/* 単位ラベル */
.unit {
  color: #888;
  font-size: 12px;
  margin-left: 3px;
  font-weight: normal;
}

/* 図解の色 */
.svg-main { stroke: #333; stroke-width: 2.5; fill: none; }
.svg-dim { stroke: #2266cc; stroke-width: 1; fill: none; }
.svg-dim-arrow { fill: #2266cc; }
.svg-text { fill: #222; font-size: 14px; font-family: "Meiryo", sans-serif; }
.svg-text-blue { fill: #2266cc; font-size: 14px; font-family: "Meiryo", sans-serif; }
.svg-center { stroke: #999; stroke-width: 1; stroke-dasharray: 4,2; fill: none; }

/* スマホ対応 */
@media (max-width: 768px) {
  main { padding: 10px; }
  table.calc { font-size: 11px; }
  table.calc th, table.calc td { padding: 4px; }
  input[type="number"], input[type="text"] { width: 70px; font-size: 12px; }
  select { width: 65px; font-size: 12px; }
  .single-form label { min-width: 120px; }
  header.topbar h1 { font-size: 15px; }
}
