/* OUC 料金計算ページ */
:root {
  --primary: #17483f;
  --primary-2: #28675a;
  --primary-soft: #e8f3ef;
  --accent: #df6949;
  --accent-2: #ed8058;
  --line: #06c755;
  --danger: #c62828;
  --bg: #f3f6f4;
  --card: #ffffff;
  --text: #202c29;
  --text-sub: #64716d;
  --border: #dce5e1;
  --radius: 8px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Avenir Next', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Meiryo', sans-serif;
  background: repeating-linear-gradient(135deg, rgba(23,72,63,.018) 0, rgba(23,72,63,.018) 1px, transparent 1px, transparent 9px), var(--bg);
  color: var(--text);
  line-height: 1.7;
  padding-bottom: 76px;
}
a { color: var(--primary); }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ===== ヘッダー ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px;
  background: var(--primary);
  color: #fff; box-shadow: 0 2px 12px rgba(20,55,48,.18);
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.brand-logo {
  display: block; flex: 0 0 auto; width: 58px; height: 49px; object-fit: contain;
  padding: 3px; border-radius: 6px; background: #fff;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.brand-name { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 11px; opacity: .8; }
.header-tel {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
  background: #fff; color: var(--primary); font-weight: 800; font-size: 13px;
  padding: 8px 12px; border-radius: 5px; text-decoration: none; transition: background .18s ease, transform .18s ease;
}
.header-tel:hover { background: #e8f3ef; transform: translateY(-1px); }

/* ===== ヒーロー ===== */
.hero { background: linear-gradient(115deg, #e6f0ec 0%, #f7f8f5 72%); padding: 22px 0 12px; border-bottom: 1px solid var(--border); }
.crumbs { font-size: 12px; color: var(--text-sub); display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--text-sub); }
.hero h1 { font-size: 30px; line-height: 1.4; margin: 10px 0; color: var(--primary); font-weight: 900; }
.lead { margin: 0 0 14px; font-size: 15px; color: #333; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 12px; border-radius: 4px; font-size: 13px; font-weight: 700; }
.chip strong { font-size: 16px; }
.chip-fare { background: var(--primary-soft); color: var(--primary); }
.chip-wait { background: #fff0e9; color: #a9472e; }
.chip-wait.is-closed { background: #eceff1; color: #455a64; }

/* ===== カード ===== */
.card {
  background: var(--card); border-radius: var(--radius); padding: 24px 22px;
  margin: 18px 0; box-shadow: 0 5px 18px rgba(25,60,51,.045); border: 1px solid var(--border);
}
.section-title {
  font-size: 19px; line-height: 1.45; margin: 0 0 8px; color: var(--primary);
  padding-left: 12px; border-left: 3px solid var(--accent);
}
.section-desc { margin: 0 0 16px; font-size: 14px; color: var(--text-sub); }

/* ===== 入力 ===== */
.field { margin-bottom: 16px; }
.field label { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; margin-bottom: 7px; }
.pin { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; font-size: 13px; font-weight: 900; }
.pin-a { background: var(--primary); }
.pin-b { background: var(--accent); }
.input-row { display: flex; gap: 8px; align-items: center; }
.input-row input { flex: 1 1 auto; min-width: 0; }
input[type=text], input[type=number] {
  width: 100%; font: inherit; font-size: 16px; padding: 13px 14px;
  border: 1px solid #cbd8d2; border-radius: 6px; background: #fff; color: var(--text); transition: border-color .18s ease, box-shadow .18s ease;
}
/* Google Places が入力欄に追加する背景画像が、API制限時に警告アイコンとして繰り返されるのを防ぐ */
#originInput, #destInput {
  background-color: #fff !important;
  background-image: none !important;
  background-repeat: no-repeat !important;
}
input:focus { outline: none; border-color: var(--primary-2); box-shadow: 0 0 0 3px rgba(40,103,90,.15); }
.btn-gps {
  flex: 0 0 auto; font: inherit; font-size: 14px; font-weight: 800; padding: 13px 12px;
  border-radius: 6px; border: 1px solid var(--primary); background: #fff; color: var(--primary); cursor: pointer; white-space: nowrap; transition: background .18s ease, color .18s ease;
}
.btn-gps:hover { background: var(--primary); color: #fff; }
.btn-gps:disabled { opacity: .6; cursor: wait; }
.field-hint { margin: 6px 0 0; font-size: 12px; color: var(--text-sub); }
.field-status { margin: 6px 0 0; font-size: 12px; color: var(--text-sub); min-height: 0; white-space: pre-line; }
.field-status.ok { color: #2e7d32; }
.field-status.err { color: var(--danger); }
.pickup-map-wrap { margin-top: 10px; }
.pickup-map { height: 270px; border: 1px solid #cbd8d2; border-radius: 6px; background: #e8efec; overflow: hidden; }
.pickup-map-hint { margin: 6px 2px 0; font-size: 12px; color: var(--text-sub); }
.pickup-map .leaflet-control-attribution { font-size: 9px; }
.btn-calc {
  width: 100%; font: inherit; font-size: 18px; font-weight: 900; padding: 16px; border: none; border-radius: 6px;
  background: var(--accent); color: #fff; cursor: pointer;
  box-shadow: 0 4px 12px rgba(185,77,48,.2); transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.btn-calc:hover { background: #c95639; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(185,77,48,.26); }
.btn-calc:disabled { opacity: .6; cursor: wait; }
.form-error { margin: 12px 0 0; padding: 10px 14px; border-radius: 8px; background: #ffebee; color: var(--danger); border: 1px solid #ef9a9a; font-size: 14px; }

/* pac（Google候補）をスマホで押しやすく */
.pac-container { border-radius: 10px; margin-top: 4px; font-family: inherit; z-index: 2000; }
.pac-item { padding: 8px 10px; font-size: 14px; cursor: pointer; }

/* ===== 結果 ===== */
.result { scroll-margin-top: 76px; margin-top: 18px; border-radius: 8px; overflow: hidden; border: 1px solid var(--primary); }
.result-head { background: var(--primary); color: #fff; text-align: center; padding: 22px 16px; }
.result-label { margin: 0; font-size: 13px; opacity: .85; }
.result-amount { margin: 2px 0; font-size: 40px; font-weight: 900; line-height: 1.2; }
.result-distance { margin: 0; font-size: 14px; opacity: .9; }
.breakdown { margin: 0; padding: 12px 16px; display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 14px; border-bottom: 1px solid var(--border); }
.breakdown dt { color: var(--text-sub); }
.breakdown dd { margin: 0; text-align: right; font-weight: 700; }
.breakdown .bd-total { color: var(--primary); font-weight: 900; border-top: 1px dashed var(--border); padding-top: 6px; }
.result-method { margin: 0; padding: 8px 16px; font-size: 12px; color: var(--text-sub); background: #f4f7f5; }
.route-map { height: 240px; background: #e8eaf6; }
.next-step { padding: 18px; background: #f8f5f1; }
.next-title { margin: 0 0 10px; font-weight: 900; color: #a9472e; text-align: center; font-size: 16px; }

.wait-box { display: flex; align-items: baseline; justify-content: center; gap: 10px; padding: 10px 14px; border-radius: 10px; background: #fff; border: 2px solid var(--accent-2); color: #e65100; margin-bottom: 12px; font-weight: 700; }
.wait-box strong { font-size: 22px; }
.wait-box.is-closed { border-color: #b0bec5; color: #455a64; }
.wait-box-lg strong { font-size: 26px; }

.cta-grid { display: grid; gap: 10px; }
.cta {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 14px; border-radius: 6px; font-weight: 900; font-size: 16px; text-decoration: none; text-align: center; line-height: 1.35; transition: transform .18s ease, filter .18s ease;
}
.cta:hover { transform: translateY(-2px); filter: brightness(.96); }
.cta small { font-size: 12px; font-weight: 700; opacity: .9; }
.cta-line { background: var(--line); color: #fff; box-shadow: 0 3px 10px rgba(6,199,85,.3); }
.cta-tel { background: var(--primary); color: #fff; }
.cta-web { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
@media (min-width: 600px) { .cta-grid { grid-template-columns: repeat(3, 1fr); } }

/* ===== 距離手入力 ===== */
.manual-calc { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 12px; }
.manual-calc summary { cursor: pointer; font-size: 14px; font-weight: 700; color: var(--primary); }
.manual-body { padding-top: 10px; }
.manual-body label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.manual-result { flex: 0 0 auto; font-weight: 900; color: var(--primary); font-size: 18px; white-space: nowrap; }

/* ===== 料金表 ===== */
.table-wrap { overflow-x: auto; }
.fare-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.fare-table th, .fare-table td { padding: 11px 12px; border-bottom: 1px solid var(--border); text-align: right; }
.fare-table th:first-child { text-align: left; }
.fare-table thead th { background: var(--primary); color: #fff; font-size: 13px; font-weight: 700; }
.fare-table thead th:first-child { border-top-left-radius: 8px; }
.fare-table thead th:last-child { border-top-right-radius: 8px; }
.fare-table tbody th { font-weight: 800; }
.fare-table tbody tr:nth-child(even) { background: #f5f8f6; }
.fare-table td strong { color: var(--primary); font-size: 16px; }

/* ===== 仕組み ===== */
.mechanism { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.mechanism li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 12px 14px; background: var(--primary-soft); border-radius: 10px; }
.mech-label { font-weight: 700; color: var(--primary); }
.mech-value { font-weight: 900; }
.notes { margin: 0; padding-left: 1.2em; font-size: 13px; color: #424242; }
.notes li { margin-bottom: 4px; }

/* ===== FAQ ===== */
.faq-list { display: grid; gap: 8px; }
.faq-item { border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.faq-item summary { cursor: pointer; padding: 13px 40px 13px 14px; font-weight: 800; position: relative; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: 'Q'; color: var(--accent); font-weight: 900; margin-right: 8px; }
.faq-item summary::after { content: '＋'; position: absolute; right: 14px; top: 12px; color: var(--primary); }
.faq-item[open] summary::after { content: '－'; }
.faq-answer { padding: 0 14px 12px; font-size: 14px; color: #333; }
.faq-answer p { margin: 0; }

/* ===== 下部CTA ===== */
.cta-card { background: linear-gradient(120deg, #fff 0%, #f7f4f0 100%); }
.hours { margin: 12px 0 0; font-size: 13px; color: var(--text-sub); text-align: center; }

/* ===== フッター ===== */
.site-footer { background: #143c35; color: #fff; padding: 24px 0; font-size: 13px; margin-top: 24px; }
.site-footer p { margin: 2px 0; }
.site-footer a { color: #fff; }
.footer-name { font-weight: 800; font-size: 15px; }
.footer-updated { opacity: .75; margin-top: 8px !important; }

/* ===== スマホ追従バー ===== */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.97); box-shadow: 0 -2px 12px rgba(20,55,48,.14);
}
.sticky-cta a { display: block; text-align: center; padding: 12px; border-radius: 10px; font-weight: 900; text-decoration: none; color: #fff; }
.sticky-line { background: var(--line); }
.sticky-tel { background: var(--primary); }
@media (min-width: 900px) { .sticky-cta { display: none; } body { padding-bottom: 0; } }

@media (min-width: 1024px) {
  .hero h1 { white-space: nowrap; font-size: clamp(27px, 2.2vw, 31px); }
  main > .wrap {
    display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr);
    gap: 18px; align-items: start; padding-top: 18px;
  }
  main > .wrap > .card { margin: 0; }
  .calc-card { grid-column: 1; grid-row: 1 / span 2; }
  #table { grid-column: 2; grid-row: 1; }
  #system { grid-column: 2; grid-row: 2; }
  #faq, #call { grid-column: 1 / -1; }
}

@media (max-width: 380px) {
  .btn-gps { padding: 13px 9px; font-size: 13px; }
  .result-amount { font-size: 34px; }
}

@media (max-width: 600px) {
  .hero h1 { font-size: 24px; }
  .card { padding: 20px 16px; }
  .wrap { padding: 0 14px; }
  .site-header { padding: 8px 10px; }
  .brand { gap: 8px; }
  .brand-logo { width: 48px; height: 40px; padding: 2px; }
  .brand-name { font-size: 13px; }
  .brand-sub { font-size: 10px; }
}
