/* ================================================
   VanPlan 試算ツール — 公開版スタイル
   (C) Toshin Logistics Co., Ltd. All Rights Reserved.
   色は toshin-g.jp/style.css の変数に合わせる
   ================================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --navy: #0a1628;
  --navy-light: #132743;
  --blue: #1a5276;
  --blue-accent: #2980b9;
  --orange: #e67e22;
  --orange-light: #f39c12;
  --gold: #d4a843;
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --text: #1e293b;
  --text-muted: #64748b;
  --red: #dc2626;
  --red-bg: #fef2f2;
  --green: #059669;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
  color: var(--text);
  background: var(--gray-100);
  line-height: 1.7;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
small { font-weight: 400; color: var(--gray-400); font-size: 0.75em; margin-left: 2px; }

/* ---------- ヘッダ ---------- */
.vp-header {
  background: rgba(255,255,255,0.97);
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
  position: sticky; top: 0; z-index: 50;
}
.vp-header-inner {
  width: 94%; max-width: 1360px; margin: 0 auto;
  display: flex; align-items: center; gap: 1.25rem;
  padding: 0.6rem 0;
}
.vp-logo { display: flex; align-items: center; flex-shrink: 0; }
.vp-logo img { height: 34px; width: auto; }
.vp-logo-text {
  align-items: center; gap: 0.5rem;
  font-weight: 900; color: #0b3d91; font-size: 1.05rem; letter-spacing: 0.02em;
}
.vp-logo-text b {
  display: inline-block; padding: 0.1rem 0.4rem; border: 2px solid #0b3d91; border-radius: 4px;
  font-size: 0.7rem; letter-spacing: 0.08em;
}
.vp-title { display: flex; flex-direction: column; min-width: 0; flex: 1; border-left: 1px solid var(--gray-200); padding-left: 1.25rem; }
.vp-title h1 { font-size: 1.125rem; font-weight: 900; color: var(--navy); line-height: 1.3; letter-spacing: 0.02em; }
.vp-title-sub { font-size: 0.75rem; color: var(--text-muted); }
.vp-header-cta {
  flex-shrink: 0;
  padding: 0.5rem 1.2rem; border-radius: 50px;
  font-size: 0.8125rem; font-weight: 700;
  background: var(--orange); color: var(--white);
  transition: var(--transition);
}
.vp-header-cta:hover { background: var(--orange-light); text-decoration: none; transform: translateY(-1px); }

/* ---------- レイアウト ---------- */
/* 2026-10-17 健太郎「もっと横に広くして、横スクロール不要に」: 幅 96%・最大 1600px、左右を半々にして貨物の表（10 列）が収まるようにする */
.vp-main { width: 96%; max-width: 1600px; margin: 0 auto; padding: 1.25rem 0 3rem; flex: 1; }
.vp-lead { font-size: 0.9rem; color: var(--gray-600); margin-bottom: 1rem; }
.vp-grid {
  display: grid; grid-template-columns: minmax(440px, 1.15fr) minmax(0, 1fr);
  gap: 1.25rem; align-items: start;
}
.vp-field-row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.vp-field-row select { flex: 1 1 220px; min-width: 0; }
.vp-field-inline { display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap; font-size: 0.78rem; color: var(--gray-500); }
.vp-field-inline input { width: 64px; }
.vp-field-inline.is-off { opacity: 0.5; }
.vp-col { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.vp-col-result { position: sticky; top: 70px; }

.vp-card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200);
  padding: 1.1rem 1.25rem; position: relative;
}
.vp-card-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.vp-card-head h2 { font-size: 1rem; font-weight: 700; color: var(--navy); }
.vp-card-hint { font-size: 0.75rem; color: var(--gray-400); margin-left: auto; }
.vp-step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-accent)); color: var(--white);
  font-size: 0.75rem; font-weight: 900; flex-shrink: 0;
}
.vp-step-result { background: linear-gradient(135deg, var(--orange), var(--orange-light)); }
.vp-h3 { font-size: 0.9375rem; font-weight: 700; color: var(--navy); margin-bottom: 0.6rem; }
.vp-h3-red { color: var(--red); }

