:root{
  --bg:#0d1114; --panel:#161c20; --panel2:#1d2429; --panel3:#11171b; --line:#2a333a;
  --tx:#e8ebed; --tx2:#9aa7ae; --tx3:#66737a; --muted:#44515a;
  --amber:#f0a53a; --red:#e2564b; --green:#35c08e; --blue:#4d9fe0; --purple:#a98cff;
  --shadow:0 14px 45px rgba(0,0,0,.42);
}
*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{height:100%;overscroll-behavior:none}
body{
  background:var(--bg); color:var(--tx); font-family:"Zen Kaku Gothic New",system-ui,sans-serif;
  display:flex; flex-direction:column; overflow:hidden;
}
button,input{font:inherit}
button{cursor:pointer}
header{height:52px; padding:10px 14px 8px; display:flex; align-items:center; gap:10px; border-bottom:1px solid var(--line); flex:none; background:rgba(13,17,20,.96); z-index:30}
header h1{font-family:"Shippori Mincho",serif; font-size:18px; font-weight:600; letter-spacing:.06em; white-space:nowrap}
header .proto{font-size:11px; color:var(--tx3); letter-spacing:.06em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
header .spacer{flex:1}
.iconbtn{border:1px solid var(--line); background:var(--panel); color:var(--tx); border-radius:10px; padding:7px 10px; font-size:12px; font-weight:700}
.iconbtn.primary{background:var(--tx); color:var(--bg); border-color:var(--tx)}
.iconbtn.warn{background:#3d1a17;color:#f2a49d;border-color:#7a2f28}

/* home */
#home{flex:1; overflow:auto; padding:14px 14px 24px; background:radial-gradient(circle at 50% -10%, #1b2a32 0, #0d1114 35%, #0d1114 100%)}
.homeTitle{padding:4px 2px 12px}
.homeTitle .lead{font-size:13px; color:var(--tx2); line-height:1.75}
.homeTitle b{color:var(--tx); font-weight:900}
.statusgrid{display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:4px 0 14px}
.statuscard{background:rgba(22,28,32,.92); border:1px solid var(--line); border-radius:12px; padding:10px 8px; min-height:64px}
.statuscard .k{font-size:10px; color:var(--tx3); letter-spacing:.08em}
.statuscard .v{font-size:13px; font-weight:800; margin-top:4px; line-height:1.35}
.modeGrid{display:grid; gap:10px; margin-top:6px}
.modeCard{border:1px solid var(--line); background:linear-gradient(135deg,#171e23,#11171b); color:var(--tx); border-radius:16px; padding:16px 14px; text-align:left; box-shadow:0 2px 0 rgba(255,255,255,.02) inset; position:relative; overflow:hidden}
.modeCard::after{content:""; position:absolute; width:120px; height:120px; border-radius:50%; right:-52px; top:-56px; opacity:.18}
.modeCard.tsunami::after{background:var(--blue)}
.modeCard.flood::after{background:var(--green)}
.modeCard.dosha::after{background:var(--amber)}
.modeCard.volcano::after{background:var(--red)}
.modeCard.missile::after{background:var(--purple)}
.modeCard .label{display:flex; justify-content:space-between; gap:10px; align-items:center; margin-bottom:8px}
.modeCard .name{font-size:22px; font-weight:900; letter-spacing:.04em}
.modeCard .tag{font-size:10px; color:var(--tx3); border:1px solid var(--line); padding:2px 7px; border-radius:999px; white-space:nowrap}
.modeCard .verb{font-size:18px; font-weight:900; line-height:1.45}
.modeCard .sub{font-size:12.5px; color:var(--tx2); line-height:1.55; margin-top:4px}
.homeActions{display:grid; grid-template-columns:repeat(2,1fr); gap:8px; margin-top:14px}
.homeActions button{border:1px solid var(--line); background:var(--panel); color:var(--tx); border-radius:12px; padding:12px 8px; font-size:13px; font-weight:800}
.homeNote{font-size:11px;color:var(--tx3);line-height:1.75;margin:14px 2px 0}

/* app */
#app{flex:1; display:none; flex-direction:column; min-height:0}
#app.on{display:flex}
.verbBar{flex:none; text-align:center; padding:8px 12px 5px; border-bottom:1px solid rgba(42,51,58,.35)}
.verbBar .v{font-size:24px; font-weight:900; letter-spacing:.05em}
.verbBar .s{font-size:12px; color:var(--tx2); margin-top:3px; line-height:1.55}
.infoRow{flex:none; display:flex; align-items:center; gap:10px; margin:7px 12px 7px; padding:8px 12px; background:var(--panel); border:1px solid var(--line); border-radius:10px; font-size:12px; color:var(--tx2); min-height:38px; flex-wrap:wrap}
.infoRow b{color:var(--tx); font-size:15px; font-weight:900}
.infoRow .q{margin-left:auto; font-size:10.5px; color:var(--tx3)}
.risk{flex:none; margin:0 12px 8px; padding:9px 12px; border-radius:10px; font-size:12px; line-height:1.6; display:none}
.risk.warn{display:block; background:#3a2f14; color:#f5cf8a; border:1px solid #6b5420}
.risk.danger{display:block; background:#3d1a17; color:#f2a49d; border:1px solid #7a2f28}
.risk.safe{display:block; background:#15332a; color:#a1ebcc; border:1px solid #23614c}
.risk b{font-weight:900}
.mapWrap{position:relative; flex:1; display:flex; min-height:190px}
#map{flex:1; min-height:180px; background:#0a0d0f}
.leaflet-container{font-family:inherit}
.leaflet-tile-pane{filter:brightness(.88) contrast(1.05)}
.legend{position:absolute; z-index:800; left:10px; bottom:10px; background:rgba(13,17,20,.88); border:1px solid var(--line); border-radius:10px; padding:7px 10px; font-size:10.5px; color:var(--tx2); line-height:1.7; backdrop-filter:blur(3px)}
.legend b{color:var(--tx); font-weight:700}
.sw{display:inline-block; width:11px; height:11px; border-radius:2px; vertical-align:-1px; margin-right:5px}
.locbtn{position:absolute; z-index:800; right:10px; bottom:10px; background:var(--tx); color:var(--bg); border:none; font-size:13px; font-weight:900; padding:11px 16px; border-radius:24px; box-shadow:0 2px 10px rgba(0,0,0,.5)}
.routest{position:absolute; z-index:800; left:50%; transform:translateX(-50%); top:10px; background:rgba(13,17,20,.92); border:1px solid var(--line); border-radius:20px; padding:7px 16px; font-size:12px; color:var(--tx2); display:none; white-space:nowrap}
.sheet{flex:none; background:var(--panel); border-top:1px solid var(--line); padding:9px 14px 12px; max-height:43vh; overflow-y:auto}
.st{font-size:11px; color:var(--tx3); letter-spacing:.08em; margin:4px 0 7px; display:flex; justify-content:space-between; gap:12px}
.row{display:flex; align-items:center; gap:10px; padding:9px 0; border-bottom:1px solid var(--line); cursor:pointer}
.row:last-child{border-bottom:none}
.row .no{width:24px; height:24px; border-radius:50%; background:var(--green); color:#06231a; font-size:12px; font-weight:900; flex:none; display:flex; align-items:center; justify-content:center}
.row .nm{flex:1; min-width:0}
.row .nm p{font-size:13.5px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:flex; align-items:center; gap:6px}
.row .nm span{font-size:11px; color:var(--tx3); display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.rec{background:#173a2e; color:var(--green); font-size:10px; font-weight:900; padding:1px 7px; border-radius:5px; flex:none}
.wet{color:#ff8d83; font-weight:700}
.dry{color:var(--green); font-weight:700}
.row .d{text-align:right; flex:none}
.row .d p{font-size:14px; font-weight:900; color:var(--amber)}
.row .d span{font-size:10.5px; color:var(--tx3); display:block}
.warnText{color:#f2a49d;font-weight:700}
.note{font-size:10.8px; color:var(--tx3); line-height:1.75; padding-top:8px}
.note.strong{color:#c8d1d6;background:var(--panel3);border:1px solid var(--line);border-radius:10px;padding:9px 10px;margin:7px 0}
.pulse{width:16px; height:16px; border-radius:50%; background:var(--blue); border:2.5px solid #fff; box-shadow:0 0 0 rgba(77,159,224,.5); animation:pl 2s infinite}
@keyframes pl{0%{box-shadow:0 0 0 0 rgba(77,159,224,.5)}70%{box-shadow:0 0 0 16px rgba(77,159,224,0)}100%{box-shadow:0 0 0 0 rgba(77,159,224,0)}}
@media (prefers-reduced-motion: reduce){.pulse{animation:none}}
.shpin{width:15px; height:15px; border-radius:50%; background:var(--green); border:2px solid #04160f}
.shpin.top{outline:3px solid rgba(53,192,142,.4)}
.leaflet-popup-content-wrapper{background:var(--panel2); color:var(--tx); border-radius:8px}
.leaflet-popup-tip{background:var(--panel2)}
.leaflet-popup-content{font-size:12.5px; line-height:1.6; margin:10px 14px}

/* cards */
details{border-top:1px solid var(--line); margin-top:8px; padding-top:7px}
summary{font-size:12.5px; font-weight:800; color:var(--tx2); cursor:pointer; padding:5px 0; list-style:none; display:flex; align-items:center; gap:6px}
summary::before{content:"▸"; font-size:10px; transition:transform .15s}
details[open] summary::before{transform:rotate(90deg)}
.cardList{display:grid; gap:7px; padding:4px 0}
.actionItem{display:flex; gap:9px; align-items:flex-start; padding:8px 0; border-bottom:1px solid var(--line); font-size:13px; line-height:1.5}
.actionItem:last-child{border-bottom:none}
.actionItem input{width:18px;height:18px;accent-color:var(--green);margin-top:1px;flex:none}
.kitwarn{font-size:11.5px; color:#ff8d83; padding:5px 0 2px; font-weight:800}
.kit label{display:flex; align-items:center; gap:9px; padding:7px 0; border-bottom:1px solid var(--line); font-size:13px; cursor:pointer}
.kit label:last-child{border-bottom:none}
.kit input{width:17px; height:17px; accent-color:var(--green)}
.pri{background:#173a2e; color:var(--green); font-size:10px; font-weight:900; padding:2px 7px; border-radius:5px; white-space:nowrap}

/* safety contact */
.safetyPanel{border:1px solid var(--line); background:linear-gradient(135deg,#141b20,#111518); border-radius:12px; padding:10px; margin-top:8px}
.safetyHead{display:flex; justify-content:space-between; gap:10px; align-items:center; margin-bottom:8px}
.safetyHead b{font-size:13px}
.lastState{font-size:10.5px;color:var(--tx3);line-height:1.45}
.stateGrid{display:grid; grid-template-columns:repeat(2,1fr); gap:7px}
.stateGrid button{border:1px solid var(--line); background:var(--panel2); color:var(--tx); border-radius:10px; padding:10px 6px; font-size:12px; font-weight:900; min-height:43px}
.stateGrid button.hot{background:#40201b;color:#ffd0cb;border-color:#7a2f28}
.stateGrid button.rescue{background:#3d1a17;color:#f2a49d;border-color:#7a2f28; grid-column:span 2}
.sendBox{display:none; margin-top:9px; padding:9px; background:#0f1418; border:1px solid var(--line); border-radius:10px}
.sendBox.on{display:block}
.msgPreview{font-size:11.5px; color:#cbd3d7; line-height:1.55; white-space:pre-wrap; background:#0b0f12; padding:8px; border-radius:8px; border:1px solid #222b31; max-height:120px; overflow:auto}
.sendBtns{display:grid; grid-template-columns:repeat(3,1fr); gap:6px; margin-top:8px}
.sendBtns a,.sendBtns button{display:block;text-align:center;text-decoration:none;border:1px solid var(--line);background:var(--panel2);color:var(--tx);border-radius:9px;padding:9px 4px;font-size:12px;font-weight:900}
.sendBtns .disabled{opacity:.45;pointer-events:none}

/* modal */
.modal{position:fixed; inset:0; z-index:1000; display:none; background:rgba(0,0,0,.62); padding:16px; overflow:auto}
.modal.on{display:block}
.modalBox{max-width:760px; margin:0 auto; background:var(--panel); border:1px solid var(--line); border-radius:18px; box-shadow:var(--shadow); overflow:hidden}
.modalHead{display:flex; justify-content:space-between; gap:10px; align-items:center; padding:13px 14px; border-bottom:1px solid var(--line)}
.modalHead b{font-size:16px}
.modalBody{padding:14px; display:grid; gap:12px}
.field{display:grid; gap:6px}
.field label{font-size:11px; color:var(--tx3); letter-spacing:.06em; font-weight:800}
.field input,.field select{width:100%; background:#0d1114; color:var(--tx); border:1px solid var(--line); border-radius:10px; padding:10px 11px; font-size:14px}
.grid2{display:grid; grid-template-columns:1fr 1fr; gap:8px}
.listMini{display:grid; gap:7px}
.miniRow{display:flex; justify-content:space-between; align-items:center; gap:8px; background:var(--panel2); border:1px solid var(--line); border-radius:10px; padding:8px 9px; font-size:12px}
.miniRow span{min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.miniRow button{border:1px solid var(--line); background:#2a1514; color:#f2a49d; border-radius:8px; padding:5px 8px; font-size:11px; font-weight:900; flex:none}
.packGrid{display:grid; gap:8px}
.packBtn{border:1px solid var(--line); background:var(--panel2); color:var(--tx); border-radius:12px; padding:10px; text-align:left; font-size:12px; line-height:1.55}
.packBtn b{font-size:14px; display:block}
.packBtn.on{border-color:var(--green); outline:2px solid rgba(53,192,142,.25)}
.footerGap{height:env(safe-area-inset-bottom)}
@media (min-width:720px){
  #home{padding:22px;}
  .modeGrid{grid-template-columns:repeat(2,1fr)}
  .modeCard:first-child{grid-column:span 2}
  .stateGrid{grid-template-columns:repeat(5,1fr)}
  .stateGrid button.rescue{grid-column:auto}
}


/* v2.2 建物設定 */
.checkline{
  display:flex;
  gap:8px;
  align-items:center;
  color:var(--muted);
  font-size:13px;
  margin:8px 0;
}
.checkline input{width:16px;height:16px}


/* v2.2.1 建物設定保存フィードバック */
.savedOk{
  border-color:rgba(73,211,159,.55)!important;
  background:rgba(73,211,159,.10)!important;
}
.savedPulse{
  background:#49d39f!important;
  color:#062017!important;
}
#buildingSaveHint{
  margin-top:6px;
}


/* v2.3 現在地浸水深クラス */
.depthBadge{
  display:inline-block;
  padding:2px 7px;
  border-radius:999px;
  margin-right:6px;
  font-weight:800;
  font-size:12px;
  border:1px solid rgba(255,255,255,.18);
}
.depth0{background:rgba(73,211,159,.12); color:#b9f8df}
.depth1{background:rgba(247,245,169,.20); color:#fff6a8}
.depth2{background:rgba(255,216,192,.24); color:#ffd8c0}
.depth3{background:rgba(255,145,145,.22); color:#ffb2b2}
.depth4,.depth5{background:rgba(242,133,201,.24); color:#ffc2ed}


/* v2.4 現在地浸水深 強制表示パネル */
.depthPanel{
  margin:8px 12px;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.14);
  font-size:14px;
  line-height:1.55;
}
.depthPanel span{
  color:var(--muted);
  font-size:12px;
  margin-left:8px;
}
.depthPanelUnknown{background:rgba(148,163,184,.10); color:#d6e0ea;}
.depthPanelOut{background:rgba(73,211,159,.13); border-color:rgba(73,211,159,.45); color:#b9f8df;}
.depthPanelIn{background:rgba(245,158,11,.15); border-color:rgba(245,158,11,.55); color:#ffe0a3;}
.depthPanelClass3,.depthPanelClass4,.depthPanelClass5{
  background:rgba(239,68,68,.18);
  border-color:rgba(239,68,68,.60);
  color:#ffd0d0;
}


/* v2.5 緊急速報を受信したモード */
.emergencyHero{
  margin:14px 0 16px;
}
.emergencyBtn{
  width:100%;
  border:1px solid rgba(239,68,68,.55);
  background:linear-gradient(135deg, rgba(127,29,29,.90), rgba(245,158,11,.18));
  color:#fff;
  border-radius:16px;
  padding:18px 18px;
  text-align:left;
  cursor:pointer;
  box-shadow:0 0 0 1px rgba(255,255,255,.03), 0 12px 30px rgba(0,0,0,.26);
}
.emergencyBtn:hover{
  filter:brightness(1.08);
}
.emergencyMain{
  display:block;
  font-size:22px;
  font-weight:900;
  letter-spacing:.04em;
}
.emergencySub{
  display:block;
  margin-top:6px;
  color:#ffe0e0;
  font-size:13px;
  line-height:1.6;
}
.alertBox{
  max-width:780px;
}
.alertGrid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin:12px 0;
}
.alertCard{
  text-align:left;
  border:1px solid rgba(148,163,184,.25);
  background:rgba(17,24,39,.78);
  color:var(--tx);
  border-radius:12px;
  padding:13px;
  cursor:pointer;
}
.alertCard b{
  display:block;
  font-size:15px;
  margin-bottom:5px;
}
.alertCard span{
  display:block;
  color:var(--muted);
  font-size:12px;
  line-height:1.55;
}
.alertCard.danger{
  border-color:rgba(239,68,68,.55);
  background:rgba(127,29,29,.38);
}
.alertCard.warn{
  border-color:rgba(245,158,11,.50);
  background:rgba(120,53,15,.30);
}
.alertCard:hover{
  outline:2px solid rgba(73,211,159,.55);
}
.emergencyActive{
  margin:8px 0;
  padding:11px 13px;
  border-radius:12px;
  font-size:14px;
  line-height:1.55;
}
.emergencyActive b{
  font-size:15px;
}
.emergencyActive span{
  display:block;
  margin-top:4px;
  color:rgba(255,255,255,.76);
  font-size:12px;
}
.emergencyActive.danger{
  border:1px solid rgba(239,68,68,.65);
  background:rgba(127,29,29,.36);
  color:#ffd1d1;
}
.emergencyActive.warn{
  border:1px solid rgba(245,158,11,.60);
  background:rgba(120,53,15,.34);
  color:#ffe0a3;
}
@media (max-width:720px){
  .alertGrid{grid-template-columns:1fr}
  .emergencyMain{font-size:19px}
}


/* v2.5.2 緊急速報カード選択修正 */
.alertCard:active{
  transform:scale(.985);
  filter:brightness(1.15);
}
#app.on{
  display:block;
}


/* v2.6 テスト地点・公式導線・文言整理 */
.presetPanel{
  margin:10px 0 12px;
  padding:11px;
  border:1px solid rgba(148,163,184,.18);
  background:rgba(15,23,42,.34);
  border-radius:12px;
}
.presetHead{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:baseline;
  margin-bottom:8px;
}
.presetHead b{font-size:14px}
.presetHead span{font-size:12px;color:var(--muted)}
.presetGrid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}
.presetBtn{
  border:1px solid rgba(148,163,184,.24);
  background:rgba(17,24,39,.76);
  color:var(--tx);
  border-radius:10px;
  padding:9px 10px;
  text-align:left;
  cursor:pointer;
}
.presetBtn b{
  display:block;
  font-size:13px;
}
.presetBtn span{
  display:block;
  color:var(--muted);
  font-size:11px;
  line-height:1.45;
  margin-top:2px;
}
.presetBtn:hover{
  outline:2px solid rgba(73,211,159,.45);
}
.officialPriority{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin-bottom:10px;
}
.officialChip{
  text-decoration:none;
  color:var(--tx);
  border:1px solid rgba(73,211,159,.28);
  background:rgba(5,150,105,.10);
  border-radius:10px;
  padding:10px;
}
.officialChip b{
  display:block;
  font-size:13px;
}
.officialChip span{
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:11px;
  line-height:1.45;
}
@media (max-width:820px){
  .presetGrid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .officialPriority{grid-template-columns:1fr}
}
@media (max-width:520px){
  .presetGrid{grid-template-columns:1fr}
  .presetHead{display:block}
  .presetHead span{display:block;margin-top:4px}
}


/* v2.6.1 モーダル閉じる修正 */
.modalHead .iconbtn{
  position:relative;
  z-index:20;
  cursor:pointer;
  min-width:72px;
}
.modal.on{
  pointer-events:auto;
}
.modalBox{
  pointer-events:auto;
}


/* v2.7 火山・地震の避難先表示 */
.badge.soft{
  background:rgba(148,163,184,.20);
  color:#dbeafe;
  border:1px solid rgba(148,163,184,.35);
}


/* v2.7.1 modalfix */
.modal{
  display:none;
}
.modal.on{
  display:flex!important;
  pointer-events:auto;
}
.modalBox{
  pointer-events:auto;
}
.modalHead .iconbtn{
  position:relative;
  z-index:9999;
  cursor:pointer;
}


/* v2.9 clean UI */
.gpsPanelV274,.locationBarV276,.modeSwitchV28,.locSimpleV28,.mapCenterCrossV276{display:none!important;}
#map{width:100%!important;min-height:360px;height:42vh;max-height:540px;display:block!important;}
.cleanControlsV29{
  display:grid;grid-template-columns:auto auto auto auto 1fr;gap:8px;align-items:center;
  padding:8px 10px;background:rgba(15,23,42,.78);
  border-top:1px solid rgba(148,163,184,.18);border-bottom:1px solid rgba(148,163,184,.18);
}
.cleanControlsV29 button,.cleanControlsV29 select{
  border:1px solid rgba(148,163,184,.35);background:rgba(17,24,39,.86);color:var(--tx);
  border-radius:10px;min-height:40px;padding:8px 11px;font-weight:800;touch-action:manipulation;
}
.cleanControlsV29 button{cursor:pointer;}
.cleanControlsV29 #centerCurrentV29{border-color:rgba(73,211,159,.65);background:rgba(73,211,159,.16);}
.modeSelectWrapV29{display:flex;gap:6px;align-items:center;color:var(--muted);font-size:12px;white-space:nowrap;}
#locMsgV29{color:var(--muted);font-size:12px;line-height:1.45;}
@media (max-width:760px){
  #map{height:44vh!important;min-height:330px!important;max-height:none!important;}
  .cleanControlsV29{grid-template-columns:1fr;}
  .modeSelectWrapV29{display:grid;grid-template-columns:auto 1fr;}
  .cleanControlsV29 button,.cleanControlsV29 select{width:100%;min-height:44px;font-size:14px;}
  #locMsgV29{text-align:center;}
}


/* v2.9.1 mapfix: 操作欄をmapWrap外へ出し、地図を全幅に戻す */
#app.on{
  display:flex!important;
}
.mapWrap{
  position:relative!important;
  display:flex!important;
  flex:none!important;
  width:100%!important;
  min-height:360px!important;
  height:42vh!important;
  max-height:540px!important;
}
.mapWrap > #map{
  flex:1 1 auto!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  max-height:none!important;
}
.cleanControlsV29{
  width:100%!important;
  box-sizing:border-box!important;
  flex:none!important;
}
@media (max-width:760px){
  .mapWrap{
    height:44vh!important;
    min-height:330px!important;
    max-height:none!important;
  }
}


/* v2.9.2 scrollfix: スマホ縦スクロール復旧・不要ステータス非表示 */
html,
body{
  height:auto!important;
  min-height:100%!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior-y:auto!important;
}
body{
  position:static!important;
}
#app,
#app.on{
  height:auto!important;
  min-height:100dvh!important;
  max-height:none!important;
  overflow:visible!important;
}
main,
.screen,
.app,
.content{
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
}
.sheet{
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
  padding-bottom:calc(24px + env(safe-area-inset-bottom))!important;
}
#list{
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
}
.st{
  align-items:flex-start!important;
}
#status{
  display:none!important;
  max-width:0!important;
  overflow:hidden!important;
  white-space:nowrap!important;
}
#listTitle{
  display:block!important;
  width:100%!important;
}
.cleanControlsV29{
  overflow:visible!important;
}
@media (max-width:760px){
  body{
    -webkit-overflow-scrolling:touch!important;
  }
  .mapWrap{
    height:42vh!important;
    min-height:300px!important;
  }
  #map{
    height:100%!important;
    min-height:0!important;
  }
  .sheet{
    padding-bottom:90px!important;
  }
  .st{
    display:block!important;
  }
  #status{
    display:none!important;
  }
}


/* v2.9.3 status UI: 選択状態とGPS状態を明確化 */
.currentStateV293{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  padding:8px 10px 0;
  background:rgba(15,23,42,.78);
}
.statePillV293{
  border:1px solid rgba(148,163,184,.28);
  background:rgba(17,24,39,.78);
  color:var(--tx);
  border-radius:12px;
  padding:10px 12px;
  font-weight:900;
  line-height:1.35;
}
.statePillV293.mode.active{
  border-color:rgba(73,211,159,.70);
  background:rgba(73,211,159,.15);
  color:#d1fae5;
}
.statePillV293.loc.info{
  border-color:rgba(148,163,184,.35);
}
.statePillV293.loc.ok{
  border-color:rgba(73,211,159,.70);
  background:rgba(73,211,159,.15);
  color:#d1fae5;
}
.statePillV293.loc.loading{
  border-color:rgba(96,165,250,.75);
  background:rgba(37,99,235,.18);
  color:#dbeafe;
}
.statePillV293.loc.warn{
  border-color:rgba(245,158,11,.70);
  background:rgba(245,158,11,.15);
  color:#ffedd5;
}
.statePillV293.loc.danger{
  border-color:rgba(239,68,68,.75);
  background:rgba(127,29,29,.35);
  color:#fee2e2;
}
#locMsgV29,
.locMsgV293{
  display:block;
  border-radius:12px;
  padding:10px 12px;
  font-weight:800;
  line-height:1.45;
}
.locMsgV293.info{
  color:#dbeafe;
  background:rgba(37,99,235,.10);
  border:1px solid rgba(96,165,250,.35);
}
.locMsgV293.ok{
  color:#d1fae5;
  background:rgba(73,211,159,.12);
  border:1px solid rgba(73,211,159,.55);
}
.locMsgV293.loading{
  color:#dbeafe;
  background:rgba(37,99,235,.18);
  border:1px solid rgba(96,165,250,.70);
}
.locMsgV293.loading::before{
  content:"● ";
  animation:pulseV293 1s infinite alternate;
}
.locMsgV293.warn{
  color:#ffedd5;
  background:rgba(245,158,11,.14);
  border:1px solid rgba(245,158,11,.58);
}
.locMsgV293.danger{
  color:#fee2e2;
  background:rgba(127,29,29,.36);
  border:1px solid rgba(239,68,68,.65);
}
#gpsTryV29:disabled{
  opacity:.75;
  cursor:wait;
}
@keyframes pulseV293{
  from{opacity:.35}
  to{opacity:1}
}
.cleanControlsV29 select{
  border-color:rgba(73,211,159,.55)!important;
}
@media (max-width:760px){
  .currentStateV293{
    grid-template-columns:1fr;
    padding:8px 10px 0;
  }
  .statePillV293{
    font-size:14px;
  }
  #locMsgV29,.locMsgV293{
    font-size:14px;
    text-align:left!important;
  }
}


/* v2.9.4 home install */
.installCardV294{
  margin:12px 0;
  padding:14px 16px;
  border:1px solid rgba(73,211,159,.36);
  background:rgba(5,150,105,.10);
  border-radius:16px;
  box-shadow:0 10px 26px rgba(0,0,0,.18);
}
.installCardV294 b{
  display:block;
  color:#d1fae5;
  font-size:16px;
  margin-bottom:6px;
}
.installCardV294 p{
  margin:0;
  color:var(--muted);
  line-height:1.65;
  font-size:13px;
}
.installStepsV294{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
}
.installStepsV294 span{
  border:1px solid rgba(148,163,184,.26);
  background:rgba(17,24,39,.52);
  color:var(--tx);
  border-radius:999px;
  padding:7px 10px;
  font-size:12px;
  font-weight:800;
}
@media (max-width:760px){
  .installStepsV294{
    display:grid;
    grid-template-columns:1fr;
  }
  .installStepsV294 span{
    border-radius:10px;
  }
}

/* v2.10 青森県内地域パック */
.packGrid{grid-template-columns:repeat(auto-fit,minmax(190px,1fr));}
.packBtn b{font-size:15px;}
.packBtn.on{border-color:rgba(73,211,159,.75)!important;background:rgba(73,211,159,.14)!important;}


/* v2.11.3 region direct */
.regionSelectWrapV2113{
  display:flex;
  gap:6px;
  align-items:center;
  color:var(--muted);
  font-size:12px;
  white-space:nowrap;
}
.regionSelectWrapV2113 select{
  border:1px solid rgba(73,211,159,.55)!important;
  background:rgba(17,24,39,.86);
  color:var(--tx);
  border-radius:10px;
  min-height:40px;
  padding:8px 11px;
  font-weight:800;
}
.packBtn.on{
  border-color:rgba(73,211,159,.80)!important;
  background:rgba(73,211,159,.16)!important;
}
@media (max-width:760px){
  .regionSelectWrapV2113{
    display:grid;
    grid-template-columns:auto 1fr;
  }
  .regionSelectWrapV2113 select{
    width:100%;
    min-height:44px;
  }
}



/* v2.12.1 safe face UI */
.homeFacesV2121{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin:14px 0 16px;
}
.homeFaceV2121{
  border:1px solid rgba(148,163,184,.22);
  border-radius:18px;
  padding:17px 16px;
  background:linear-gradient(135deg,rgba(17,24,39,.90),rgba(15,23,42,.58));
}
.homeFaceV2121.alert{
  border-color:rgba(239,68,68,.58);
  background:linear-gradient(135deg,rgba(127,29,29,.72),rgba(245,158,11,.13));
}
.homeFaceV2121.peace{
  border-color:rgba(73,211,159,.38);
}
.faceLabelV2121{
  display:inline-flex;
  border:1px solid rgba(255,255,255,.18);
  border-radius:999px;
  padding:3px 9px;
  font-size:11px;
  color:var(--tx2);
  margin-bottom:9px;
}
.homeFaceV2121 h2{
  font-size:22px;
  margin:0 0 6px;
}
.homeFaceV2121 p{
  margin:0;
  color:var(--tx2);
  line-height:1.65;
  font-size:13px;
}
.bigAlertBtnV2121{
  width:100%;
  margin-top:14px;
  border:1px solid rgba(255,255,255,.24);
  background:rgba(239,68,68,.20);
  color:#fff;
  border-radius:14px;
  min-height:54px;
  font-weight:900;
  font-size:17px;
}
.peaceActionsV2121{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:8px;
  margin-top:14px;
}
.peaceActionsV2121 button{
  border:1px solid rgba(73,211,159,.35);
  background:rgba(73,211,159,.10);
  color:var(--tx);
  border-radius:12px;
  min-height:44px;
  font-weight:800;
}

/* 警報下カード。地図サイズは触らない */
.alertCommandV2121{
  flex:none;
  margin:10px 12px 8px;
  border:1px solid rgba(239,68,68,.62);
  border-radius:18px;
  background:linear-gradient(135deg,rgba(127,29,29,.82),rgba(120,53,15,.48));
  box-shadow:0 16px 38px rgba(0,0,0,.32);
  padding:16px;
}
.alertCommandV2121[hidden],
.trainingBannerV2121[hidden]{
  display:none!important;
}
.alertModeLabelV2121{
  display:inline-flex;
  border:1px solid rgba(255,255,255,.22);
  color:#ffe5e5;
  border-radius:999px;
  padding:3px 9px;
  font-size:12px;
  font-weight:800;
}
.alertVerbV2121{
  margin-top:8px;
  font-size:34px;
  line-height:1.12;
  font-weight:900;
}
.alertRecommendV2121{
  margin-top:9px;
  padding:13px 14px;
  border-radius:14px;
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.22);
  font-size:22px;
  font-weight:900;
}
.alertDetailV2121{
  margin-top:9px;
  color:#ffe4e6;
  line-height:1.6;
  font-size:14px;
}
.alertBtnsV2121{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}
.alertBtnsV2121 button{
  border:1px solid rgba(255,255,255,.22);
  background:rgba(255,255,255,.12);
  color:#fff;
  border-radius:999px;
  min-height:42px;
  padding:8px 13px;
  font-weight:900;
}
.alertBtnsV2121 button.quiet{
  background:rgba(0,0,0,.18);
}

/* 訓練モード */
.trainingBannerV2121{
  flex:none;
  display:flex;
  align-items:center;
  gap:8px;
  margin:10px 12px 8px;
  padding:11px 12px;
  border:1px solid rgba(73,211,159,.48);
  background:rgba(5,150,105,.12);
  border-radius:14px;
  color:#d1fae5;
}
.trainingBannerV2121 span{
  color:var(--tx2);
  flex:1;
}
.trainingBannerV2121 button{
  border:1px solid rgba(73,211,159,.38);
  background:rgba(73,211,159,.12);
  color:var(--tx);
  border-radius:999px;
  padding:7px 10px;
  font-weight:800;
}

@media (max-width:760px){
  .homeFacesV2121{grid-template-columns:1fr;}
  .peaceActionsV2121{grid-template-columns:1fr;}
  .alertVerbV2121{font-size:31px;}
  .alertRecommendV2121{font-size:20px;}
  .alertBtnsV2121{display:grid;grid-template-columns:1fr;}
  .trainingBannerV2121{align-items:stretch;flex-direction:column;}
}

/* v2.13.1 cpack buffer bridge */

/* ===== v2.13.2 UI再構成パッチ (玄) =====
   原則: 警報下は「行動→地図→避難先→安否」だけを見せ、設定と検証は畳む。
   平時は豊かに、警報下は貧しく。 */

/* --- 緊急導線は一本、大きく --- */
.emergencyHero{margin:14px 12px 10px}
.emergencyBtn{
  width:100%; text-align:left; border-radius:14px; cursor:pointer;
  background:linear-gradient(160deg,#4a1d18,#2c1210);
  border:1.5px solid #e2564b; padding:18px 18px 16px;
}
.emergencyBtn .emergencyMain{display:block; font-size:21px; font-weight:900; color:#ffd9d4; letter-spacing:.04em}
.emergencyBtn .emergencySub{display:block; font-size:12.5px; color:#d9a49d; margin-top:6px; line-height:1.6}
.emergencyBtn:active{transform:scale(.99)}

/* --- 平時セクション --- */
.peaceSectionV2131{margin:6px 12px 2px}
.peaceHeadV2131{margin:14px 14px 6px; display:flex; align-items:baseline; gap:10px}
.peaceHeadV2131 b{font-size:14px}
.peaceHeadV2131 span{font-size:11px; color:var(--tx3)}
.homeActions{display:grid; grid-template-columns:1fr 1fr; gap:8px}
.homeActions .primaryish{grid-column:1/-1; border-color:#35c08e; color:#bdf0dc; font-weight:700}
.homeActions button{min-height:48px; font-size:13.5px}
.statusgrid{margin:0 12px}
.modeCard{min-height:auto}
.modeCard .sub{font-size:11px; line-height:1.5}

/* --- 警報下画面: 地図を主役に、タップ標的を大きく --- */
.mapWrap,#mapWrap{height:46vh; min-height:300px}
@media (min-width:800px){.mapWrap,#mapWrap{height:52vh}}
.verbBar .v{font-size:clamp(24px,6.5vw,30px); font-weight:900}
.underMapV2131 .infoRow{margin-top:6px; font-size:11.5px; opacity:.9}
.currentStateV293{margin:4px 12px}
.statePillV293.loc{cursor:pointer; text-decoration:underline dotted; text-underline-offset:3px}

/* --- 設定・検証は畳む --- */
.setupFoldV2131{margin:6px 12px; border:1px solid var(--line); border-radius:10px; background:var(--panel)}
.setupFoldV2131>summary{
  padding:11px 14px; font-size:13px; font-weight:600; color:var(--tx2);
  cursor:pointer; list-style:none; display:flex; align-items:center; gap:8px;
}
.setupFoldV2131>summary::before{content:"▸"; font-size:11px; transition:transform .15s}
.setupFoldV2131[open]>summary::before{transform:rotate(90deg)}
.setupFoldV2131 .cleanControlsV29,.setupFoldV2131 .presetPanel{margin:0; padding:10px 14px 14px; border:none}

/* --- 安否は最重要操作: 親指標的52px --- */
.stateGrid button{min-height:54px; font-size:15px; font-weight:800; border-radius:12px}
.stateGrid .hot{border-width:2px}

/* --- 避難先リスト: 1位を大きく --- */
#list .row:first-child .nm p{font-size:16px}
#list .row:first-child .d p{font-size:17px}
#list .row{min-height:56px}

/* --- 警報下(alertCommand表示中)は気象を一段静かに --- */
.alertCommandV2121:not([hidden])~.underMapV2131{opacity:.85}



/* v2.13.4 action feedback */

/* 全主要ボタンに押下感を付与 */
button,
.iconbtn,
.primarybtn,
.emergencyBtn,
.packBtn,
.presetBtn,
.alertChoice,
.cleanControlsV29 button,
.peaceActionsV2131 button,
.alertBtnsV2121 button,
.trainingBannerV2121 button,
select{
  transition:
    transform .12s ease,
    box-shadow .18s ease,
    background-color .18s ease,
    border-color .18s ease,
    color .18s ease,
    filter .18s ease;
}

button:hover,
.iconbtn:hover,
.primarybtn:hover,
.emergencyBtn:hover,
.packBtn:hover,
.presetBtn:hover,
.alertChoice:hover,
.cleanControlsV29 button:hover,
.peaceActionsV2131 button:hover,
.alertBtnsV2121 button:hover,
.trainingBannerV2121 button:hover{
  box-shadow:
    0 0 0 1px rgba(73,211,159,.28),
    0 0 18px rgba(73,211,159,.16);
  filter:brightness(1.08);
}

button:active,
.iconbtn:active,
.primarybtn:active,
.emergencyBtn:active,
.packBtn:active,
.presetBtn:active,
.alertChoice:active,
.cleanControlsV29 button:active,
.peaceActionsV2131 button:active,
.alertBtnsV2121 button:active,
.trainingBannerV2121 button:active{
  transform:scale(.975);
  box-shadow:
    0 0 0 2px rgba(73,211,159,.45),
    0 0 22px rgba(73,211,159,.28);
}

button:focus-visible,
select:focus-visible,
.iconbtn:focus-visible,
.primarybtn:focus-visible,
.packBtn:focus-visible,
.presetBtn:focus-visible{
  outline:none;
  box-shadow:
    0 0 0 3px rgba(73,211,159,.48),
    0 0 24px rgba(73,211,159,.24);
}

/* クリック時の一瞬の光 */
.tapFlashV2134{
  animation:tapFlashV2134 .62s ease-out;
}
.successFlashV2134{
  animation:successFlashV2134 .72s ease-out;
}
.warnFlashV2134{
  animation:warnFlashV2134 .72s ease-out;
}

@keyframes tapFlashV2134{
  0%{transform:scale(.98); box-shadow:0 0 0 0 rgba(73,211,159,.0)}
  35%{transform:scale(1.015); box-shadow:0 0 0 4px rgba(73,211,159,.28),0 0 26px rgba(73,211,159,.24)}
  100%{transform:scale(1); box-shadow:inherit}
}
@keyframes successFlashV2134{
  0%{filter:brightness(1)}
  35%{filter:brightness(1.42); box-shadow:0 0 0 4px rgba(73,211,159,.36),0 0 32px rgba(73,211,159,.28)}
  100%{filter:brightness(1)}
}
@keyframes warnFlashV2134{
  0%{filter:brightness(1)}
  35%{filter:brightness(1.42); box-shadow:0 0 0 4px rgba(240,165,58,.42),0 0 32px rgba(240,165,58,.26)}
  100%{filter:brightness(1)}
}

/* 処理中 */
.btnLoadingV2134{
  position:relative;
  border-color:rgba(73,211,159,.72)!important;
  background:rgba(5,150,105,.20)!important;
  color:#eafff7!important;
  box-shadow:0 0 0 1px rgba(73,211,159,.32),0 0 20px rgba(73,211,159,.20)!important;
}
.btnLoadingV2134::after{
  content:"";
  display:inline-block;
  width:14px;
  height:14px;
  margin-left:9px;
  border:2px solid rgba(255,255,255,.28);
  border-top-color:#fff;
  border-radius:50%;
  vertical-align:-2px;
  animation:spinV2134 .8s linear infinite;
}
@keyframes spinV2134{to{transform:rotate(360deg)}}

/* 地図タップ待機中 */
.btnWaitingV2134{
  border-color:rgba(240,165,58,.82)!important;
  background:rgba(120,53,15,.34)!important;
  color:#fff7ed!important;
  box-shadow:0 0 0 1px rgba(240,165,58,.38),0 0 22px rgba(240,165,58,.24)!important;
  animation:waitingPulseV2134 1.25s ease-in-out infinite;
}
@keyframes waitingPulseV2134{
  0%,100%{filter:brightness(1)}
  50%{filter:brightness(1.35)}
}

/* 成功状態 */
.btnSuccessV2134{
  border-color:rgba(73,211,159,.88)!important;
  background:rgba(5,150,105,.32)!important;
  color:#d1fae5!important;
  box-shadow:0 0 0 1px rgba(73,211,159,.42),0 0 26px rgba(73,211,159,.25)!important;
}

/* セレクト変更時 */
.selectFlashV2134{
  animation:selectFlashV2134 .7s ease-out;
}
@keyframes selectFlashV2134{
  0%{box-shadow:0 0 0 0 rgba(73,211,159,0)}
  35%{box-shadow:0 0 0 4px rgba(73,211,159,.28),0 0 24px rgba(73,211,159,.24)}
  100%{box-shadow:inherit}
}

/* トースト */
.toastV2134{
  position:fixed;
  left:50%;
  bottom:calc(18px + env(safe-area-inset-bottom));
  transform:translate(-50%, 20px);
  z-index:5000;
  min-width:min(92vw, 360px);
  max-width:min(92vw, 520px);
  padding:12px 15px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,.30);
  background:rgba(17,24,39,.94);
  color:var(--tx);
  font-weight:900;
  text-align:center;
  box-shadow:0 18px 44px rgba(0,0,0,.42);
  opacity:0;
  pointer-events:none;
  transition:opacity .22s ease, transform .22s ease, border-color .22s ease, background-color .22s ease;
}
.toastV2134.show{
  opacity:1;
  transform:translate(-50%, 0);
}
.toastV2134.ok{
  border-color:rgba(73,211,159,.55);
  background:rgba(5,46,22,.94);
}
.toastV2134.info{
  border-color:rgba(77,159,224,.55);
  background:rgba(15,23,42,.94);
}
.toastV2134.warn{
  border-color:rgba(240,165,58,.66);
  background:rgba(69,26,3,.94);
}

/* 警報下の重要ボタンは押しやすく */
.emergencyFaceV2121 .alertBtnsV2121 button,
.emergencyFaceV2121 .cleanControlsV29 button{
  min-height:54px;
  font-size:15px;
}

/* 高齢者・片手操作向けにスマホではさらに反応を強く */
@media (max-width:760px){
  .toastV2134{
    bottom:calc(76px + env(safe-area-inset-bottom));
    border-radius:16px;
    line-height:1.45;
  }
  button,
  .iconbtn,
  .primarybtn,
  .packBtn,
  .presetBtn{
    min-height:44px;
  }
}



/* v2.14 dosha A33 badges */
.doshaA33BoxV214{
  border-left:4px solid rgba(240,165,58,.78);
}
.doshaBadgeV214{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:3px 7px;
  margin:2px 0;
  border-radius:999px;
  font-weight:900;
  font-size:11px;
  line-height:1.35;
  border:1px solid rgba(148,163,184,.35);
  background:rgba(15,23,42,.40);
  color:var(--tx);
  vertical-align:middle;
}
.doshaBadgeV214.outside{
  color:#bbf7d0;
  border-color:rgba(74,222,128,.35);
  background:rgba(20,83,45,.22);
}
.doshaBadgeV214.yellow{
  color:#fef3c7;
  border-color:rgba(251,191,36,.55);
  background:rgba(120,53,15,.32);
  box-shadow:0 0 14px rgba(251,191,36,.12);
}
.doshaBadgeV214.red{
  color:#fee2e2;
  border-color:rgba(248,113,113,.65);
  background:rgba(127,29,29,.40);
  box-shadow:0 0 16px rgba(248,113,113,.16);
}
.doshaBadgeV214.unknown{
  color:#cbd5e1;
  border-color:rgba(148,163,184,.35);
}
.doshaRowExtraV214{
  display:inline;
}
@media (max-width:760px){
  .doshaRowExtraV214{
    display:block;
    margin-top:5px;
  }
  .doshaBadgeV214{
    font-size:10.5px;
    padding:3px 6px;
  }
}



/* v2.14.1 dosha UI decision */
.routeSafeV2141{background:#35c08e!important}
.routeWarnV2141{background:#f59e0b!important}
.routeDangerV2141{background:#ef4444!important}

.doshaDecisionV2141{
  margin:0 0 10px;
  border-radius:14px;
  padding:12px;
  border:1px solid rgba(148,163,184,.28);
  background:rgba(15,23,42,.72);
  box-shadow:0 12px 32px rgba(0,0,0,.20);
}
.doshaDecisionV2141.safe{
  border-color:rgba(52,211,153,.55);
  background:linear-gradient(135deg,rgba(6,78,59,.66),rgba(15,23,42,.72));
}
.doshaDecisionV2141.warn{
  border-color:rgba(245,158,11,.62);
  background:linear-gradient(135deg,rgba(120,53,15,.70),rgba(15,23,42,.76));
}
.doshaDecisionV2141.danger{
  border-color:rgba(239,68,68,.72);
  background:linear-gradient(135deg,rgba(127,29,29,.78),rgba(15,23,42,.76));
}
.doshaDecisionV2141.info{
  border-color:rgba(77,159,224,.50);
}
.doshaDecisionHeadV2141{
  font-size:12px;
  color:var(--tx2);
  font-weight:900;
  letter-spacing:.08em;
  margin-bottom:8px;
}
.doshaDecisionGridV2141{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin-bottom:10px;
}
.doshaDecisionGridV2141 div{
  border-radius:12px;
  padding:9px 10px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.18);
}
.doshaDecisionGridV2141 span{
  display:block;
  color:var(--tx3);
  font-size:11px;
  font-weight:800;
  margin-bottom:3px;
}
.doshaDecisionGridV2141 b{
  display:block;
  color:#fff;
  font-size:14px;
  line-height:1.35;
}
.doshaDecisionMainV2141{
  font-size:15px;
  font-weight:900;
  line-height:1.55;
}
.doshaDecisionSubV2141{
  margin-top:6px;
  color:var(--tx2);
  font-size:12px;
  line-height:1.5;
}
.mode-dosha-v2141 .shpin{
  width:10px!important;
  height:10px!important;
  opacity:.72;
  box-shadow:0 0 0 2px rgba(2,6,23,.62),0 0 12px rgba(53,192,142,.20)!important;
}
.mode-dosha-v2141 .shpin.top{
  width:14px!important;
  height:14px!important;
  opacity:1;
  box-shadow:0 0 0 3px rgba(2,6,23,.70),0 0 18px rgba(53,192,142,.38)!important;
}
.mode-dosha-v2141 .leaflet-interactive.routeSafeLineV2141{
  filter:drop-shadow(0 0 5px rgba(53,192,142,.38));
}
.mode-dosha-v2141 .leaflet-interactive.routeWarnLineV2141{
  filter:drop-shadow(0 0 6px rgba(245,158,11,.45));
}
.mode-dosha-v2141 .leaflet-interactive.routeDangerLineV2141{
  filter:drop-shadow(0 0 7px rgba(239,68,68,.52));
}

@media (max-width:760px){
  .doshaDecisionGridV2141{
    grid-template-columns:1fr;
    gap:6px;
  }
  .doshaDecisionMainV2141{
    font-size:14px;
  }
}



/* v2.14.2 dosha card position */
.doshaDecisionTopV2142{
  margin:8px 8px 10px;
}
.doshaDecisionTopV2142[hidden]{
  display:none!important;
}
.doshaDecisionTopV2142 .doshaDecisionV2141{
  margin:0;
  border-width:2px;
}
.mode-dosha-v2141 .currentStateV293{
  margin-bottom:0;
}
.mode-dosha-v2141 .mapWrap{
  border-top:1px solid rgba(73,211,159,.28);
}
.doshaWxNoteV2142{
  color:#fef3c7;
  font-weight:800;
}
@media (max-width:760px){
  .doshaDecisionTopV2142{
    margin:6px 6px 8px;
  }
  .doshaDecisionTopV2142 .doshaDecisionV2141{
    border-radius:12px;
  }
}



/* v2.15 simple emergency UI */
.quickGuideV215{
  margin:8px 8px 10px;
  padding:14px;
  border-radius:16px;
  border:2px solid rgba(73,211,159,.42);
  background:linear-gradient(135deg,rgba(6,78,59,.74),rgba(15,23,42,.84));
  box-shadow:0 14px 38px rgba(0,0,0,.24);
}
.quickMainV215{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}
.quickTitleV215{
  font-size:20px;
  font-weight:1000;
  line-height:1.3;
  color:#ecfdf5;
}
.quickSubV215{
  margin-top:4px;
  color:var(--tx2);
  font-weight:800;
  line-height:1.45;
}
.quickStepsV215{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.quickStepsV215 span{
  white-space:nowrap;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(0,0,0,.20);
  border-radius:999px;
  padding:6px 9px;
  font-size:12px;
  font-weight:900;
  color:#bbf7d0;
}
.quickActionsV215{
  display:grid;
  grid-template-columns:1.4fr 1fr 1fr .8fr;
  gap:8px;
  margin-top:12px;
}
.quickActionsV215 button{
  min-height:52px;
  border-radius:14px;
  font-weight:1000;
}
.quickActionsV215 .quickPrimaryV215{
  background:rgba(5,150,105,.36);
  border-color:rgba(73,211,159,.75);
  color:#ecfdf5;
  box-shadow:0 0 0 1px rgba(73,211,159,.20),0 0 18px rgba(73,211,159,.14);
}
.quickActionsV215 .quiet{
  opacity:.78;
}
.quickRouteV215{
  margin-top:10px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.20);
  color:#d1fae5;
  font-weight:900;
  line-height:1.5;
}
.routeChoiceV215{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:4px 10px;
  align-items:center;
}
.routeChoiceV215 b{
  font-size:16px;
}
.routeChoiceV215 span{
  text-align:right;
  font-weight:1000;
}
.routeChoiceV215 em{
  grid-column:1 / -1;
  font-style:normal;
  color:var(--tx2);
}
.routeChoiceV215.safe em{color:#bbf7d0}
.routeChoiceV215.warn em{color:#fde68a}
.routeChoiceV215.danger em{color:#fecaca}
.popupV215 span{
  display:inline-block;
  margin-top:4px;
  color:#065f46;
  font-weight:900;
}
.simpleEmergencyV215 #setupFoldV2131{
  margin-top:8px;
  opacity:.86;
}
.simpleEmergencyV215 #setupFoldV2131:not([open]){
  background:rgba(15,23,42,.55);
}
.simpleEmergencyV215 #setupFoldV2131:not([open]) summary{
  color:var(--tx2);
  font-size:13px;
}
.simpleEmergencyV215 #presetPanel{
  opacity:.78;
}
.simpleEmergencyV215 #list .row{
  cursor:pointer;
}
.simpleEmergencyV215 .shpin{
  cursor:pointer;
  box-shadow:0 0 0 3px rgba(2,6,23,.70),0 0 18px rgba(53,192,142,.34)!important;
}
.simpleEmergencyV215 .shpin.top{
  box-shadow:0 0 0 4px rgba(2,6,23,.72),0 0 24px rgba(53,192,142,.46)!important;
}
.simpleEmergencyV215 .underMapV2131{
  font-size:12px;
}
@media (max-width:760px){
  .quickGuideV215{
    margin:6px;
    padding:12px;
    border-radius:14px;
  }
  .quickMainV215{
    display:block;
  }
  .quickTitleV215{
    font-size:18px;
  }
  .quickStepsV215{
    justify-content:flex-start;
    margin-top:8px;
  }
  .quickActionsV215{
    grid-template-columns:1fr;
  }
  .quickActionsV215 button{
    min-height:54px;
    font-size:15px;
  }
  .routeChoiceV215{
    grid-template-columns:1fr;
  }
  .routeChoiceV215 span{
    text-align:left;
  }
}



/* v2.15.1 tap route only */
#doshaDecisionTopV2142,
#doshaDecisionV2141{
  display:none!important;
}
.quickGuideV215{
  border-color:rgba(73,211,159,.64);
}
.quickRouteV215{
  font-size:15px;
}
.simpleEmergencyV215 .mapWrap{
  border-top:2px solid rgba(73,211,159,.30);
}
@media (max-width:760px){
  .quickRouteV215{
    font-size:14px;
  }
}



/* v2.16 volcano VDPF */
.vdpfPinV216{
  width:17px;
  height:17px;
  border-radius:50%;
  background:#f97316;
  border:3px solid rgba(255,255,255,.90);
  box-shadow:0 0 0 2px rgba(2,6,23,.72),0 0 18px rgba(249,115,22,.45);
}
.vdpfPinV216.heli{
  background:#f97316;
}
.vdpfPinV216.base{
  background:#f59e0b;
}
.vdpfPinV216.ropeway{
  background:#a855f7;
}
.vdpfPinV216.facility{
  background:#fb923c;
}
.vdpfPopupV216{
  min-width:190px;
  line-height:1.45;
}
.vdpfPopupV216 b{
  color:#111827;
  font-size:14px;
}
.vdpfPopupV216 em{
  color:#7c2d12;
  font-style:normal;
  font-weight:900;
}
.vdpfPopupV216 span{
  color:#334155;
  font-weight:800;
}
.vdpfPopupV216 p{
  margin:6px 0 0;
  padding:6px;
  border-radius:8px;
  background:#fff7ed;
  color:#7c2d12;
  font-size:12px;
  font-weight:900;
}
.vdpfNoticeV216{
  color:#fed7aa;
  font-weight:900;
}
.vdpfSwV216{
  background:#f97316!important;
}
.mode-volcano-v216 .vdpfPinV216{
  cursor:pointer;
}



/* v2.17 disaster hero UI */
.disasterHeroV217{
  margin:10px 8px 8px;
  border-radius:18px;
  border:1px solid rgba(73,211,159,.45);
  background:linear-gradient(135deg,rgba(6,78,59,.85),rgba(15,23,42,.88));
  box-shadow:0 16px 44px rgba(0,0,0,.28);
  padding:14px;
  display:grid;
  grid-template-columns:130px minmax(0,1fr) 460px;
  gap:16px;
  align-items:center;
}
.heroIconV217{
  width:112px;
  height:112px;
  border-radius:999px;
  border:4px solid rgba(236,253,245,.88);
  display:grid;
  place-items:center;
  color:#ecfdf5;
  font-size:60px;
  font-weight:1000;
  background:rgba(0,0,0,.18);
  box-shadow:inset 0 0 26px rgba(255,255,255,.06),0 0 24px rgba(73,211,159,.12);
}
.heroKickerV217{
  color:#99f6e4;
  font-weight:1000;
  letter-spacing:.08em;
  font-size:13px;
  margin-bottom:2px;
}
.heroMainV217 h2{
  margin:0;
  font-size:28px;
  line-height:1.28;
  color:#fff;
  font-weight:1000;
  letter-spacing:.02em;
}
.heroMainV217 p{
  margin:7px 0 0;
  color:#d1fae5;
  font-weight:850;
  line-height:1.5;
  font-size:15px;
}
.heroActionsV217{
  display:grid;
  grid-template-columns:1.2fr 1fr 1fr 1fr;
  gap:8px;
  margin-top:12px;
}
.heroActionsV217 button{
  min-height:52px;
  border-radius:14px;
  font-weight:1000;
  font-size:14px;
}
.heroPrimaryV217{
  background:rgba(5,150,105,.38)!important;
  color:#ecfdf5!important;
  border-color:rgba(73,211,159,.76)!important;
}
.heroQuietV217{
  opacity:.90;
}
.heroRightV217{
  border-left:1px solid rgba(255,255,255,.14);
  padding-left:16px;
}
.heroStepsV217{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  margin-bottom:12px;
}
.heroStepsV217 span{
  display:grid;
  place-items:center;
  width:68px;
  height:62px;
  border-radius:18px;
  color:#cbd5e1;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(0,0,0,.16);
  font-weight:1000;
  line-height:1.15;
}
.heroStepsV217 span.on{
  color:#042f2e;
  background:#5eead4;
  border-color:#99f6e4;
}
.heroStepsV217 span b{
  font-size:11px;
}
.heroStepsV217 i{
  color:rgba(255,255,255,.35);
  font-style:normal;
  font-size:24px;
  font-weight:1000;
}
.heroEmergencyV217{
  border:1px solid rgba(248,113,113,.55);
  background:linear-gradient(135deg,rgba(127,29,29,.72),rgba(15,23,42,.55));
  border-radius:14px;
  padding:10px;
}
.heroEmergencyV217 strong{
  display:block;
  color:#fecaca;
  margin-bottom:8px;
  font-size:13px;
}
.heroEmergencyV217 div{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.heroEmergencyV217 button{
  min-height:58px;
  background:rgba(185,28,28,.62);
  border-color:rgba(252,165,165,.45);
  color:#fff;
  border-radius:12px;
  font-weight:1000;
  line-height:1.2;
}
.heroEmergencyV217 button.end{
  background:rgba(15,23,42,.52);
}
.heroEmergencyV217 small{
  display:block;
  color:#fecaca;
  font-size:11px;
  margin-top:3px;
}
.modeCautionV217{
  margin:0 8px 8px;
  min-height:42px;
  border-radius:12px;
  border:1px solid rgba(245,158,11,.46);
  background:rgba(69,26,3,.60);
  color:#fde68a;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:8px 12px;
  font-weight:1000;
  box-shadow:0 8px 24px rgba(0,0,0,.16);
}
.modeCautionV217::before{
  content:"⚠";
  margin-right:4px;
}
.modeCautionV217 button{
  min-height:34px;
  border-radius:10px;
  white-space:nowrap;
  padding:0 14px;
  background:rgba(15,23,42,.50);
  color:#fff7ed;
  border-color:rgba(253,230,138,.35);
  font-weight:900;
}
.quickGuideV215.compactV217{
  margin:0 8px 8px;
  padding:10px 12px;
  border-radius:12px;
  border-width:1px;
  background:rgba(15,23,42,.80);
}
.quickGuideV215.compactV217 .quickActionsV215,
.quickGuideV215.compactV217 .quickStepsV215{
  display:none!important;
}
.quickGuideV215.compactV217 .quickMainV215{
  display:block;
}
.quickGuideV215.compactV217 .quickTitleV215{
  font-size:15px;
}
.quickGuideV215.compactV217 .quickSubV215{
  font-size:13px;
}
.quickGuideV215.compactV217 .quickRouteV215{
  margin-top:7px;
  padding:8px 10px;
  font-size:13px;
}

/* hazard-specific colors */
.disasterHeroV217.mode-volcano{
  border-color:rgba(248,113,113,.68);
  background:linear-gradient(135deg,rgba(127,29,29,.86),rgba(15,23,42,.88));
}
.disasterHeroV217.mode-volcano .heroIconV217{
  border-color:rgba(254,202,202,.90);
  box-shadow:0 0 26px rgba(239,68,68,.18);
}
.modeCautionV217.mode-volcano{
  border-color:rgba(245,158,11,.60);
  background:rgba(69,26,3,.70);
}
.indoorActionsV217{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin-top:12px;
}
.indoorActionsV217 div{
  border-radius:12px;
  border:1px solid rgba(254,202,202,.24);
  background:rgba(0,0,0,.18);
  padding:9px 10px;
}
.indoorActionsV217 b{
  display:block;
  color:#fff;
  font-size:14px;
}
.indoorActionsV217 small{
  display:block;
  color:#fecaca;
  margin-top:3px;
  font-weight:800;
  line-height:1.35;
}
.disasterHeroV217.mode-tsunami{
  border-color:rgba(56,189,248,.55);
  background:linear-gradient(135deg,rgba(14,116,144,.82),rgba(15,23,42,.88));
}
.disasterHeroV217.mode-flood{
  border-color:rgba(59,130,246,.55);
  background:linear-gradient(135deg,rgba(30,64,175,.76),rgba(15,23,42,.88));
}
.disasterHeroV217.mode-dosha{
  border-color:rgba(245,158,11,.55);
  background:linear-gradient(135deg,rgba(120,53,15,.76),rgba(15,23,42,.88));
}
.disasterHeroV217.mode-missile{
  border-color:rgba(248,113,113,.65);
  background:linear-gradient(135deg,rgba(88,28,135,.70),rgba(15,23,42,.90));
}

/* map marker visibility per mode */
.mode-volcano-v217 .shpin{
  width:9px!important;
  height:9px!important;
  opacity:.50!important;
}
.mode-volcano-v217 .shpin.top{
  width:12px!important;
  height:12px!important;
  opacity:.68!important;
}
.mode-volcano-v217 .vdpfPinV216{
  width:22px!important;
  height:22px!important;
  border-width:3px!important;
  box-shadow:0 0 0 3px rgba(2,6,23,.70),0 0 28px rgba(249,115,22,.62)!important;
}

@media (max-width:980px){
  .disasterHeroV217{
    grid-template-columns:92px minmax(0,1fr);
  }
  .heroRightV217{
    grid-column:1 / -1;
    border-left:0;
    border-top:1px solid rgba(255,255,255,.12);
    padding-left:0;
    padding-top:12px;
  }
  .heroIconV217{
    width:82px;
    height:82px;
    font-size:42px;
  }
}
@media (max-width:760px){
  .disasterHeroV217{
    margin:6px;
    grid-template-columns:64px minmax(0,1fr);
    gap:10px;
    padding:10px;
    border-radius:14px;
  }
  .heroIconV217{
    width:58px;
    height:58px;
    font-size:30px;
    border-width:3px;
  }
  .heroMainV217 h2{
    font-size:20px;
  }
  .heroMainV217 p{
    font-size:13px;
  }
  .heroActionsV217,
  .indoorActionsV217{
    grid-template-columns:1fr;
  }
  .heroStepsV217{
    gap:6px;
  }
  .heroStepsV217 span{
    width:56px;
    height:50px;
  }
  .heroEmergencyV217 div{
    grid-template-columns:1fr;
  }
  .modeCautionV217{
    margin:0 6px 6px;
    display:block;
    line-height:1.45;
  }
  .modeCautionV217 button{
    margin-top:8px;
    width:100%;
  }
}


/* v2.22 — 先人の記憶レイヤー 第1期 */
.memoryEntryBtnV222{border-color:rgba(206,169,92,.62)!important;background:linear-gradient(135deg,rgba(206,169,92,.17),rgba(97,123,101,.12))!important;color:#f2dfaa!important;font-weight:800!important}
.landMemoryPageV222{max-width:980px;margin:0 auto;padding:18px 14px 54px}
.memoryHeroV222{border:1px solid rgba(206,169,92,.42);border-radius:18px;padding:clamp(20px,4vw,38px);background:radial-gradient(circle at 82% 12%,rgba(206,169,92,.16),transparent 35%),linear-gradient(145deg,rgba(29,38,34,.98),rgba(15,20,22,.98));box-shadow:0 18px 50px rgba(0,0,0,.3)}
.memoryKickerV222{font-size:12px;letter-spacing:.12em;color:#d8bc79;font-weight:900;margin-bottom:9px}
.memoryHeroV222 h2{font-family:"Shippori Mincho",serif;font-size:clamp(25px,5vw,42px);line-height:1.35;margin:0 0 14px;color:#fff8df}
.memoryHeroV222 p{max-width:760px;color:var(--tx2);font-size:15px;line-height:1.9;margin:0}
.memoryHeroActionsV222{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px}
.memoryHeroActionsV222 button{min-height:48px;padding:10px 18px;border-radius:12px}
.memoryHeroActionsV222 .primaryish{background:#d5b66d;color:#17130a;border-color:#ecd799;font-weight:900}
.memoryCardsV222{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:16px}
.memoryCardsV222 article{border:1px solid var(--line);border-radius:15px;padding:18px;background:var(--panel);min-height:210px}
.memoryCardsV222 h3{font-size:17px;margin:12px 0 8px;color:var(--tx)}
.memoryCardsV222 p{font-size:13px;line-height:1.8;color:var(--tx2);margin:0}
.memoryIconV222{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:rgba(206,169,92,.18);border:1px solid rgba(206,169,92,.5);font-family:"Shippori Mincho",serif;color:#f3d994;font-weight:900;font-size:20px}
.memoryPrincipleV222,.memorySourcesV222{border:1px solid var(--line);border-radius:15px;padding:18px;margin-top:14px;background:rgba(20,27,29,.92)}
.memoryPrincipleV222 h3{margin:0 0 12px;font-size:17px}
.memoryPrincipleGridV222{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.memoryPrincipleGridV222>div{display:flex;flex-direction:column;gap:7px;border-radius:12px;padding:14px;background:rgba(255,255,255,.035)}
.memoryPrincipleGridV222 b{color:#e8d29c}.memoryPrincipleGridV222 span{font-size:13px;line-height:1.65;color:var(--tx2)}
.memoryWarningV222{margin:13px 0 0;border-left:3px solid #e3b34c;padding:10px 12px;background:rgba(227,179,76,.08);font-size:13px;line-height:1.7;color:var(--tx2)}
.memorySourcesV222 p{font-size:13px;line-height:1.75;color:var(--tx2)}
.memorySourcesV222>div{display:flex;flex-wrap:wrap;gap:8px}.memorySourcesV222 a{font-size:12px;padding:8px 10px;border:1px solid var(--line);border-radius:9px;color:#bfe6d8;text-decoration:none}
.memoryLayerControlV222{position:absolute;z-index:850;left:10px;top:10px;width:min(290px,calc(100% - 74px));border:1px solid rgba(206,169,92,.5);border-radius:12px;background:rgba(13,17,20,.94);backdrop-filter:blur(7px);box-shadow:0 8px 24px rgba(0,0,0,.32);color:var(--tx)}
.memoryLayerControlV222>summary{list-style:none;cursor:pointer;padding:10px 12px;font-size:13px;font-weight:900;color:#f1d794;display:flex;align-items:center;gap:7px}
.memoryLayerControlV222>summary::-webkit-details-marker{display:none}.memoryLayerControlV222>summary::before{content:"碑";display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:rgba(206,169,92,.18);border:1px solid rgba(206,169,92,.5);font-family:"Shippori Mincho",serif;font-size:12px}
.memoryLayerBodyV222{display:grid;gap:9px;padding:0 12px 12px;border-top:1px solid rgba(255,255,255,.08)}
.memoryLayerBodyV222>label{display:flex;align-items:center;gap:8px;font-size:13px;padding-top:9px}.memoryLayerBodyV222 input[type="checkbox"]{width:19px;height:19px;accent-color:#d5b66d}
.memoryOpacityV222{display:grid!important;grid-template-columns:auto 1fr}.memoryOpacityV222 input{width:100%;accent-color:#d5b66d}
.memoryLayerStatusV222{font-size:11.5px;line-height:1.5;color:#b9d8ce;background:rgba(89,160,135,.09);border-radius:8px;padding:7px 8px}
.memoryLayerNoteV222{font-size:10.5px;line-height:1.45;color:var(--tx3)}
.memoryLayerBodyV222>a{font-size:10.5px;color:#b7d8cd;text-decoration:none}
.landMemoryLoreIcon{background:transparent!important;border:none!important}.landMemoryLoreIcon span{display:grid;place-items:center;width:31px;height:31px;border-radius:50%;background:#2e2418;border:2px solid #f0cf7a;color:#fff4cf;font-family:"Shippori Mincho",serif;font-weight:900;box-shadow:0 2px 10px rgba(0,0,0,.65)}
.landMemoryPopupV222{min-width:210px;max-width:280px;font-family:"Zen Kaku Gothic New",sans-serif;color:#202426}.landMemoryPopupV222 b{font-size:15px}.landMemoryPopupV222 dl{display:grid;grid-template-columns:auto 1fr;gap:4px 8px;margin:8px 0}.landMemoryPopupV222 dt{font-weight:800;color:#65532a}.landMemoryPopupV222 dd{margin:0}.landMemoryPopupV222 p{line-height:1.55;margin:7px 0}.landMemoryPopupV222 small{display:block;color:#64706d;border-top:1px solid #ddd;padding-top:6px}
@media(max-width:720px){.memoryCardsV222{grid-template-columns:1fr}.memoryCardsV222 article{min-height:0}.memoryPrincipleGridV222{grid-template-columns:1fr}.memoryLayerControlV222{width:min(268px,calc(100% - 78px))}.memoryHeroActionsV222{display:grid}.memoryHeroActionsV222 button{width:100%}}

/* v2.23 全国地域パック */
.nationwidePrefV223,.nationwideCityV223{min-width:min(210px,100%)}
#prefSelectV223,#regionSelectV2113,#settingsPrefV223,#settingsRegionV223{width:100%;min-height:46px}
#autoRegionBtnV223{min-height:46px;align-self:end}
.nationwidePackPanelV223{display:grid;gap:10px;width:100%;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}
.nationwidePackPanelV223 label{display:grid;gap:5px;font-size:12px;color:var(--tx2)}
.nationwidePackPanelV223 .miniRow{margin-top:2px}
@media(min-width:760px){
  .cleanControlsV29{grid-template-columns:minmax(150px,.8fr) minmax(210px,1.2fr) auto minmax(180px,1fr)}
  .nationwidePackPanelV223{grid-template-columns:1fr 1.4fr auto;align-items:end}
  .nationwidePackPanelV223 .note,.nationwidePackPanelV223 .miniRow{grid-column:1/-1}
}

/* ===== v2.4.5-r1 smartphone emergency modal scroll fix =====
   Keep the emergency header/close button visible and make only the modal body
   vertically scrollable on touch devices. */
#emergencyModal.modal.on{
  align-items:flex-start!important;
  justify-content:center!important;
  overflow:hidden!important;
  overscroll-behavior:contain!important;
  touch-action:pan-y!important;
  padding:max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom))!important;
}
#emergencyModal .alertBox{
  width:min(780px, 100%)!important;
  max-height:calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;
  margin:0 auto!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  overscroll-behavior:contain!important;
}
#emergencyModal .modalHead{
  flex:0 0 auto!important;
  position:relative!important;
  z-index:4!important;
  background:var(--panel)!important;
}
#emergencyModal .modalBody{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior-y:contain!important;
  -webkit-overflow-scrolling:touch!important;
  touch-action:pan-y!important;
  padding-bottom:calc(28px + env(safe-area-inset-bottom))!important;
}
#emergencyModal .alertGrid,
#emergencyModal .alertCard,
#emergencyModal .note{
  touch-action:pan-y!important;
}
@media (max-width:760px){
  #emergencyModal.modal.on{
    padding:0!important;
  }
  #emergencyModal .alertBox{
    width:100%!important;
    height:100vh!important;
    height:100dvh!important;
    min-height:0!important;
    max-height:100vh!important;
    max-height:100dvh!important;
    margin:0!important;
    border-radius:0!important;
    border-left:0!important;
    border-right:0!important;
  }
  #emergencyModal .modalHead{
    padding-top:calc(12px + env(safe-area-inset-top))!important;
  }
  #emergencyModal .modalHead .iconbtn{
    min-height:44px!important;
    min-width:72px!important;
  }
  #emergencyModal .modalBody{
    padding:12px 12px calc(32px + env(safe-area-inset-bottom))!important;
  }
  #emergencyModal .alertGrid{
    grid-template-columns:1fr!important;
    gap:9px!important;
    margin:8px 0!important;
  }
  #emergencyModal .alertCard{
    min-height:64px!important;
  }
}


/* ===== r29.3.6 settings modal scroll fix =====
   Keep the settings header reachable and scroll only the long settings body. */
#settingsModal.modal.on{
  align-items:flex-start!important;
  justify-content:center!important;
  overflow:hidden!important;
  overscroll-behavior:contain!important;
  padding:max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom))!important;
}
#settingsModal .modalBox{
  width:min(760px,100%)!important;
  max-height:calc(100vh - 20px)!important;
  max-height:calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;
  margin:0 auto!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
}
#settingsModal .modalHead{
  flex:0 0 auto!important;
  position:relative!important;
  z-index:4!important;
  background:var(--panel)!important;
}
#settingsModal .modalBody{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior-y:contain!important;
  -webkit-overflow-scrolling:touch!important;
  touch-action:pan-y!important;
  padding-bottom:calc(32px + env(safe-area-inset-bottom))!important;
}
@media(max-width:760px){
  #settingsModal.modal.on{padding:0!important;}
  #settingsModal .modalBox{
    width:100%!important;
    height:100vh!important;
    height:100dvh!important;
    max-height:100vh!important;
    max-height:100dvh!important;
    border-radius:0!important;
    border-left:0!important;
    border-right:0!important;
  }
  #settingsModal .modalHead{
    padding-top:calc(12px + env(safe-area-inset-top))!important;
  }
  #settingsModal .modalBody{
    padding:12px 12px calc(36px + env(safe-area-inset-bottom))!important;
  }
}
