/* ごろごろ避難ルート。縦：題→地図→説明／横・PC：題と説明を右、地図を左 */
.hn{flex:1;min-width:0;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:6px;grid-template-areas:"head" "map" "foot"}
.hn-head{grid-area:head;display:grid;grid-template-columns:auto minmax(0,1fr);gap:0 8px;align-items:baseline}
.hn-step{grid-row:1 / span 2;align-self:center;padding:3px 9px;border-radius:999px;background:var(--g);color:#fff;font:900 12px/1.3 var(--t-display)}
.hn-head h2{font:900 17px/1.25 var(--t-display);color:var(--g-ink)}
.hn-goal{font-size:12.500px;line-height:1.3;font-weight:700}
.hn-mapbox{grid-area:map;position:relative;min-height:0;min-width:0;display:flex;align-items:center;justify-content:center}
.hn-map{position:relative;display:grid;border-radius:12px;background:#FFFDF8;box-shadow:0 0 0 4px #fff,var(--t-shadow-s);touch-action:none;user-select:none;-webkit-user-select:none;overflow:hidden;cursor:crosshair}
.hn-c{width:var(--c);height:var(--c);display:grid;place-items:center;box-shadow:0 0 0 .5px rgba(90,80,60,.12) inset}
.hn-c svg{display:block;width:88%;height:88%}
.hn-c.tr{background:#FFFDF8}
.hn-c.tb{background:#ECE4D4}
.hn-c.tH{background:#FFE9CC}
.hn-c.tG{background:#FFF3C4;box-shadow:0 0 0 3px var(--t-yellow) inset}
.hn-c.tW,.hn-c.tV,.hn-c.tK,.hn-c.tU,.hn-c.tC,.hn-c.tD{background:#FBE4E0}
.hn-c.tR,.hn-c.tB{background:#7CCBE3}.hn-c.tL{background:#BDE7F3}.hn-c.tS{background:#4FA8CF}.hn-c.tY{background:#F4E2B4}
.hn-c.tR svg,.hn-c.tS svg,.hn-c.tB svg,.hn-c.tL svg,.hn-c.tY svg{width:100%;height:100%}
.hn-c.hit{animation:hnHit .3s ease-in-out}
@keyframes hnHit{25%{transform:translateX(-3px)}75%{transform:translateX(3px)}}
.hn-line{position:absolute;left:0;top:0;pointer-events:none}
.hn-ball{position:absolute;left:0;top:0;height:auto;pointer-events:none;transition:transform .12s ease-out;filter:drop-shadow(0 2px 2px rgba(0,0,0,.25))}
.hn-foot{grid-area:foot;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}
.hn-why{min-height:3em;padding:5px 10px;border-radius:12px;background:var(--t-card);font-size:12.500px;line-height:1.4;box-shadow:var(--t-shadow-s)}
.hn-why.bad{background:#FBE4E0;color:#8E2A1F;font-weight:700}
.hn-why.ok{background:var(--t-teal-3);color:var(--t-teal);font-weight:700}
.hn-reset{width:auto;min-height:44px;padding:0 12px;font-size:13px;white-space:nowrap}
@media (max-width:359px){.hn-head h2{font-size:15px}.hn-goal{font-size:11.500px}.hn-why{font-size:11.500px}.hn-reset{padding:0 8px;font-size:12px}}
@media (orientation:landscape) and (max-height:500px){
  .hn{grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);grid-template-areas:"map head" "map foot";gap:6px 12px}
  .hn-foot{grid-template-columns:minmax(0,1fr);align-content:end}
  .hn-reset{width:100%;min-height:40px}
}
@media (min-width:1024px) and (min-height:501px){
  .hn{width:min(100%,1160px);margin:0 auto;grid-template-columns:minmax(0,1fr) 340px;grid-template-rows:auto minmax(0,1fr);grid-template-areas:"map head" "map foot";gap:14px 28px}
  .hn-head{grid-template-columns:minmax(0,1fr);gap:8px}
  .hn-step{grid-row:auto;justify-self:start;font-size:15px}
  .hn-head h2{font-size:30px}.hn-goal{font-size:18px}
  .hn-foot{grid-template-columns:minmax(0,1fr);align-content:end}
  .hn-why{font-size:17px;padding:12px 14px}
  .hn-reset{width:100%;font-size:15px}
}
@media (prefers-reduced-motion:reduce){.hn-ball{transition:none}}