/* ---------- 入力 ---------- */
.vp-textarea {
  width: 100%; min-height: 96px; resize: vertical;
  padding: 0.7rem 0.85rem; border: 1px solid var(--gray-300); border-radius: var(--radius-sm);
  background: var(--gray-50); line-height: 1.6; font-size: 0.9rem;
  transition: var(--transition);
}
.vp-textarea:focus, .vp-field input:focus, .vp-field select:focus, .vp-table input:focus, .vp-table select:focus {
  outline: none; border-color: var(--blue-accent); box-shadow: 0 0 0 3px rgba(41,128,185,0.12); background: var(--white);
}
.vp-textarea::placeholder { color: var(--gray-400); }
.vp-row { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.vp-row-actions { margin-top: 0.6rem; }
.vp-status { font-size: 0.8rem; color: var(--text-muted); }
.vp-status.is-busy::before {
  content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -2px;
  border: 2px solid var(--gray-300); border-top-color: var(--blue-accent); border-radius: 50%;
  animation: vp-spin 0.8s linear infinite;
}
@keyframes vp-spin { to { transform: rotate(360deg); } }

.vp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.55rem 1.2rem; border-radius: 50px; border: 2px solid transparent;
  font-weight: 700; font-size: 0.875rem; letter-spacing: 0.02em; white-space: nowrap;
  transition: var(--transition);
}
.vp-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.vp-btn-primary { background: linear-gradient(135deg, var(--blue), var(--blue-accent)); color: var(--white); }
.vp-btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(41,128,185,0.3); }
.vp-btn-secondary { background: var(--white); color: var(--blue); border-color: var(--gray-200); }
.vp-btn-secondary:hover:not(:disabled) { border-color: var(--blue); background: var(--gray-50); }
.vp-btn-cta {
  width: 100%; padding: 0.9rem 1.5rem; font-size: 1.05rem;
  background: linear-gradient(135deg, var(--orange), var(--orange-light)); color: var(--white);
  box-shadow: 0 4px 15px rgba(230,126,34,0.35);
}
.vp-btn-cta:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(230,126,34,0.45); }
.vp-link-btn {
  background: none; border: none; color: var(--blue-accent); font-size: 0.8rem; padding: 0.2rem 0.3rem;
  text-decoration: underline; text-underline-offset: 2px;
}
.vp-link-btn:hover { color: var(--blue); }
.vp-link-inline { background: none; border: none; color: var(--blue-accent); text-decoration: underline; padding: 0; font-size: inherit; }

