:root {
    --ink: #19322b;
    --muted: #60706b;
    --paper: #f6f8f5;
    --surface: #ffffff;
    --primary: #176b52;
    --primary-dark: #0f4d3c;
    --accent: #e4f2ea;
    --border: #d7e0dc;
    --danger: #a63a3a;
    --shadow: 0 14px 32px rgb(20 58 47 / 9%);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Yu Gothic UI", "Hiragino Sans", sans-serif; line-height: 1.65; }
a { color: var(--primary-dark); }
button, input, select, textarea { font: inherit; }
input, select, textarea { width: 100%; padding: .72rem; border: 1px solid var(--border); border-radius: .55rem; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus, button:focus, a:focus { outline: 3px solid #8ed0b9; outline-offset: 2px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 20; background: #fff; padding: .7rem; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem max(1rem, calc((100vw - 1120px) / 2)); background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { font-size: 1.25rem; font-weight: 800; text-decoration: none; }
.site-header nav { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; }
.site-header nav a, .link-button { border: 0; background: none; color: var(--primary-dark); padding: 0; text-decoration: underline; cursor: pointer; }
.inline-form { display: inline; }
.page-shell { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; padding: 2.5rem 0 4rem; }
.site-footer { padding: 1.5rem; text-align: center; color: var(--muted); border-top: 1px solid var(--border); }
.hero { max-width: 820px; padding: clamp(2rem, 8vw, 6rem) 0; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 4.8rem); line-height: 1.08; letter-spacing: -.04em; margin: .4rem 0 1.5rem; }
.eyebrow { color: var(--primary); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.page-heading, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.page-heading { margin-bottom: 2rem; }
.page-heading h1 { margin: .1rem 0; font-size: clamp(1.8rem, 4vw, 3rem); }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }
.button { display: inline-flex; justify-content: center; align-items: center; border: 1px solid var(--primary); border-radius: 999px; padding: .72rem 1.15rem; background: var(--primary); color: #fff; text-decoration: none; cursor: pointer; }
.button:hover { background: var(--primary-dark); }
.button.secondary { color: var(--primary-dark); background: transparent; }
.button.danger { border-color: var(--danger); background: var(--danger); }
.button.small { padding: .48rem .85rem; }
.feature-grid, .card-grid, .metric-grid, .trend-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.card, .detail-card, .form-card, .narrow-card, .map-card { padding: 1.4rem; border: 1px solid var(--border); border-radius: 1rem; background: var(--surface); box-shadow: var(--shadow); }
.card h2, .card h3 { margin-top: 0; }
.card.muted { opacity: .72; }
.metric { display: grid; gap: .2rem; padding: 1.25rem; border-radius: 1rem; background: var(--accent); }
.metric strong { font-size: 2rem; }
.metric small { color: var(--muted); }
.two-column, .course-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-bottom: 2rem; }
.course-layout { grid-template-columns: minmax(0, 1fr) minmax(320px, .9fr); align-items: start; }
.map-card { position: sticky; top: 1rem; padding: .5rem; }
#course-map { min-height: 520px; border-radius: .75rem; background: var(--accent); overflow: hidden; display: grid; place-items: center; }
.narrow-card, .form-card.narrow { max-width: 760px; margin: 0 auto; }
.field { margin-bottom: 1rem; }
.field label, legend { display: block; margin-bottom: .35rem; font-weight: 700; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.errorlist { color: var(--danger); }
details { margin: 1rem 0; padding: 1rem; border: 1px solid var(--border); border-radius: .75rem; }
summary { cursor: pointer; font-weight: 700; }
.filter-bar { display: flex; align-items: end; flex-wrap: wrap; gap: .8rem; margin-bottom: 2rem; padding: 1rem; border-radius: .8rem; background: var(--surface); }
.filter-bar p { margin: 0; min-width: 150px; }
.item-list, .route-points { padding: 0; list-style: none; }
.item-list li, .route-points li { padding: .8rem 0; border-bottom: 1px solid var(--border); }
.route-points li { display: grid; grid-template-columns: 6rem 1fr; }
.journal-list { display: grid; gap: 1rem; }
.journal-card { display: grid; grid-template-columns: 1fr auto; align-items: start; }
.journal-card > p:last-child { grid-column: 1 / -1; }
.rating { color: var(--primary-dark); font-weight: 800; }
.rating.large { font-size: 1.5rem; }
.detail-list { display: grid; grid-template-columns: 8rem 1fr; gap: .4rem 1rem; }
.detail-list dt { font-weight: 700; }
.detail-list dd { margin: 0; }
.empty-state { padding: 3rem 1rem; text-align: center; border: 1px dashed var(--border); border-radius: 1rem; background: var(--surface); }
.badge { padding: .2rem .6rem; border-radius: 999px; background: var(--accent); font-size: .85rem; }
.notice, .status, .message { padding: .8rem 1rem; border-radius: .7rem; background: var(--accent); }
.messages { width: min(1120px, calc(100% - 2rem)); margin: 1rem auto 0; }
.danger-zone { margin-top: 2rem; padding: 1rem; border: 1px solid #e3bebe; border-radius: .8rem; }
.waypoint-row { display: grid; grid-template-columns: 2rem 1fr auto; align-items: center; gap: .5rem; margin-bottom: .65rem; }
.waypoint-actions { display: flex; gap: .3rem; }
.icon-button { border: 1px solid var(--border); border-radius: .4rem; background: #fff; cursor: pointer; }
.timeline { display: grid; gap: .6rem; padding: 0; list-style: none; }
.timeline li { display: grid; grid-template-columns: 8rem 1fr auto; gap: 1rem; align-items: center; padding: .8rem 1rem; border-left: .3rem solid var(--primary); border-radius: .5rem; background: var(--surface); }
gmp-place-autocomplete { width: 100%; }
@media (max-width: 780px) {
    .site-header, .page-heading { align-items: flex-start; flex-direction: column; }
    .feature-grid, .card-grid, .metric-grid, .trend-grid, .two-column, .course-layout, .field-row { grid-template-columns: 1fr; }
    .map-card { position: static; }
    #course-map { min-height: 360px; }
    .journal-card { grid-template-columns: 1fr; }
    .journal-card > p:last-child { grid-column: auto; }
    .timeline li { grid-template-columns: 1fr; gap: .2rem; }
}
