:root {
  color-scheme: light;
  --ink: #172019;
  --ink-soft: #59635c;
  --paper: #f3f0e8;
  --surface: #fffdf8;
  --line: #d7d1c5;
  --hero: #101812;
  --hero-soft: #233426;
  --accent: #f2b72f;
  --accent-strong: #cf8500;
  --danger: #a52a24;
  --shadow: 0 18px 44px rgba(24, 32, 25, .1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html.ops-access-pending {
  overflow: hidden;
  background: #07100b;
}

html.ops-access-pending body > :not(.ops-access-gate):not(noscript):not(script) {
  visibility: hidden;
}

.ops-access-gate {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: grid;
  place-items: center;
  overflow: auto;
  min-height: 100dvh;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  color: #fff;
  background: radial-gradient(circle at 15% 10%, rgba(242, 183, 47, .2), transparent 34%), linear-gradient(145deg, #050806, #102118 70%, #07100b);
}

.ops-access-gate[hidden],
html.ops-access-granted .ops-access-gate { display: none; }

.ops-access-card {
  width: min(440px, 100%);
  padding: 34px;
  border: 1px solid rgba(242, 183, 47, .6);
  border-radius: 18px;
  background: rgba(7, 16, 11, .96);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .48);
}

.ops-access-kicker { color: #f2b72f; font-size: 12px; font-weight: 950; letter-spacing: .08em; }
.ops-access-card h1 { margin: 12px 0 10px; color: #fff; font-size: clamp(25px, 6vw, 34px); line-height: 1.2; }
.ops-access-card > p:not(.ops-access-error) { margin: 0 0 24px; color: #cbd5ce; line-height: 1.65; }
.ops-access-card label { display: block; margin-bottom: 8px; color: #fff; font-size: 13px; font-weight: 900; }
.ops-access-card input { width: 100%; min-height: 52px; padding: 11px 14px; border: 2px solid #6f7d73; border-radius: 10px; color: #fff; background: #111b15; font-size: 20px; letter-spacing: .15em; }
.ops-access-card input:focus { border-color: #f2b72f; outline: 3px solid rgba(242, 183, 47, .24); }
.ops-access-card input[aria-invalid="true"] { border-color: #ef665d; }
.ops-access-card button { width: 100%; min-height: 52px; margin-top: 14px; border: 0; border-radius: 10px; color: #111; background: #f2b72f; font-size: 15px; font-weight: 950; cursor: pointer; }
.ops-access-card button:hover, .ops-access-card button:focus-visible { background: #ffd66b; outline: 3px solid rgba(242, 183, 47, .26); }
.ops-access-card button:disabled { cursor: wait; opacity: .7; }
.ops-access-error { min-height: 22px; margin: 10px 0 0; color: #ff9b94; font-size: 13px; font-weight: 800; }
.ops-access-noscript { position: fixed; inset: 0; z-index: 2147483647; display: grid; place-items: center; margin: 0; padding: 24px; color: #fff; background: #07100b; text-align: center; }

@media (max-width: 520px) {
  .ops-access-gate { padding: 14px; }
  .ops-access-card { padding: 26px 20px; border-radius: 14px; }
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", Arial, sans-serif;
  line-height: 1.58;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-header {
  color: #fff;
  background:
    radial-gradient(circle at 84% 14%, rgba(242, 183, 47, .2), transparent 25rem),
    linear-gradient(118deg, var(--hero), var(--hero-soft));
  border-bottom: 5px solid var(--accent);
}

.header-inner,
main,
footer {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 36px;
  min-height: 250px;
  padding: 42px 0;
}

.brand {
  display: grid;
  flex: 0 0 auto;
  padding-right: 36px;
  color: inherit;
  text-decoration: none;
  border-right: 1px solid rgba(255, 255, 255, .22);
}

.brand-mark {
  color: var(--accent);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 950;
  letter-spacing: -.08em;
  line-height: .92;
}

.brand-text {
  margin-top: 8px;
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .16em;
}

.header-copy h1,
.plan-toolbar h2,
.section-head h2,
.rules-panel h2,
.checklist-section h2,
.login-panel h2 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: -.035em;
}

.header-copy h1 {
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  letter-spacing: -.06em;
}

.header-copy p { margin: 9px 0 0; color: rgba(255, 255, 255, .82); }
.header-copy .eyebrow { color: var(--accent); font-weight: 850; letter-spacing: .08em; }

main { padding: 48px 0 82px; }

.auth-loading,
.login-view {
  display: grid;
  place-items: center;
  min-height: 430px;
}

.auth-loading {
  align-content: center;
  color: var(--ink-soft);
  text-align: center;
}

.loading-dot {
  width: 28px;
  height: 28px;
  border: 4px solid var(--line);
  border-top-color: var(--accent-strong);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.login-panel {
  width: min(100%, 580px);
  padding: clamp(28px, 6vw, 54px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.section-kicker {
  margin: 0 0 6px;
  color: var(--accent-strong);
  font-size: .8rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.login-help,
.toolbar-note,
.section-head p {
  color: var(--ink-soft);
}

label { display: grid; gap: 7px; font-weight: 800; }

.login-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #b9b4aa;
  border-radius: 12px;
  outline: none;
}

textarea { resize: vertical; }

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 3px rgba(242, 183, 47, .24);
}

button {
  cursor: pointer;
  padding: 11px 18px;
  color: #fff;
  background: var(--hero);
  border: 1px solid var(--hero);
  border-radius: 12px;
  font-weight: 850;
}

button:hover { background: #26372a; }
button:disabled { cursor: wait; opacity: .62; }

.button-secondary {
  color: var(--ink);
  background: transparent;
  border-color: var(--line);
}

.button-secondary:hover { background: #eae5da; }
.form-message { min-height: 1.5em; margin: 10px 0 0; color: var(--danger); }
.form-message.is-success { color: #2f7044; }

.plan-view { display: grid; min-width: 0; gap: 34px; }
.plan-view > * { min-width: 0; }

.plan-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
}

.plan-toolbar h2 { font-size: clamp(1.75rem, 4vw, 2.8rem); }
.toolbar-note { margin: 8px 0 0; font-size: .9rem; }
.toolbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar-actions a { color: var(--ink); font-weight: 850; text-underline-offset: 4px; }

.collaboration-note {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  color: #fff;
  background: #314c39;
  border-radius: 16px;
}

.collaboration-note strong { flex: 0 0 auto; color: var(--accent); }
.collaboration-note span { color: rgba(255, 255, 255, .88); font-size: .9rem; }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.summary-card {
  display: grid;
  align-content: space-between;
  min-height: 160px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 10px 26px rgba(24, 32, 25, .05);
}

.summary-card span { color: var(--ink-soft); font-weight: 850; }
.summary-card strong { font-size: clamp(2.25rem, 5vw, 4.3rem); line-height: 1; letter-spacing: -.06em; }
.summary-card small { color: var(--ink-soft); }

.summary-primary {
  color: #fff;
  background: var(--hero);
  border-color: var(--hero);
}

.summary-primary span,
.summary-primary small { color: rgba(255, 255, 255, .75); }
.summary-primary strong { color: var(--accent); }

.rules-panel {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(0, 1.4fr);
  gap: 28px;
  padding: 28px;
  background: #fff5d3;
  border: 1px solid #e9cb70;
  border-left: 7px solid var(--accent-strong);
  border-radius: 20px;
}

.rules-panel h2 { font-size: clamp(1.45rem, 3vw, 2.1rem); }
.rules-panel ol { display: grid; gap: 8px; margin: 0; padding-left: 24px; }
.rules-panel li::marker { color: var(--accent-strong); font-weight: 900; }

.map-section,
.route-section,
.points-section,
.checklist-section {
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 12px 30px rgba(24, 32, 25, .05);
}

.map-section { scroll-margin-top: 16px; }
.map-section-head { align-items: center; }
.map-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.address-status { color: var(--ink-soft); font-size: .82rem; font-weight: 800; }
.address-status.is-complete { color: #2f7044; }
.address-status.is-warning { color: var(--danger); }
.map-stage-filters { display: flex; gap: 7px; margin: -8px 0 16px; flex-wrap: wrap; }

.type-legend {
  display: flex;
  align-items: center;
  gap: 8px 18px;
  margin: -4px 0 16px;
  color: var(--ink-soft);
  font-size: .8rem;
  font-weight: 850;
  flex-wrap: wrap;
}

.type-legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend-dot { width: 12px; height: 12px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(20, 37, 27, .22); }
.legend-village { background: #2d6f8f; }
.legend-intersection { background: #c66a12; }

.banner-map-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  min-height: 610px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #e5e2d9;
}

body.map-focus-open {
  overflow: hidden;
  overscroll-behavior: none;
}

.banner-map-layout.is-map-focus {
  position: fixed;
  inset: 0;
  z-index: 10000;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) clamp(320px, 28vw, 520px);
  border: 0;
  border-radius: 0;
  box-shadow: 0 0 0 100vmax rgba(9, 18, 12, .82);
}

.banner-map-layout.is-map-focus #bannerMap {
  height: 100%;
  min-height: 0;
}

.banner-map-layout.is-map-focus .point-editor {
  min-height: 0;
  padding-top: 76px;
}

.map-focus-close-button {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 30;
  min-height: 44px;
  padding: 10px 17px;
  color: #fff;
  background: var(--hero);
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 11px;
  box-shadow: 0 8px 24px rgba(8, 20, 12, .28);
  font-weight: 900;
  cursor: pointer;
}

.map-focus-close-button:hover { background: #244c32; }
.map-focus-close-button:focus-visible { outline: 4px solid var(--accent); outline-offset: 3px; }

#bannerMap { width: 100%; min-height: 610px; background: #dfe5dc; }

.point-editor {
  min-width: 0;
  padding: 22px;
  overflow: auto;
  background: var(--surface);
  border-left: 1px solid var(--line);
}

.point-empty {
  display: grid;
  align-content: center;
  min-height: 100%;
  color: var(--ink-soft);
  text-align: center;
}

.point-empty strong { color: var(--ink); font-size: 1.2rem; }
.point-empty p { margin: 8px 0 0; }
.selected-point-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.selected-point-head > strong { font-size: 1.35rem; }
.point-editor h3 { margin: 12px 0 14px; font-size: 1.3rem; line-height: 1.35; }

.selected-address {
  display: grid;
  gap: 4px;
  padding: 14px;
  background: #f1ede3;
  border-radius: 13px;
}

.selected-address > span { color: var(--ink-soft); font-size: .73rem; font-weight: 900; letter-spacing: .08em; }
.selected-address strong { line-height: 1.42; }
.selected-address small { color: var(--ink-soft); line-height: 1.4; }

.selected-placement {
  display: grid;
  gap: 0;
  margin: 12px 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}
.selected-placement > div { display: grid; grid-template-columns: 86px minmax(0, 1fr); border-top: 1px solid var(--line); }
.selected-placement > div:first-child { border-top: 0; }
.selected-placement dt, .selected-placement dd { margin: 0; padding: 10px 12px; line-height: 1.45; }
.selected-placement dt { color: var(--ink-soft); background: #f1ede3; font-size: .73rem; font-weight: 900; letter-spacing: .04em; }
.selected-placement dd { color: var(--ink); font-size: .83rem; font-weight: 800; }

.point-actions { display: grid; gap: 7px; margin-top: 14px; }
.point-actions small { color: var(--ink-soft); font-size: .73rem; line-height: 1.45; }
.roadview-open-button {
  width: 100%;
  padding: 11px 14px;
  color: #fff;
  background: var(--hero-soft);
  border: 1px solid var(--hero-soft);
  border-radius: 11px;
  font-weight: 900;
  cursor: pointer;
}
.roadview-open-button:hover { background: var(--hero); }
.roadview-open-button:disabled { color: #8a918c; background: #e4e3dd; border-color: #d2d1cb; cursor: not-allowed; }

.banner-map-mode-control {
  display: inline-flex;
  align-items: stretch;
  margin: 10px 10px 0 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #27312b;
  border-radius: 3px;
  box-shadow: 0 2px 7px rgba(15, 23, 42, .24);
}
.banner-map-mode-control button {
  min-width: 56px;
  min-height: 38px;
  padding: 7px 12px;
  color: #111;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
  background: #fff;
  border: 0;
  border-left: 1px solid #27312b;
  cursor: pointer;
}
.banner-map-mode-control button:first-child { border-left: 0; }
.banner-map-mode-control button[aria-pressed="true"] { color: #fff; background: #1775d1; }
.banner-map-mode-control .banner-map-roadview-control { min-width: 66px; color: #fff; background: #173c2a; }
.banner-map-mode-control button:hover,
.banner-map-mode-control button:focus-visible { color: #fff; background: #0f579f; outline: 3px solid rgba(23, 105, 194, .34); outline-offset: -3px; }
.banner-map-mode-control .banner-map-roadview-control:hover,
.banner-map-mode-control .banner-map-roadview-control:focus-visible { background: #0f2d1e; }
.banner-map-mode-control button:disabled { color: #737b76; background: #e8ece9; cursor: not-allowed; }

body.roadview-open { overflow: hidden; }

.roadview-dialog {
  width: min(980px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: auto;
  color: var(--ink);
  background: var(--surface);
  border: 0;
  border-radius: 22px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .34);
}
.roadview-dialog::backdrop { background: rgba(9, 18, 12, .72); backdrop-filter: blur(3px); }
.roadview-shell { padding: 24px; }
.roadview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.roadview-head h3 { margin: 2px 0 0; font-size: clamp(1.35rem, 3vw, 2rem); line-height: 1.25; }
.roadview-close-button {
  flex: 0 0 auto;
  padding: 9px 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 850;
  cursor: pointer;
}
.roadview-status { margin: 0 0 10px; padding: 10px 12px; color: var(--ink-soft); background: #f1ede3; border-radius: 10px; font-size: .83rem; font-weight: 800; }
.roadview-status.is-complete { color: #225f38; background: #e8f3eb; }
.roadview-status.is-warning { color: #8a2d25; background: #f7d9d4; }
.roadview-canvas { position: relative; width: 100%; height: min(56vh, 540px); min-height: 360px; overflow: hidden; background: #101512; border: 1px solid var(--line); border-radius: 14px; }
.roadview-strip-viewer { position: relative; width: 100%; height: 100%; overflow: hidden; background: #101512; cursor: grab; touch-action: none; user-select: none; }
.roadview-strip-viewer.is-dragging { cursor: grabbing; }
.roadview-strip-track { position: absolute; top: 0; left: 0; display: flex; height: 100%; will-change: transform; }
.roadview-strip-track.is-animated { transition: transform .34s ease; }
.roadview-strip-face { display: grid; flex: 0 0 var(--roadview-face-size, 540px); width: var(--roadview-face-size, 540px); height: var(--roadview-face-size, 540px); grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); overflow: hidden; background: #1c251f; }
.roadview-strip-face img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; pointer-events: none; }
.roadview-strip-credit,
.roadview-strip-hint { position: absolute; z-index: 3; padding: 7px 10px; color: #fff; background: rgba(8, 15, 11, .78); border-radius: 8px; font-size: .75rem; font-weight: 850; line-height: 1.2; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
.roadview-strip-credit { right: 10px; bottom: 10px; }
.roadview-strip-hint { left: 50%; bottom: 10px; transform: translateX(-50%); white-space: nowrap; }
.roadview-strip-arrow { position: absolute; top: 50%; z-index: 4; width: 46px; height: 58px; padding: 0; color: #fff; background: rgba(8, 15, 11, .76); border: 1px solid rgba(255, 255, 255, .72); border-radius: 10px; transform: translateY(-50%); font-size: 2.1rem; font-weight: 700; line-height: 1; cursor: pointer; }
.roadview-strip-arrow:hover,
.roadview-strip-arrow:focus-visible { background: rgba(18, 72, 43, .94); outline: 3px solid rgba(255, 255, 255, .66); outline-offset: 2px; }
.roadview-strip-arrow.is-left { left: 10px; }
.roadview-strip-arrow.is-right { right: 10px; }
.roadview-details { display: grid; grid-template-columns: 1.05fr 1.65fr .8fr .8fr; gap: 8px; margin: 12px 0 0; }
.roadview-details div { min-width: 0; padding: 10px 12px; background: #f1ede3; border-radius: 10px; }
.roadview-details dt { color: var(--ink-soft); font-size: .7rem; font-weight: 900; letter-spacing: .05em; }
.roadview-details dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: .84rem; font-weight: 800; line-height: 1.4; }

.assignment-updated { margin: 2px 0 0; color: var(--ink-soft); font-size: .78rem; text-align: right; }

.banner-map-marker {
  display: grid;
  place-items: center;
  min-width: 42px;
  min-height: 42px;
  padding: 4px;
  color: #fff;
  background: #ca7e00;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .32);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.banner-map-marker.stage-back { background: #635095; }
.banner-map-marker.type-village { background: #2d6f8f; }
.banner-map-marker.type-intersection { background: #c66a12; }
.banner-map-marker.is-multiple { min-width: 48px; min-height: 48px; box-shadow: 0 0 0 4px rgba(242, 183, 47, .35), 0 3px 12px rgba(0, 0, 0, .32); }
.banner-map-marker.is-selected { color: var(--hero); background: var(--accent); border-color: var(--hero); transform: scale(1.12); }

.map-info-window { max-width: 270px; padding: 12px; color: var(--ink); font-family: inherit; }
.map-info-window strong { display: block; margin-bottom: 3px; }
.map-info-window span { display: block; color: var(--ink-soft); font-size: 12px; line-height: 1.4; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}

.section-head h2,
.checklist-section h2 { font-size: clamp(1.65rem, 3vw, 2.45rem); }
.section-head p { max-width: 760px; margin: 8px 0 0; }

.cluster-list { display: grid; gap: 28px; }
.stage-block { display: grid; gap: 14px; }

.stage-block > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
}

.stage-block h3 { margin: 0; font-size: 1.25rem; }
.stage-block > header span { font-weight: 900; }
.cluster-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

.cluster-card {
  --cluster-accent: #b87700;
  padding: 20px;
  background: #fbfaf5;
  border: 1px solid var(--line);
  border-top: 6px solid var(--cluster-accent);
  border-radius: 18px;
}

.accent-amber { --cluster-accent: #bf7b00; }
.accent-orange { --cluster-accent: #b64a16; }
.accent-green { --cluster-accent: #37784c; }
.accent-blue { --cluster-accent: #316fa6; }
.accent-purple { --cluster-accent: #7350a1; }
.accent-red { --cluster-accent: #aa3f3b; }
.accent-teal { --cluster-accent: #267c78; }
.accent-navy { --cluster-accent: #344c70; }

.cluster-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.cluster-id {
  display: inline-flex;
  margin-bottom: 6px;
  padding: 2px 8px;
  color: #fff;
  background: var(--cluster-accent);
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 900;
}

.cluster-card h4 { margin: 0; font-size: 1.12rem; }
.cluster-card-head p { margin: 3px 0 0; color: var(--ink-soft); font-size: .86rem; }
.cluster-card-head > strong { color: var(--cluster-accent); font-size: 1.6rem; white-space: nowrap; }
.route-label { margin: 18px 0 8px; color: var(--ink-soft); font-size: .76rem; font-weight: 900; letter-spacing: .08em; }

.route-flow {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.route-node {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 30px;
  padding: 4px 8px;
  background: #fff;
  border: 1px solid #cfc8bb;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 850;
  white-space: nowrap;
}

.route-node b { color: var(--cluster-accent); }
.route-base { color: #fff; background: var(--hero); border-color: var(--hero); }
.route-arrow { color: var(--cluster-accent); font-weight: 900; }
.pickup-line { margin: 14px 0 0; color: var(--ink-soft); font-size: .8rem; overflow-wrap: anywhere; }

.points-head { align-items: center; }
.points-guide { margin: 5px 0 0; color: var(--ink-soft); font-size: .82rem; }
.stage-filters { display: flex; gap: 7px; flex-wrap: wrap; }
.stage-filter { padding: 8px 13px; color: var(--ink); background: transparent; border-color: var(--line); }
.stage-filter.is-active { color: #fff; background: var(--hero); border-color: var(--hero); }

.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; }

table {
  width: 100%;
  min-width: 1460px;
  border-collapse: collapse;
  font-size: .9rem;
}

th, td {
  padding: 13px 12px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}

thead th { color: var(--ink-soft); background: #eee9de; font-size: .78rem; letter-spacing: .04em; }
.sortable-header { padding: 0; }
.table-sort-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  width: 100%;
  padding: 13px 12px;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: inherit;
  font-weight: 900;
  letter-spacing: inherit;
  white-space: nowrap;
}
.count-column .table-sort-button { justify-content: center; }
.table-sort-button:hover { color: var(--ink); background: #e3dccd; }
.table-sort-button:focus-visible { position: relative; z-index: 1; outline: 3px solid var(--accent); outline-offset: -3px; }
.table-sort-button.is-active { color: var(--hero); background: #fff0bd; }
.sort-indicator { min-width: 1em; color: var(--accent-strong); font-size: .72rem; text-align: center; }
tbody tr:hover { background: #f7f2e7; }
tbody tr { cursor: pointer; }
tbody tr.is-selected { background: #fff0bd; }
tbody tr:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
tfoot th, tfoot td { background: #eee9de; border-bottom: 0; font-weight: 900; }
.km-cell { font-variant-numeric: tabular-nums; font-weight: 900; white-space: nowrap; }
.km-cell small { display: block; margin-top: 2px; color: var(--ink-soft); font-size: .67rem; font-weight: 750; }
.count-column { text-align: center; white-space: nowrap; }
.note-cell { color: var(--ink-soft); }
.content-cell { min-width: 250px; color: var(--ink); font-weight: 800; line-height: 1.45; }
.time-cell { min-width: 135px; color: var(--ink); font-weight: 900; white-space: nowrap; }
.address-cell { min-width: 220px; }
.address-cell strong, .address-cell small { display: block; }
.address-cell strong { font-size: .86rem; line-height: 1.4; }
.address-cell small { margin-top: 3px; color: var(--ink-soft); line-height: 1.35; }
.cluster-badge,
.type-badge {
  display: inline-flex;
  padding: 3px 8px;
  background: #e8e4da;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 850;
  white-space: nowrap;
}

.cluster-badge { color: #fff; background: #35463a; }
.type-badge.type-village { color: #18506d; background: #dcecf5; }
.type-badge.type-intersection { color: #8a4600; background: #ffe2c2; }

.checklist-section {
  display: grid;
  grid-template-columns: minmax(250px, .65fr) minmax(0, 1.35fr);
  gap: 28px;
}

.checklist-section ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.checklist-section li { display: flex; align-items: flex-start; gap: 10px; }
.check-box { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 2px; background: #fff; border: 2px solid #8f968f; border-radius: 5px; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0 48px;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  font-size: .86rem;
}

[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .loading-dot { animation: none; }
}

@media (max-width: 980px) {
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rules-panel, .checklist-section { grid-template-columns: 1fr; }
  .banner-map-layout { grid-template-columns: 1fr; }
  #bannerMap { min-height: 520px; }
  .point-editor { border-top: 1px solid var(--line); border-left: 0; }
  .point-empty { min-height: 180px; }
  .banner-map-layout.is-map-focus {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(190px, 36dvh);
  }
  .banner-map-layout.is-map-focus #bannerMap { min-height: 0; }
  .banner-map-layout.is-map-focus .point-editor {
    max-height: 36dvh;
    padding-top: 22px;
  }
}

@media (max-width: 760px) {
  .header-inner { align-items: flex-start; flex-direction: column; gap: 24px; min-height: 0; }
  .brand { padding: 0 0 22px; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .22); }
  .plan-toolbar, .section-head { align-items: flex-start; flex-direction: column; }
  .cluster-grid { grid-template-columns: 1fr; }
  .toolbar-actions { width: 100%; }
  .map-actions { justify-content: flex-start; }
  .collaboration-note { align-items: flex-start; flex-direction: column; gap: 4px; }
  .roadview-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .header-inner, main, footer { width: min(100% - 26px, 1280px); }
  main { padding-top: 28px; }
  .login-row { grid-template-columns: 1fr; }
  .login-row button { width: 100%; }
  .summary-grid { gap: 9px; }
  .summary-card { min-height: 132px; padding: 17px; border-radius: 16px; }
  .route-section, .points-section, .checklist-section, .rules-panel { padding: 20px; border-radius: 18px; }
  .cluster-card { padding: 16px; }
  #bannerMap { min-height: 430px; }
  .point-editor { padding: 18px; }
  .banner-map-layout.is-map-focus #bannerMap { min-height: 0; }
  .banner-map-layout.is-map-focus .point-editor { padding: 18px; }
  .map-focus-close-button {
    top: 56px;
    right: 8px;
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 9px;
    font-size: .8rem;
  }
  .roadview-dialog { width: calc(100% - 12px); max-height: calc(100vh - 12px); border-radius: 16px; }
  .banner-map-mode-control { margin: 7px 7px 0 0; }
  .banner-map-mode-control button { min-width: 47px; min-height: 34px; padding: 6px 8px; font-size: 12px; }
  .banner-map-mode-control .banner-map-roadview-control { min-width: 58px; }
  .roadview-shell { padding: 14px; }
  .roadview-head { gap: 10px; }
  .roadview-canvas { height: 52vh; min-height: 330px; }
  .roadview-strip-hint { bottom: 50px; font-size: .68rem; }
  .roadview-strip-credit { right: 7px; bottom: 7px; font-size: .68rem; }
  .roadview-strip-arrow { width: 40px; height: 52px; }
  .roadview-details { grid-template-columns: 1fr; }
  .toolbar-actions button { flex: 1 1 auto; }
  footer { flex-direction: column; }
}

@media print {
  @page { size: A4 landscape; margin: 12mm; }
  body { background: #fff; font-size: 9pt; }
  .site-header { color: #000; background: #fff; border-bottom: 2px solid #000; }
  .header-inner { min-height: 0; padding: 10px 0; }
  .brand { color: #000; border-color: #aaa; }
  .brand-mark, .header-copy .eyebrow { color: #000; }
  .header-copy p { color: #333; }
  main { width: 100%; padding: 12px 0; }
  .toolbar-actions, .stage-filters, .point-actions, .roadview-dialog, .map-focus-close-button, footer { display: none !important; }
  body.map-focus-open { overflow: visible; }
  .plan-view { gap: 16px; }
  .summary-card, .rules-panel, .map-section, .route-section, .points-section, .checklist-section, .cluster-card {
    box-shadow: none;
    break-inside: avoid;
  }
  .summary-card { min-height: 90px; padding: 12px; }
  .summary-card strong { font-size: 24pt; }
  .summary-primary { color: #000; background: #fff; border-color: #000; }
  .summary-primary strong, .summary-primary span, .summary-primary small { color: #000; }
  .cluster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .banner-map-layout, .banner-map-layout.is-map-focus { position: static; width: auto; height: auto; grid-template-columns: minmax(0, 1fr) 300px; min-height: 500px; box-shadow: none; }
  #bannerMap { min-height: 500px; }
  .point-editor { padding: 12px; }
  .table-wrap { overflow: visible; }
  table { min-width: 0; font-size: 7.5pt; }
  th, td { padding: 5px; }
  .table-sort-button { padding: 5px; color: #000; }
  .sort-indicator { display: none; }
}