.vp-unparsed {
  margin-top: 0.6rem; padding: 0.6rem 0.8rem; border-radius: var(--radius-sm);
  background: #fffbeb; border: 1px solid #fde68a; font-size: 0.8rem;
}
.vp-unparsed-title { font-weight: 700; color: #92400e; margin-bottom: 0.25rem; }
.vp-unparsed ul { list-style: none; }
.vp-unparsed li { color: var(--gray-700); padding: 0.1rem 0; word-break: break-all; }
.vp-unparsed li::before { content: '・'; color: #d97706; }

.vp-drop {
  margin-top: 0.6rem; padding: 0.7rem 0.9rem;
  border: 2px dashed var(--gray-300); border-radius: var(--radius-sm);
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  color: var(--gray-500); font-size: 0.8rem; cursor: pointer;
  transition: var(--transition); background: var(--gray-50);
}
.vp-drop:hover, .vp-drop:focus { border-color: var(--blue-accent); color: var(--blue); outline: none; }
.vp-drop.is-over { border-color: var(--orange); background: #fff7ed; color: var(--orange); }
.vp-drop-icon { font-size: 1.1rem; }
.vp-drop-text { flex: 1; min-width: 200px; }
.vp-drop-file {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.15rem 0.6rem; border-radius: 50px; background: var(--white); border: 1px solid var(--gray-200);
  color: var(--gray-700); font-weight: 600;
}
.vp-drop-file button { background: none; border: none; color: var(--gray-400); font-size: 1rem; line-height: 1; padding: 0 0.1rem; }
.vp-drop-file button:hover { color: var(--red); }

.vp-presets { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.8rem; }
.vp-presets-label { font-size: 0.78rem; color: var(--gray-500); }
.vp-chip {
  padding: 0.3rem 0.8rem; border-radius: 50px; border: 1px solid var(--gray-200); background: var(--white);
  font-size: 0.78rem; font-weight: 600; color: var(--gray-600); transition: var(--transition);
}
.vp-chip:hover { border-color: var(--blue); color: var(--blue); }
.vp-chip-ghost { border-style: dashed; color: var(--gray-500); }

/* ---------- テーブル ---------- */
.vp-table-wrap { margin-top: 0.8rem; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-sm); }
.vp-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; min-width: 0; }   /* 2026-10-17: 横スクロールを出さない（列幅を詰めて収める。狭い画面では overflow-x が保険） */
.vp-table th {
  text-align: left; font-weight: 700; color: var(--gray-500); font-size: 0.72rem; letter-spacing: 0.04em;
  padding: 0.4rem 0.15rem; border-bottom: 2px solid var(--gray-200); white-space: nowrap;
}
.vp-table td { padding: 0.3rem 0.15rem; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.vp-table tbody tr:hover td { background: var(--gray-50); }
.vp-table input, .vp-table select {
  width: 100%; padding: 0.3rem 0.4rem; border: 1px solid var(--gray-200); border-radius: 6px; background: var(--white);
  font-size: 0.82rem; min-width: 0;
}
/* 数値の入力欄: 4〜5 桁（2200・12032）が隠れない幅にし、上下の矢印（スピン）は消して文字の場所を確保する（2026-10-17 健太郎「mm なのに cm 表記に見える」＝末尾の桁が切れていた） */
.vp-table input[type="number"] { text-align: right; width: 60px; padding-left: 0.25rem; padding-right: 0.3rem; -moz-appearance: textfield; appearance: textfield; }
.vp-table input[type="number"]::-webkit-outer-spin-button, .vp-table input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.vp-table input.in-qty { width: 54px; }
.vp-table input.in-kg { width: 54px; }
.vp-table input.in-name { min-width: 80px; }
/* 貨物リスト: 多いときは表の中でスクロール（見出しは固定）。未積載の行は赤く、品名の横に「未積載 n/数量」 */
.vp-cargo-wrap { max-height: 46vh; overflow-y: auto; }
.vp-cargo-wrap thead th { position: sticky; top: 0; background: var(--white); z-index: 1; }
.vp-cargo-wrap td { padding-top: 0.2rem; padding-bottom: 0.2rem; }
.vp-cargo-wrap input, .vp-cargo-wrap select { padding-top: 0.2rem; padding-bottom: 0.2rem; }
.vp-opt2 { display: inline-flex; gap: 0.35rem; align-items: center; }
.vp-table tr.is-left td { background: #fff1f2; }
.vp-table tr.is-left td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.vp-left-badge { display: inline-block; font-size: 0.65rem; font-weight: 700; padding: 0 0.3rem; border-radius: 4px; background: #fee2e2; color: #b91c1c; white-space: nowrap; margin-left: 0.2rem; }
.vp-h3-sub { font-weight: 500; font-size: 0.75rem; color: var(--gray-500); margin-left: 0.5rem; }
.vp-legend .vp-legend-extra { display: none; }
.vp-legend.is-open .vp-legend-extra { display: inline-flex; }
.vp-legend-more { background: none; border: 1px solid var(--gray-200); border-radius: 999px; padding: 0 0.5rem; font-size: 0.72rem; color: var(--blue); cursor: pointer; }
.vp-table select { width: auto; padding-right: 0.3rem; }
.vp-table input[type="checkbox"] { width: auto; accent-color: var(--blue-accent); }
.vp-table input.is-invalid { border-color: var(--red); background: var(--red-bg); }
.vp-table .col-color { width: 14px; }
.vp-color-dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid rgba(0,0,0,0.15); }
.vp-del { background: none; border: none; color: var(--gray-400); font-size: 1.1rem; line-height: 1; padding: 0.1rem 0.3rem; }
.vp-del:hover { color: var(--red); }
.vp-kind-badge { display: inline-block; font-size: 0.65rem; font-weight: 700; padding: 0 0.35rem; border-radius: 4px; background: #fef3c7; color: #92400e; margin-left: 0.2rem; vertical-align: 1px; }
.vp-empty { padding: 0.9rem; text-align: center; color: var(--gray-400); font-size: 0.82rem; }
.vp-table-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 0.4rem; font-size: 0.78rem; color: var(--gray-500); min-height: 1.4rem; }
.vp-table-result { min-width: 420px; }
.vp-table-result td { white-space: nowrap; }
.vp-util-bar { display: inline-block; width: 60px; height: 6px; border-radius: 3px; background: var(--gray-200); vertical-align: middle; margin-right: 0.4rem; overflow: hidden; }
.vp-util-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--blue-accent)); }

