:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, "Hiragino Sans", "Yu Gothic", sans-serif;
  color: #162b25;
  background: #f1f5f1;
  --line: #d9e4dc;
  --brand: #17634e;
  --muted: #4b6458;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden], .mobile-break { display: none !important; }
.page { max-width: 69rem; padding: 2rem clamp(1rem, 4vw, 3rem); margin: auto; }
.hero { padding: clamp(1.25rem, 4vw, 3rem) 0; }
h1, h2, h3, p { margin: 0; }
h1 { max-width: 17ch; font-size: clamp(2.25rem, 7vw, 4.3rem); line-height: 1.12; letter-spacing: -.04em; }
.hero p, #result-reason { margin-top: .65rem; line-height: 1.7; }
.hero p { color: var(--muted); max-width: 47ch; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 1.05rem; padding: clamp(1rem, 3.7vw, 2rem); margin: 0 0 1rem; }
.panel h2 { margin-bottom: .75rem; font-size: 1.35rem; }
.fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin: 1rem 0; }
.fields label { display: grid; gap: .35rem; font-size: .875rem; font-weight: 650; }
input:not([type="radio"], [type="checkbox"]) { width: 100%; min-height: 2.85rem; color: inherit; font: inherit; font-size: 1rem; padding: .4rem .65rem; border-radius: .45rem; border: 1px solid #9dad9f; background: #fff; }
input[type="radio"], input[type="checkbox"] { accent-color: var(--brand); }
.check { display: inline-flex; align-items: center; gap: .4rem; }
.preferences { padding: 0; margin: 1rem 0; border: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
legend { font-weight: 650; padding: 0 0 .45rem; }
.preferences label { border: 1px solid var(--line); border-radius: .4rem; padding: .4rem .6rem; }
.preferences label:has(:checked) { background: #e8f2eb; border-color: #82aa97; }
.primary-button { background: var(--brand); color: #fff; font: inherit; font-weight: 700; border: 0; border-radius: .5rem; padding: .75rem 1.15rem; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; min-height: 2.85rem; cursor: pointer; }
.primary-button:hover { background: #104936; }
.help { color: var(--muted); font-size: .88rem; line-height: 1.6; margin-top: .65rem; }
#result-heading { margin-top: .3rem; }
.flight { background: #eaf4ee; border: 1px solid #c9ded0; border-radius: .7rem; padding: 1rem; margin: 1.25rem 0; }
.flight:empty { display: none; }
.flight h3 { font-size: 1.16rem; }
.flight p { line-height: 1.6; margin-top: .45rem; }
.flight .primary-button, .flight .issued-material { margin-top: .75rem; }
.flight .issued-material a { display: inline-block; margin-bottom: .5rem; }
.table-wrap { overflow-x: auto; margin-top: 1rem; }
table { border-collapse: collapse; width: 100%; min-width: 31rem; }
th, td { padding: .75rem .5rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: #f6f8f5; font-size: .86rem; }
tr.is-top td, tr.is-top th { background: #f0f7f1; }
td strong { white-space: nowrap; }
td small { display: block; color: var(--muted); margin-top: .3rem; min-width: 8ch; }
.method { margin-top: 1rem; line-height: 1.65; }
.method summary { cursor: pointer; font-weight: 650; }
.method p { margin-top: .5rem; }
.page-footer { padding: .75rem 0; }
a { color: #11513f; }
:focus-visible { outline: 3px solid #b45b13; outline-offset: 3px; }
@media (max-width: 44rem) {
  .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  form > .primary-button { width: 100%; }
}
@media (max-width: 28rem) {
  .mobile-break { display: unset !important; }
  .flight .primary-button { width: 100%; }
}

.booking-action { margin-top: .6rem; }
.booking-alternatives { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .55rem; margin-top: 1rem; }
.booking-alternatives h3 { width: 100%; font-size: 1rem; }
.booking-alternatives .booking-action { margin: 0; }
.secondary-button { display: inline-flex; padding: .55rem .75rem; border: 1px solid #82aa97; border-radius: .45rem; margin: 0; min-height: 2.6rem; align-items: center; background: #fff; font-weight: 650; text-decoration: none; }
.secondary-button:hover { background: #f0f7f1; }

.quote-builder { margin-top: 1.3rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.quote-builder p { margin-top: .4rem; line-height: 1.6; }
.quote-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,15rem),1fr)); gap: .65rem; margin: .9rem 0; }
.quote-card { min-width: 0; border: 1px solid var(--line); border-radius: .5rem; padding: .75rem; }
.quote-card label { display: grid; gap: .25rem; margin-bottom: .55rem; font-size: .875rem; }
.quote-results:not(:empty) { background: #eaf4ee; border-radius: .6rem; padding: .8rem; margin-top: .75rem; }
.copy-trip { cursor: pointer; color: var(--brand); font: inherit; margin: .75rem .5rem 0 0; }
@media (max-width: 30rem) {
  #route-fallback .booking-alternatives { display: grid; }
  .quote-grid { gap: .5rem; }
}
.quote-card summary { cursor: pointer; font-weight: 700; padding: .2rem 0; }
.quote-fields { margin-top: .55rem; }

#mobile-results { display: none; }
#route-fallback:not([hidden]) { border-top: 1px solid var(--line); margin-top: 1.2rem; padding-top: 1rem; }
.quote-panel { margin-top: .9rem; }
.quote-panel > summary { cursor: pointer; font-weight: 700; padding: .65rem 0; }
.quote-panel .quote-builder { margin-top: 0; padding-top: .6rem; }
.page-footer p { font-weight: 650; margin-bottom: .4rem; }
tr th small { display: block; color: var(--muted); font-weight: 450; margin-top: .3rem; }
@media (max-width: 39rem) {
  #result .table-wrap { display: none; }
  #mobile-results:not(:empty) { display: grid; gap: .65rem; }
  .mobile-result-card { border: 1px solid var(--line); padding: .8rem; border-radius: .65rem; line-height: 1.55; min-width: 0; }
  .mobile-result-card.is-top { background: #f0f7f1; }
  .mobile-result-card h3 { font-size: 1rem; }
  .mobile-result-card p { margin-top: .3rem; font-weight: 650; }
  .mobile-result-card small { display: block; margin-top: .35rem; color: var(--muted); font-size: .88rem; }
  #route-fallback .secondary-button { width: 100%; }
}
.prefecture-picker summary { cursor: pointer; font-weight: 650; color: var(--brand); padding-block: .5rem; }
.prefecture-fields { grid-template-columns: repeat(2,minmax(0,1fr)); margin-top: .45rem; }
.prefecture-fields select { min-width: 0; width: 100%; min-height: 2.85rem; color: inherit; font: inherit; font-size: 1rem; padding: .4rem .65rem; border-radius: .45rem; border: 1px solid #9dad9f; background: #fff; }
.guide-page { max-width: 57rem; }
.guide-section p { line-height: 1.7; }
.guide-links { display: flex; flex-wrap: wrap; gap: .55rem 1.5rem; list-style: none; padding: 0; margin: .45rem 0 1rem; }
.guide-links a { display: inline-block; padding: .5rem .2rem; }

.quick-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
.fields .kids-toggle { display:flex; align-items:center; justify-content:center; min-height:2.85rem; align-self:end; border:1px solid #9dad9f; border-radius:.45rem; padding:.45rem; background:#fff; }
.kids-toggle input { width:1.13rem; height:1.13rem; }
.date-tap { width:100%; min-height:3.45rem; padding:.45rem .7rem; color:inherit; font:inherit; background:#fff; border:1px solid #9dad9f; border-radius:.45rem; text-align:left; cursor:pointer; }
.date-tap span { display:block; font-size:.83rem; color:var(--muted); }
.date-tap strong { display:block; font-size:1rem; }
#dates-note { margin-top:-.55rem; }
#trip-calendar { width:min(29rem, calc(100vw - 1rem)); max-height:calc(100dvh - 1rem); padding:.95rem; border:1px solid #9dad9f; border-radius:.8rem; color:inherit; }
#trip-calendar::backdrop { background:#10251db3; }
.calendar-header,.calendar-nav { display:flex; align-items:center; justify-content:space-between; gap:.5rem; }
.calendar-header h2 { font-size:1.14rem; }
#trip-calendar button { min-height:2.65rem; border:1px solid #a1afa6; border-radius:.42rem; font:inherit; padding:.2rem .4rem; color:inherit; background:#fff; cursor:pointer; }
.calendar-nav { margin-block:.6rem; }
.calendar-nav button { min-width:2.65rem; }
.calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:.2rem; text-align:center; }
.calendar-grid > span { font-size:.85rem; }
#trip-calendar button[aria-pressed="true"] { background:var(--brand); color:#fff; font-weight:750; }
#trip-calendar button:disabled { color:#667267; background:#eef0ee; cursor:default; }
#calendar-clear { display:block; width:100%; margin-top:.7rem; }
.quick-results { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.5rem; margin:1rem 0; }
.quick-results:empty { display:none; }
.quick-results article { min-width:0; background:#f0f7f1; border:1px solid #a9c4b4; padding:.55rem; border-radius:.55rem; }
.quick-results h3 { font-size:1rem; }
.quick-results article p { font-size:.85rem; }
.quick-gap { grid-column:1/-1; font-weight:650; }
@media (max-width:480px) {
  .fields.quick-fields { grid-template-columns:repeat(2,minmax(0,1fr)); gap:.5rem; }
  .quick-results { grid-template-columns:1fr; }
  .quick-results article { display:grid; grid-template-columns:7rem 1fr; align-items:baseline; gap:.15rem .45rem;}
  .quick-results article p { grid-column:2; }
}

.ad-disclosure { font-size:.875rem; margin-top:.6rem; color:var(--muted); }
.issued-material a { display:inline-flex; align-items:center; justify-content:center; min-height:2.8rem; padding:.55rem .9rem; border-radius:.5rem; color:#fff; background:var(--brand); font-weight:700; }
