.direction-map-page .site-main{overflow:visible}
.map-page-hero{margin-bottom:24px;background:radial-gradient(circle at 86% 18%,rgba(176,156,198,.18),transparent 26%),radial-gradient(circle at 84% 74%,rgba(226,215,197,.7),transparent 20%),linear-gradient(135deg,#fffaf8,#fffdfb 54%,#f2ebe6)}
.map-page-hero .hero-caption{min-width:132px}.map-hero-points{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}.map-hero-points span{padding:7px 12px;border:1px solid #ddd0d8;border-radius:999px;background:rgba(255,255,255,.8);color:#6f5566;font-size:12px;font-weight:800;box-shadow:0 7px 16px rgba(95,57,78,.05)}
.direction-map-shell{
  width:min(1180px,calc(100% - 36px));
  margin:0 auto 44px;
  display:grid;
  grid-template-columns:minmax(300px,380px) minmax(0,1fr);
  gap:20px;
  align-items:start;
}
.map-control-panel,.map-stage-panel,.map-result-panel{
  background:rgba(255,253,251,.97);
  border:1px solid var(--line,#eadde4);
  border-radius:20px;
  box-shadow:var(--shadow-small,0 8px 24px rgba(70,45,60,.08));
}
.map-control-panel{grid-row:1 / span 2;padding:24px;position:sticky;top:98px}
.map-stage-panel{padding:18px}
.map-result-panel{grid-column:2;padding:22px 24px}
.map-control-heading,.map-stage-head,.map-result-title{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.map-control-heading span,.map-stage-head span,.map-result-title>span{display:block;color:#a47e92;font-size:10px;font-weight:850;letter-spacing:.18em}
.map-control-heading h2,.map-stage-head h2,.map-result-title h2{margin:4px 0 0;color:#4f3b48;font-family:var(--serif);font-size:24px;letter-spacing:.04em}
.map-status{max-width:180px;margin:0;padding:8px 10px;border-radius:9px;background:#f8eff4;color:#725867;font-size:11px;line-height:1.55}
.map-status.is-error{background:#fff0ee;color:#9a443e}
.map-search-form{margin-top:20px;padding-top:18px;border-top:1px solid #efe4e9}
.map-search-form>label{display:block;margin-bottom:7px;color:#5f4a57;font-size:12px;font-weight:800}
.map-search-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
.map-search-row input{width:100%;min-width:0}
.map-button{display:inline-flex;align-items:center;justify-content:center;min-height:43px;padding:0 15px;border:1px solid transparent;border-radius:10px;font-size:12px;font-weight:850;cursor:pointer;transition:.18s}
.map-button:disabled{opacity:.55;cursor:wait}
.map-button-primary{background:var(--accent,#704660);color:#fff;box-shadow:0 7px 16px rgba(111,66,94,.16)}
.map-button-primary:hover{background:var(--accent2,#5c364d)}
.map-button-secondary{background:#fff;color:#6e4d61;border-color:#ddcbd4}
.map-button-secondary:hover,.map-button-secondary.is-active{background:#f5e8ef;border-color:#b98da5;color:#5e3c51}
.map-form-note{margin:7px 0 0;color:#8a7882;font-size:10px;line-height:1.55}.map-address-help{max-width:760px;font-size:11px;line-height:1.7}
.map-search-results{margin-top:9px;border:1px solid #e7d9e1;border-radius:10px;background:#fff;overflow:hidden}
.map-search-results ul{list-style:none;margin:0;padding:0}
.map-search-results li+li{border-top:1px solid #eee5ea}
.map-search-results button{display:block;width:100%;padding:11px 12px;border:0;border-radius:0;background:#fff;color:#584750;text-align:left;font-size:11px;line-height:1.55;cursor:pointer}
.map-search-results button:hover{background:#fff6f9}
.map-search-results p{margin:0;padding:12px;color:#7a6871;font-size:11px}
.map-point-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:16px}
.map-point-actions .map-button:first-child{grid-column:1/-1}
.map-coordinate-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:18px}
.map-coordinate-grid fieldset{margin:0;padding:12px;border:1px solid #eadde4;border-radius:12px;background:#fffafc}
.map-coordinate-grid legend{padding:0 5px;color:#6b4e5f;font-size:11px;font-weight:850}
.map-coordinate-grid label{display:block;margin-top:7px;color:#7a6672;font-size:10px}
.map-coordinate-grid input{width:100%;margin-top:4px;padding:9px 8px;font-size:11px}
.map-text-button{padding:0;border:0;background:transparent;color:#835c74;font-size:11px;font-weight:850;text-decoration:underline;text-decoration-color:#d6b7c7;text-underline-offset:3px;cursor:pointer}
.map-text-button:hover{color:#5e3b50}
.map-coordinate-grid .map-text-button{margin-top:9px}
.map-options-grid{display:grid;gap:10px;margin-top:18px}
.map-check-option,.map-range-option{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px;border:1px solid #e7d9e1;border-radius:12px;background:#fff}
.map-check-option{justify-content:flex-start;cursor:pointer}
.map-check-option input{width:19px;height:19px;flex:none;accent-color:var(--accent,#704660)}
.map-check-option span,.map-range-option>span{display:grid;gap:2px}
.map-check-option strong,.map-range-option strong{color:#5a4351;font-size:12px}
.map-check-option small,.map-range-option small{color:#8b7682;font-size:9px;line-height:1.45}
.map-range-option select{width:105px;padding:9px 8px;font-size:11px}
.map-direction-selector{margin:18px 0 0;padding:14px;border:1px solid #eadde4;border-radius:13px}
.map-direction-selector legend{padding:0 6px;color:#5d4252;font-size:12px;font-weight:850}
.map-direction-selector>p{margin:2px 0 11px;color:#826f79;font-size:10px;line-height:1.55}
.map-direction-buttons{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}
.map-direction-buttons label{cursor:pointer}
.map-direction-buttons input{position:absolute;opacity:0;pointer-events:none}
.map-direction-buttons span{display:flex;align-items:center;justify-content:center;min-height:36px;border:1px solid #e2d2da;border-radius:9px;background:#fff;color:#725a68;font-size:11px;font-weight:800;transition:.16s}
.map-direction-buttons input:checked+span{border-color:#8f667d;background:#79556b;color:#fff;box-shadow:0 5px 12px rgba(111,66,94,.16)}
.map-direction-buttons input:focus-visible+span{outline:3px solid rgba(143,93,125,.25);outline-offset:2px}
.map-direction-actions{display:flex;gap:14px;margin-top:10px}
.map-stage-head{align-items:center;margin:0 4px 13px}
.map-north-badge{padding:7px 10px;border:1px solid #decbd5;border-radius:999px;background:#fff8fb;color:#704f62;font-size:10px;font-weight:850}
.direction-map{height:660px;overflow:hidden;border:1px solid #dccdd5;border-radius:15px;background:#eee8e4}
.direction-map.map-load-error{display:grid;place-items:center;padding:30px;color:#825a61;text-align:center}
.map-click-help{display:flex;align-items:center;gap:7px;margin:11px 3px 0;color:#7f6c76;font-size:10px}
.map-click-help span{color:#704660}
.direction-point-marker{width:25px;height:25px;border:4px solid #fff;border-radius:50%;box-shadow:0 4px 13px rgba(45,30,39,.34);cursor:grab}
.direction-point-marker:active{cursor:grabbing}
.direction-point-marker-origin{background:#704660}
.direction-point-marker-destination{background:#c79b4b}
.direction-map-label{display:flex;align-items:center;justify-content:center;min-width:34px;height:28px;padding:0 8px;border:1px solid rgba(111,66,94,.35);border-radius:999px;background:rgba(255,253,251,.91);color:#624457;font-size:11px;font-weight:900;box-shadow:0 3px 10px rgba(64,43,55,.11);pointer-events:none}
.direction-map-label.is-selected{border-color:#704660;background:#704660;color:#fff}
.maplibregl-ctrl-group button{border-radius:0;box-shadow:none}
.maplibregl-ctrl-group button:first-child{border-radius:4px 4px 0 0}
.maplibregl-ctrl-group button:last-child{border-radius:0 0 4px 4px}
.maplibregl-ctrl-attrib{font-size:10px}
.destination-result{margin-top:15px;padding:17px;border:1px solid #eadde4;border-radius:14px;background:#fffafc}
.destination-result.is-empty{color:#806e77;font-size:12px}
.destination-result.is-empty p{margin:0}
.destination-main-result{display:flex;align-items:baseline;gap:12px}
.destination-main-result strong{color:#5a3e50;font-family:var(--serif);font-size:30px}
.destination-main-result span{color:#98788b;font-size:12px;font-weight:800}
.destination-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:14px 0 0}
.destination-metrics div{padding:10px 12px;border-radius:10px;background:#fff;border:1px solid #eee3e8}
.destination-metrics dt{color:#937d88;font-size:9px;font-weight:800}
.destination-metrics dd{margin:4px 0 0;color:#58454f;font-size:12px;font-weight:800}
.destination-judgement{margin:12px 0 0;padding:10px 12px;border-left:3px solid #b08a51;background:#fff8e9;color:#69583c;font-size:11px;line-height:1.65}
.destination-result.is-selected-direction .destination-judgement{border-left-color:#6d8971;background:#eff8f0;color:#46614b}
.destination-result.is-boundary .destination-judgement{border-left-color:#b75e58;background:#fff1ef;color:#83423e}
.map-explanation{margin-bottom:48px}
.map-explanation .article-body{max-width:none}
.map-explanation .article-note{margin:22px 0;padding:17px 19px;border:1px solid #ead4a8;border-left:4px solid #b78c4c;border-radius:10px;background:#fff9ec;color:#68593d;line-height:1.8}

@media(max-width:1020px){
  .direction-map-shell{grid-template-columns:1fr}
  .map-control-panel{grid-row:auto;position:static}
  .map-stage-panel,.map-result-panel{grid-column:1}
  .direction-map{height:620px}
}
@media(max-width:860px){.map-page-hero .hero-ornament{display:none}}
@media(max-width:680px){
  .direction-map-shell{width:min(100% - 24px,1180px);gap:14px}
  .map-control-panel,.map-stage-panel,.map-result-panel{border-radius:16px}
  .map-control-panel{padding:18px}
  .map-control-heading{display:block}
  .map-status{max-width:none;margin-top:10px}
  .map-coordinate-grid{grid-template-columns:1fr}
  .map-direction-buttons{grid-template-columns:repeat(4,1fr)}
  .direction-map{height:68vh;min-height:480px;max-height:650px;border-radius:12px}
  .destination-metrics{grid-template-columns:1fr}
  .destination-main-result{align-items:flex-start;flex-direction:column;gap:2px}
}
@media(max-width:420px){
  .map-search-row{grid-template-columns:1fr}
  .map-point-actions{grid-template-columns:1fr}
  .map-point-actions .map-button:first-child{grid-column:auto}
  .map-direction-buttons{grid-template-columns:repeat(2,1fr)}
  .direction-map{min-height:440px}
}
@media print{
  .map-control-panel,.map-click-help,.maplibregl-control-container{display:none!important}
  .direction-map-shell{display:block;width:100%}
  .direction-map{height:600px}
}