/* ---------- 条件 ---------- */
.vp-fields { display: flex; flex-direction: column; gap: 0.7rem; }
.vp-field { display: flex; flex-direction: column; gap: 0.25rem; }
.vp-field > span { font-size: 0.78rem; font-weight: 700; color: var(--gray-600); }
.vp-field > span em { font-style: normal; color: var(--red); font-size: 0.7rem; margin-left: 0.3rem; }
.vp-field input, .vp-field select {
  width: 100%; padding: 0.55rem 0.75rem; border: 1px solid var(--gray-300); border-radius: var(--radius-sm);
  background: var(--white); font-size: 0.9rem; transition: var(--transition);
}
.vp-field select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.8rem center; padding-right: 2.2rem;
}
.vp-check { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.85rem; color: var(--gray-700); cursor: pointer; }
.vp-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue-accent); flex-shrink: 0; }
.vp-check small { display: block; }

.vp-run { display: flex; flex-direction: column; gap: 0.5rem; }
.vp-error {
  padding: 0.7rem 0.9rem; border-radius: var(--radius-sm);
  background: var(--red-bg); border: 1px solid #fecaca; color: #991b1b; font-size: 0.85rem;
}

/* ---------- 3D ビューア ---------- */
.vp-card-3d { padding-bottom: 0.9rem; }
.vp-viewer {
  position: relative; width: 100%; height: 520px;
  border-radius: var(--radius-sm); overflow: hidden;
  background: linear-gradient(180deg, #f8fafc 0%, #e9eef5 100%);
  border: 1px solid var(--gray-200);
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.vp-viewer-canvas { position: absolute; inset: 0; }
.vp-viewer-canvas canvas { display: block; width: 100% !important; height: 100% !important; }
.vp-watermark {
  position: absolute; inset: -20%; pointer-events: none; z-index: 3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='340' height='200'%3E%3Ctext x='50%25' y='50%25' text-anchor='middle' dominant-baseline='middle' transform='rotate(-24 170 100)' font-family='Noto Sans JP, sans-serif' font-size='22' font-weight='700' fill='rgba(10,22,40,0.07)' letter-spacing='3'%3E東新物流 VanPlan 試算%3C/text%3E%3C/svg%3E");
  background-repeat: repeat;
}
.vp-viewer-placeholder {
  position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center;
  color: var(--gray-500); text-align: center; padding: 2rem;
}
.vp-viewer-placeholder-inner { max-width: 360px; }
.vp-viewer-icon { display: block; font-size: 2.6rem; color: var(--gray-300); margin-bottom: 0.5rem; }
.vp-viewer-loading {
  position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem;
  background: rgba(248,250,252,0.8); backdrop-filter: blur(2px); color: var(--gray-600); font-weight: 600;
}
.vp-spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--gray-200); border-top-color: var(--orange); animation: vp-spin 0.8s linear infinite; }
.vp-legend {
  position: absolute; left: 10px; bottom: 10px; z-index: 5;
  display: flex; flex-wrap: wrap; gap: 0.3rem 0.7rem; max-width: calc(100% - 20px);
  background: rgba(255,255,255,0.9); border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  padding: 0.35rem 0.6rem; font-size: 0.72rem; color: var(--gray-700);
}
.vp-legend span { display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap; }
.vp-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; border: 1px solid rgba(0,0,0,0.15); }
.vp-legend .is-left i { background: #fecaca !important; border-color: var(--red); }

/* ---------- 結果 ---------- */
.vp-result { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }
.vp-card-summary { padding-bottom: 1rem; }
.vp-card-logo { position: absolute; right: 14px; bottom: 12px; height: 20px; width: auto; opacity: 0.55; pointer-events: none; }
.vp-summary-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.75rem; }
.vp-sum { padding: 0.6rem 0.75rem; border-radius: var(--radius-sm); background: var(--gray-50); border: 1px solid var(--gray-100); min-width: 0; }
.vp-sum-label { font-size: 0.7rem; font-weight: 700; color: var(--gray-500); letter-spacing: 0.04em; }
.vp-sum-value { font-size: 1.35rem; font-weight: 900; color: var(--navy); line-height: 1.3; font-variant-numeric: tabular-nums; word-break: break-all; }
.vp-sum-value small { font-size: 0.7rem; color: var(--gray-500); margin-left: 2px; }
.vp-sum-sub { font-size: 0.72rem; color: var(--gray-500); margin-top: 0.15rem; line-height: 1.4; }
.vp-sum.is-left { background: var(--red-bg); border-color: #fecaca; }
.vp-sum.is-left .vp-sum-value { color: var(--red); }
.vp-sum.is-ok .vp-sum-value { color: var(--green); }
.vp-summary-actions { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin-top: 0.9rem; padding-right: 110px; }
.vp-summary-note { font-size: 0.75rem; color: var(--gray-500); }
.vp-list { list-style: none; font-size: 0.85rem; color: var(--gray-700); }
.vp-list li { padding: 0.3rem 0 0.3rem 1rem; position: relative; border-bottom: 1px dashed var(--gray-100); }
.vp-list li:last-child { border-bottom: none; }
.vp-list li::before { content: ''; position: absolute; left: 0; top: 0.85rem; width: 5px; height: 5px; border-radius: 50%; background: var(--blue-accent); }
.vp-card-left .vp-list li::before { background: var(--red); }
.vp-list b { color: var(--navy); }

/* ---------- フッタ ---------- */
.vp-footer { background: var(--navy); color: rgba(255,255,255,0.7); padding: 1.5rem 0; margin-top: auto; }
.vp-footer-inner { width: 94%; max-width: 1360px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.5rem; align-items: center; text-align: center; }
.vp-footer-disclaimer { font-size: 0.82rem; color: rgba(255,255,255,0.85); }
.vp-footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; justify-content: center; font-size: 0.82rem; }
.vp-footer-links a, .vp-footer-links .vp-link-btn { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.82rem; }
.vp-footer-links a:hover, .vp-footer-links .vp-link-btn:hover { color: var(--white); text-decoration: underline; }
.vp-footer small { font-size: 0.72rem; color: rgba(255,255,255,0.4); }

