/* Canonical stylesheet for the volunteer field handbook. */
:root {
  --hb-paper: #f5f3ed;
  --hb-surface: #fff;
  --hb-ink: #202d24;
  --hb-muted: #596359;
  --hb-green: #245c43;
  --hb-green-dark: #183f2e;
  --hb-green-wash: #e9f0e9;
  --hb-orange: #e27128;
  --hb-orange-dark: #864009;
  --hb-orange-wash: #fff1df;
  --hb-rule: #d5d9ce;
  --hb-radius: 0.75rem;
  color-scheme: light;
  font-size: 17px;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.7;
  background: var(--hb-paper);
  color: var(--hb-ink);
  -webkit-text-size-adjust: 100%;
}

:root[data-font="large"] { font-size: 20px; }
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, select { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: 0.6; }
[hidden] { display: none !important; }
.no-js .hb-js-only { display: none !important; }
.no-js .hb-main-layout { display: block; }
:focus-visible { outline: 3px solid #006bd6; outline-offset: 4px; }
.hb-skip-link { position: fixed; top: -10rem; left: 1rem; z-index: 100; display: inline-flex; align-items: center; min-height: 48px; padding: 0.65rem 1rem; border: 2px solid #fff; border-radius: 0.4rem; background: var(--hb-green-dark); color: #fff; font-weight: 750; }
.hb-skip-link:focus { top: 1rem; }
.hb-shell { width: min(100%, 1100px); margin-inline: auto; padding: 1rem 1rem calc(7rem + env(safe-area-inset-bottom, 0px)); word-break: auto-phrase; overflow-wrap: anywhere; }
.hb-shell a { color: var(--hb-green); text-decoration-thickness: 0.1em; text-underline-offset: 0.2em; }
.hb-shell a:hover { color: var(--hb-green-dark); }
.hb-shell img { display: block; max-width: 100%; height: auto; }
.hb-shell h1, .hb-shell h2, .hb-shell h3, .hb-shell h4 { line-height: 1.4; text-wrap: balance; }
.hb-shell p { margin: 0 0 0.85rem; }
.hb-shell p:last-child { margin-bottom: 0; }
.hb-shell h2 { margin: 0 0 1rem; font-size: 1.42rem; }
.hb-shell h3 { margin: 0 0 0.65rem; font-size: 1.1rem; }
.hb-shell ul, .hb-shell ol { padding-left: 1.4rem; }
.hb-shell li + li { margin-top: 0.4rem; }
.hb-shell strong { font-weight: 750; }
.hb-shell small { font-size: 0.82rem; }
.hb-header { position: relative; padding: 1.4rem; border-radius: 1rem; background: var(--hb-green); color: #fff; border-top: 5px solid var(--hb-orange); }
.hb-header a { color: #fff; }
.hb-kicker, .hb-header .kicker, .hb-header [data-kicker] { margin-bottom: 0.5rem; font-size: 0.72rem; font-weight: 750; letter-spacing: 0.12em; line-height: 1.5; }
.hb-header h1, .hb-title { margin: 0 0 0.65rem; font-size: clamp(1.55rem, 5.5vw, 2.4rem); font-weight: 800; letter-spacing: 0.015em; }
.hb-subheader, .hb-header .subheader { max-width: 42rem; margin-bottom: 0.9rem; font-size: 0.88rem; color: #eff6ed; }
.hb-header .hb-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; color: #eff6ed; }
.hb-header .hb-meta a { color: #fff; }
.hb-header > .hb-note { margin-top: 0.9rem; padding: 0.7rem 0.85rem; border-color: #c6d3bd; border-left-color: #c6d3bd; background: #eff4e9; color: #243c2a; font-size: 0.78rem; line-height: 1.65; }
.hb-header-meta { display: flex; flex-wrap: wrap; gap: 0.35rem 0.85rem; font-size: 0.76rem; color: #eff6ed; }
.hb-main-layout { display: grid; gap: 1.25rem; margin-top: 1.25rem; min-width: 0; }
.hb-main, .hb-sidebar { min-width: 0; }
.hb-sidebar { padding: 0.85rem; border: 1px solid var(--hb-rule); border-radius: var(--hb-radius); background: var(--hb-surface); }
.hb-sidebar h2 { margin-bottom: 0.5rem; font-size: 1rem; }
.hb-sidebar label { display: block; margin-bottom: 0.4rem; font-size: 0.82rem; font-weight: 750; }
.hb-select, .hb-search { display: block; width: 100%; min-height: 50px; padding: 0.65rem 0.75rem; border: 2px solid #879889; border-radius: 0.45rem; background: #fff; color: var(--hb-ink); font-size: 1rem; }
.hb-select { padding-right: 2rem; }
.hb-search { margin-block: 0.85rem 1.25rem; }
.hb-search::placeholder { color: #606b61; opacity: 1; }
.hb-nav { position: fixed; z-index: 20; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.2rem; padding: 0.5rem 0.4rem calc(0.5rem + env(safe-area-inset-bottom, 0px)); border-top: 2px solid var(--hb-green); background: #fff; box-shadow: 0 -3px 14px rgb(32 45 36 / 9%); }
.hb-nav button { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 0.15rem; min-width: 0; min-height: 56px; padding: 0.35rem 0.1rem; border: 1px solid transparent; border-radius: 0.4rem; background: #fff; color: #354739; font-size: 0.75rem; font-weight: 750; line-height: 1.45; text-align: center; }
.hb-nav button[aria-pressed="true"] { border-color: var(--hb-green); background: var(--hb-green); color: #fff; }
.hb-nav button:hover { background: var(--hb-green-wash); color: var(--hb-green-dark); }
.hb-nav button[aria-pressed="true"]:hover { background: var(--hb-green-dark); color: #fff; }
.hb-nav-icon { font-size: 1.16rem; line-height: 1.2; }
.hb-nav-label { display: block; }
.hb-toolbar, .hb-inline-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.hb-toolbar { margin-bottom: 1rem; }
.hb-toolbar .hb-button { flex-grow: 1; }
.hb-toolbar > .hb-details { flex: 1 1 auto; margin: 0; border-color: #879889; border-radius: 0.45rem; }
.hb-toolbar > .hb-details > summary { min-height: 46px; padding: 0.55rem 0.75rem; font-size: 0.82rem; line-height: 1.5; }
.hb-toolbar > .hb-details[open] { flex-basis: 100%; }
.hb-toolbar > .hb-details > .hb-inline-actions { margin: 0.6rem; gap: 0.45rem; }
.hb-toolbar > .hb-details > p { margin: 0.65rem 0.75rem; font-size: 0.78rem; }
.hb-sidebar .hb-inline-actions { margin-top: 0.8rem; }
.hb-sidebar > .hb-details { margin-block: 0.65rem 0; }
.hb-sidebar > .hb-details > summary { min-height: 44px; padding: 0.6rem 0.65rem; font-size: 0.77rem; }
.hb-sidebar > .hb-details > :not(summary) { margin-inline: 0.7rem; }
.hb-sidebar .hb-status { margin-block: 0.6rem; }
.hb-button { display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; min-height: 46px; max-width: 100%; padding: 0.55rem 0.75rem; border: 1px solid var(--hb-green); border-radius: 0.45rem; background: #fff; color: var(--hb-green); font-size: 0.82rem; font-weight: 750; line-height: 1.5; text-align: center; text-decoration: none !important; }
.hb-button:hover { background: var(--hb-green-wash); }
.hb-button-primary, .hb-button[aria-pressed="true"] { background: var(--hb-green); color: #fff !important; }
.hb-button-primary:hover, .hb-button[aria-pressed="true"]:hover { background: var(--hb-green-dark); }
.hb-button-secondary { border-color: #879889; background: #fff; color: #354739; }
.hb-button-danger { border-color: #9a2c20; color: #9a2c20; }
.hb-button-danger:hover { background: #fff0ed; }
.hb-panel { min-width: 0; scroll-margin-top: 1rem; }
.hb-section-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.8rem; }
.hb-section-heading h2 { margin-bottom: 0; }
.hb-eyebrow, .hb-card-kicker { margin-bottom: 0.35rem !important; color: var(--hb-green); font-size: 0.73rem; font-weight: 800; letter-spacing: 0.08em; }
.hb-role-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; margin-block: 1rem; }
.hb-role-button { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; min-width: 0; min-height: 70px; padding: 0.8rem; border: 1px solid #a4b0a2; border-radius: 0.6rem; background: #fff; color: var(--hb-green-dark); font-size: 0.9rem; font-weight: 750; line-height: 1.5; text-align: left; }
.hb-role-button:hover { border-color: var(--hb-green); background: var(--hb-green-wash); }
.hb-role-button[aria-pressed="true"] { border: 2px solid var(--hb-green); padding: calc(0.8rem - 1px); background: var(--hb-green-wash); }
.hb-role-button small { display: block; margin-top: 0.2rem; color: var(--hb-muted); font-weight: 500; }
.hb-word { display: inline-block; white-space: nowrap; }
.hb-role-button[data-role="secretary"], .hb-role-button[data-role="support"] { grid-column: 1 / -1; display: block; }
.hb-role-button[data-role="marshal"] { display: block; }
.hb-card { min-width: 0; margin-bottom: 1rem; padding: 1.15rem; border: 1px solid var(--hb-rule); border-radius: var(--hb-radius); background: var(--hb-surface); }
.hb-card-title { display: flex; flex-wrap: wrap; gap: 0.35rem 0.65rem; align-items: baseline; margin: 0 0 0.75rem; font-size: 1.3rem; font-weight: 800; color: var(--hb-green-dark); }
.hb-card-body { min-width: 0; }
.hb-badge { display: inline-flex; align-items: center; gap: 0.2rem; padding: 0.15rem 0.5rem; border: 1px solid #bdcabb; border-radius: 0.3rem; background: var(--hb-green-wash); color: var(--hb-green-dark); font-size: 0.7rem; font-weight: 700; line-height: 1.6; }
.hb-steps { counter-reset: handbook-step; display: grid; gap: 0.85rem; margin: 1rem 0; padding: 0 !important; list-style: none; }
.hb-steps > li { position: relative; min-height: 2rem; margin: 0 !important; padding-left: 2.65rem; }
.hb-steps > li::before { counter-increment: handbook-step; content: counter(handbook-step, decimal-leading-zero); position: absolute; top: 0.08rem; left: 0; display: flex; align-items: center; justify-content: center; width: 1.95rem; height: 1.95rem; border-radius: 0.35rem; background: var(--hb-green-wash); color: var(--hb-green-dark); font-size: 0.84rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.hb-steps > li strong { display: block; margin-bottom: 0.15rem; }
.hb-steps > li p { margin-top: 0.15rem; }
.hb-caution, .hb-warning, .hb-note { margin-block: 1rem; padding: 1rem; border: 1px solid #e8b983; border-left: 5px solid var(--hb-orange); border-radius: 0.4rem; background: var(--hb-orange-wash); color: #593218; }
.hb-caution h3, .hb-warning h3 { color: #593218; }
.hb-caution strong, .hb-warning strong { color: #593218; }
.hb-warning { border-color: #d58d7a; border-left-color: #9a2c20; background: #fff0ea; color: #61271d; }
.hb-warning h3, .hb-warning strong { color: #61271d; }
.hb-note { border-color: #cad4c6; border-left-color: var(--hb-green); background: var(--hb-green-wash); color: #33483a; }
.hb-meta { margin-top: 0.65rem; color: var(--hb-muted); font-size: 0.76rem; line-height: 1.7; }
.hb-status { display: block; margin-block: 0.65rem; color: #354739; font-size: 0.78rem; line-height: 1.7; }
.hb-status:empty { display: none; }
.hb-status[data-state="error"] { color: #9a2c20; }
.hb-status[data-state="success"] { color: var(--hb-green-dark); font-weight: 700; }
.hb-update-banner { margin-bottom: 1rem; padding: 0.75rem 1rem; border: 2px solid var(--hb-orange-dark); border-radius: 0.5rem; background: var(--hb-orange-wash); color: #593218; }
.hb-arrival-time { margin-block: 0.25rem 0.7rem; color: var(--hb-green-dark); font-size: clamp(2rem, 8vw, 3rem); font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.hb-definition { display: grid; grid-template-columns: auto 1fr; gap: 0; margin: 0; }
.hb-definition dt, .hb-definition dd { min-width: 0; margin: 0; padding-block: 0.6rem; border-bottom: 1px solid var(--hb-rule); }
.hb-definition dt { padding-right: 0.9rem; color: var(--hb-muted); font-size: 0.82rem; font-weight: 600; }
.hb-definition dd { font-weight: 650; }
.hb-definition dt:last-of-type, .hb-definition dd:last-of-type { border-bottom: 0; }
.hb-map-grid { display: grid; gap: 1rem; }
.hb-map-card { min-width: 0; margin: 0; padding: 1rem; border: 1px solid var(--hb-rule); border-radius: var(--hb-radius); background: #fff; }
.hb-map-card a:has(img), .hb-map-link { display: block; padding: 0.4rem; border: 1px solid #c8cec2; border-radius: 0.4rem; background: #fff; }
.hb-map-card img { width: 100%; height: auto; }
.hb-map-caption { margin-top: 0.75rem; font-size: 0.84rem; line-height: 1.65; }
.hb-map-caption strong { display: block; margin-bottom: 0.2rem; color: var(--hb-green-dark); }
.hb-schedule-grid { display: grid; gap: 0.7rem; }
.hb-schedule-card { min-width: 0; padding: 1rem; border: 1px solid var(--hb-rule); border-left: 4px solid var(--hb-green); border-radius: 0.5rem; background: #fff; }
.hb-schedule-card h3 { margin-bottom: 0.7rem; }
.hb-time-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin: 0; }
.hb-time-grid > div { min-width: 0; padding: 0.65rem; border-radius: 0.4rem; background: var(--hb-paper); }
.hb-time-grid dt { margin: 0 0 0.15rem; color: var(--hb-muted); font-size: 0.72rem; line-height: 1.5; }
.hb-time-grid dd { margin: 0; color: var(--hb-green-dark); font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.4; }
.hb-empty { padding: 1.35rem; border: 1px dashed #8d9f8b; border-radius: var(--hb-radius); background: #fafaf5; text-align: center; color: #465449; }
.hb-details { margin-block: 0.7rem; border: 1px solid var(--hb-rule); border-radius: 0.5rem; background: #fff; }
.hb-details summary { min-height: 48px; padding: 0.75rem 0.9rem; color: var(--hb-green-dark); font-weight: 750; line-height: 1.5; cursor: pointer; }
.hb-details[open] summary { border-bottom: 1px solid var(--hb-rule); }
.hb-details > :not(summary) { margin: 0.85rem 1rem; }
.hb-footer { margin-top: 1.5rem; padding: 1rem 0 0; border-top: 1px solid #c7cec0; color: var(--hb-muted); font-size: 0.73rem; line-height: 1.8; }
.hb-footer a { display: inline-block; padding-block: 0.35rem; }
.hb-shell noscript { display: block; margin-block: 1rem; padding: 1rem; border: 2px solid var(--hb-orange-dark); border-radius: 0.5rem; background: var(--hb-orange-wash); color: #593218; }
.hb-shell noscript a { display: inline-block; min-height: 44px; padding-block: 0.5rem; }

@media (min-width: 600px) {
  .hb-shell { padding: 1.5rem 1.5rem calc(7rem + env(safe-area-inset-bottom, 0px)); }
  .hb-header { padding: 1.7rem 2rem; }
  .hb-role-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hb-map-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hb-time-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hb-card { padding: 1.5rem; }
  .hb-toolbar .hb-button { flex-grow: 0; }
  .hb-toolbar > .hb-details { flex-grow: 0; }
}

@media (min-width: 900px) {
  .hb-shell { padding: 2rem 1.5rem 3rem; }
  .hb-main-layout { grid-template-columns: 245px minmax(0, 1fr); align-items: start; gap: 1.6rem; margin-top: 1.6rem; }
  .hb-sidebar { position: sticky; top: 1rem; }
  .hb-nav { position: static; display: grid; grid-template-columns: 1fr; gap: 0.45rem; margin-top: 1.1rem; padding: 1rem 0 0; border-top: 1px solid var(--hb-rule); background: transparent; box-shadow: none; }
  .hb-nav button { flex-direction: row; justify-content: flex-start; gap: 0.65rem; min-height: 48px; padding: 0.65rem 0.75rem; font-size: 0.86rem; text-align: left; }
  .hb-nav-icon { width: 1.25rem; text-align: center; }
  .hb-schedule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hb-time-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 359px) {
  .hb-shell { padding-inline: 0.65rem; }
  .hb-header { padding: 1.1rem; }
  .hb-nav button { font-size: 13px; white-space: nowrap; }
  .hb-role-grid { gap: 0.45rem; }
  .hb-role-button { padding: 0.65rem; font-size: 0.82rem; }
  .hb-role-button[aria-pressed="true"] { padding: calc(0.65rem - 1px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  :root, :root[data-font="large"] { font-size: 11pt; background: #fff; color: #000; }
  body { background: #fff; }
  .hb-shell { width: auto; max-width: none; margin: 0; padding: 0; }
  .hb-sidebar, .hb-nav, .hb-toolbar, .hb-inline-actions, .hb-update-banner { display: none !important; }
  .hb-main-layout { display: block; margin-top: 1rem; }
  .hb-header { padding: 0 0 0.75rem; border: 0; border-bottom: 2px solid #000; border-radius: 0; background: #fff; color: #000; }
  .hb-header h1 { font-size: 20pt; }
  .hb-header .hb-meta, .hb-subheader, .hb-header .subheader, .hb-header-meta { color: #000; }
  .hb-panel, .hb-card-body { height: auto; max-height: none; }
  .hb-card, .hb-map-card, .hb-schedule-card, .hb-details { break-inside: avoid; box-shadow: none; border-color: #999; }
  .hb-card { padding: 0.75rem; margin-bottom: 0.75rem; }
  .hb-card-title, .hb-card-kicker, .hb-arrival-time, .hb-shell a { color: #000; }
  .hb-map-grid { grid-template-columns: 1fr; }
  .hb-map-card img { max-height: 180mm; object-fit: contain; }
  .hb-map-instruction { display: none; }
  .hb-map-card a:has(img) { border: 0; }
  .hb-caution, .hb-warning, .hb-note { break-inside: avoid; border-color: #777; border-left-color: #000; background: #fff; color: #000; }
  .hb-caution h3, .hb-warning h3, .hb-caution strong, .hb-warning strong { color: #000; }
  .hb-time-grid > div { background: #fff; border: 1px solid #bbb; }
  .hb-time-grid dd, .hb-time-grid dt { color: #000; }
  .hb-footer { margin-top: 0.75rem; color: #000; }
  .hb-status { display: none; }
  .hb-skip-link { display: none; }
  .hb-shell noscript { border-color: #777; background: #fff; color: #000; }
}