/* ---------- モーダル ---------- */
.vp-modal {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  background: rgba(10,22,40,0.55); backdrop-filter: blur(3px); padding: 1rem;
}
.vp-modal-box {
  background: var(--white); border-radius: var(--radius); width: 100%; max-width: 440px;
  padding: 1.5rem 1.5rem 1.25rem; box-shadow: 0 24px 60px rgba(0,0,0,0.25);
  max-height: 92vh; overflow-y: auto; animation: vp-up 0.25s ease;
}
.vp-modal-wide { max-width: 680px; }
@keyframes vp-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.vp-modal-box h3 { font-size: 1.05rem; font-weight: 900; color: var(--navy); margin-bottom: 0.4rem; }
.vp-modal-desc { font-size: 0.85rem; color: var(--gray-600); margin-bottom: 1rem; }
.vp-modal-actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 1.25rem; flex-wrap: wrap; }
.vp-modal .vp-error { margin-top: 0.8rem; }
.vp-terms { font-size: 0.85rem; color: var(--gray-700); max-height: 56vh; overflow-y: auto; padding-right: 0.5rem; }
.vp-terms h4 { font-size: 0.875rem; color: var(--navy); margin: 0.9rem 0 0.3rem; }
.vp-terms p { margin-bottom: 0.4rem; }
.vp-terms ul { margin: 0.2rem 0 0.4rem 1.2rem; }
.vp-terms li { margin-bottom: 0.15rem; }
.vp-terms-date { color: var(--gray-500); font-size: 0.8rem; margin-top: 1rem; }

/* ---------- PDF 下書き（画面外） ---------- */
.vp-pdf-stage { position: absolute; left: -30000px; top: 0; width: 1123px; pointer-events: none; }
.vp-pdf-page {
  position: relative; width: 1123px; height: 794px; overflow: hidden; background: #ffffff;
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif; color: #1e293b;
  padding: 44px 48px 56px;
}
.vp-pdf-wm {
  position: absolute; inset: -30%; pointer-events: none; z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='240'%3E%3Ctext x='50%25' y='50%25' text-anchor='middle' dominant-baseline='middle' transform='rotate(-24 210 120)' font-family='Noto Sans JP, sans-serif' font-size='26' font-weight='700' fill='rgba(10,22,40,0.06)' letter-spacing='4'%3E東新物流 VanPlan 試算%3C/text%3E%3C/svg%3E");
  background-repeat: repeat;
}
.vp-pdf-body { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; }
.vp-pdf-head { display: flex; align-items: flex-end; justify-content: space-between; border-bottom: 3px solid #1a5276; padding-bottom: 10px; margin-bottom: 18px; }
.vp-pdf-head h1 { font-size: 24px; font-weight: 900; color: #0a1628; letter-spacing: 0.02em; line-height: 1.2; }
.vp-pdf-head .sub { font-size: 12px; color: #64748b; margin-top: 4px; }
.vp-pdf-brand { display: flex; align-items: center; gap: 10px; font-weight: 900; color: #0b3d91; font-size: 15px; }
.vp-pdf-brand img { height: 30px; width: auto; }
.vp-pdf-brand b { display: inline-block; padding: 1px 6px; border: 2px solid #0b3d91; border-radius: 4px; font-size: 11px; letter-spacing: 0.08em; }
.vp-pdf-cols { display: flex; gap: 20px; flex: 1; min-height: 0; }
.vp-pdf-3d { flex: 0 0 640px; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; background: #f1f5f9; height: 420px; display: flex; align-items: center; justify-content: center; }
.vp-pdf-3d img { width: 100%; height: 100%; object-fit: contain; display: block; }
.vp-pdf-side { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.vp-pdf-sum { padding: 10px 12px; border-radius: 8px; background: #f8fafc; border: 1px solid #e2e8f0; }
.vp-pdf-sum .l { font-size: 10px; font-weight: 700; color: #64748b; letter-spacing: 0.05em; }
.vp-pdf-sum .v { font-size: 20px; font-weight: 900; color: #0a1628; line-height: 1.25; }
.vp-pdf-sum .v small { font-size: 11px; color: #64748b; font-weight: 400; }
.vp-pdf-sum .s { font-size: 11px; color: #64748b; margin-top: 2px; }
.vp-pdf-sum.is-left { background: #fef2f2; border-color: #fecaca; }
.vp-pdf-sum.is-left .v { color: #dc2626; }
.vp-pdf-h2 { font-size: 15px; font-weight: 900; color: #1a5276; margin: 0 0 8px; padding-left: 10px; border-left: 4px solid #e67e22; line-height: 1.3; }
.vp-pdf-h2.red { color: #dc2626; border-left-color: #dc2626; }
.vp-pdf-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.vp-pdf-table th { text-align: left; font-weight: 700; color: #475569; font-size: 11px; padding: 6px 8px; border-bottom: 2px solid #cbd5e1; background: #f8fafc; }
.vp-pdf-table td { padding: 5px 8px; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.vp-pdf-table td.r, .vp-pdf-table th.r { text-align: right; font-variant-numeric: tabular-nums; }
.vp-pdf-table .dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; border: 1px solid rgba(0,0,0,0.15); }
.vp-pdf-sec { margin-bottom: 16px; }
.vp-pdf-two { display: flex; gap: 24px; }
.vp-pdf-two > div { flex: 1; min-width: 0; }
.vp-pdf-list { font-size: 12px; color: #334155; list-style: none; }
.vp-pdf-list li { padding: 3px 0 3px 12px; position: relative; }
.vp-pdf-list li::before { content: ''; position: absolute; left: 0; top: 10px; width: 5px; height: 5px; border-radius: 50%; background: #2980b9; }
.vp-pdf-list.red li::before { background: #dc2626; }
.vp-pdf-disclaimer { margin-top: auto; padding: 10px 14px; border-radius: 8px; background: #fff7ed; border: 1px solid #fed7aa; font-size: 12px; color: #9a3412; line-height: 1.6; }
.vp-pdf-disclaimer b { color: #7c2d12; }
.vp-pdf-foot {
  position: absolute; left: 48px; right: 48px; bottom: 18px; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10px; color: #64748b; border-top: 1px solid #e2e8f0; padding-top: 8px;
}
.vp-pdf-cond { font-size: 11px; color: #475569; display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.vp-pdf-cond b { color: #1e293b; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 1200px) {   /* 2026-10-17: 1 列に切り替える幅を 1024 → 1200 に（ノート PC でも貨物の表が横スクロールなしで収まる） */
  .vp-grid { grid-template-columns: 1fr; }
  .vp-col-result { position: static; }
  .vp-summary-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 13.5px; }
  .vp-header-inner { gap: 0.75rem; }
  .vp-header-cta { display: none; }
  .vp-logo img { height: 26px; }
  .vp-logo-text { font-size: 0.85rem; }
  .vp-title { padding-left: 0.6rem; }
  .vp-title h1 { font-size: 0.9rem; white-space: nowrap; }
  .vp-title-sub { display: none; }
  .vp-main { width: 100%; padding: 0.75rem 12px 2rem; }
  .vp-card { padding: 0.9rem 0.85rem; border-radius: 10px; }
  .vp-card-hint { flex-basis: 100%; margin-left: 0; }
  .vp-viewer { height: 60vh; min-height: 300px; }
  .vp-summary-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .vp-sum-value { font-size: 1.15rem; }
  .vp-summary-actions { padding-right: 0; }
  .vp-summary-actions .vp-btn { width: 100%; }
  .vp-card-logo { position: static; margin-top: 0.6rem; margin-left: auto; }
  .vp-row-actions .vp-btn { flex: 1 1 auto; }
  .vp-drop-text { min-width: 0; }
  .vp-modal-box { padding: 1.25rem 1rem 1rem; }
  .vp-modal-actions .vp-btn { flex: 1 1 auto; }
  .vp-footer-links { gap: 0.8rem; }
}

/* ---------- フルHD（1920×1080）以上は 1 画面に収める（2026-10-18 健太郎「フルHD 1 ページに収まる UI に」） ----------
   3 列（貨物 ｜ 条件＋計算ボタン ｜ 3D＋結果）にして、ページは縦スクロールさせず、貨物の表と結果の枠の中だけスクロールする。
   幅 1700px 未満・高さ 900px 未満（ノート PC など）は従来の 2 列のまま */
@media (min-width: 1700px) and (min-height: 900px) {
  html, body { height: 100%; }
  body { overflow: hidden; }
  .vp-header-inner { padding: 0.35rem 0; }
  .vp-logo img { height: 28px; }
  .vp-main { width: 98%; max-width: 1880px; padding: 0.6rem 0 0.5rem; display: flex; flex-direction: column; min-height: 0; }
  .vp-lead { display: none; }
  .vp-grid {
    flex: 1 1 auto; min-height: 0; gap: 0.75rem; align-items: stretch;
    grid-template-columns: minmax(640px, 1.05fr) 380px minmax(0, 1.5fr);
    grid-template-rows: auto auto 1fr;
    grid-template-areas: "cargo cond right" "cargo run right" "cargo . right";
  }
  .vp-col-input { display: contents; }
  .vp-col-input > .vp-card:first-of-type { grid-area: cargo; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
  .vp-col-input > .vp-card:nth-of-type(2) { grid-area: cond; }
  .vp-run { grid-area: run; }
  .vp-col-result { grid-area: right; position: static; display: flex; flex-direction: column; min-height: 0; gap: 0.75rem; }
  .vp-card-3d { flex: 1 1 55%; min-height: 260px; display: flex; flex-direction: column; }
  .vp-viewer { flex: 1 1 auto; height: auto; min-height: 240px; }
  .vp-result { flex: 1 1 45%; min-height: 0; overflow-y: auto; margin-top: 0; gap: 0.6rem; padding-right: 2px; }
  .vp-result[hidden] { display: none; }
  .vp-card { padding: 0.8rem 1rem; }
  .vp-card-head { margin-bottom: 0.5rem; }
  .vp-textarea { min-height: 70px; }
  .vp-drop { margin-top: 0.45rem; padding: 0.45rem 0.8rem; }
  .vp-presets { margin-top: 0.5rem; }
  .vp-cargo-wrap { flex: 1 1 auto; max-height: none; min-height: 140px; margin-top: 0.5rem; }
  .vp-fields { gap: 0.5rem; }
  .vp-field input, .vp-field select { padding: 0.4rem 0.6rem; font-size: 0.85rem; }
  .vp-check { font-size: 0.8rem; }
  .vp-summary-grid { gap: 0.5rem; }
  .vp-sum { padding: 0.45rem 0.6rem; }
  .vp-footer { padding: 0.4rem 0; }
  .vp-footer-inner { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.2rem; }
}
