/* 岡垣町 道路台帳閲覧（町ホームページ公開用・パソコン／スマートフォン） */
:root {
  --bg: #e9edf1;
  --ink: #1d2733;
  --muted: #5b6878;
  --line: #c9d2dc;
  --accent: #1f5f99;
  --note: #fff8e1;
  --note-b: #e8d48a;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.5;
  font-family: "BIZ UDPGothic", "BIZ UDゴシック", "Hiragino Sans", "Meiryo", sans-serif;
}
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* ---- 上の帯 ---- */
.bar {
  display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap;
  padding: 8px 16px; background: #fff; border-bottom: 2px solid var(--line);
}
.ttl { margin: 0; font-size: 18px; white-space: nowrap; }
.ttl small { margin-left: 8px; font-size: 13px; font-weight: 400; color: var(--muted); }
.vtitle { font-size: 18px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.tools { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.tbtn {
  display: inline-block; padding: 6px 14px; border-radius: 99px; border: 2px solid var(--accent);
  background: #fff; color: var(--accent); font-size: 15px; font-weight: 700; white-space: nowrap; text-decoration: none;
}
.tbtn:hover { background: #eaf2fa; }
.tbtn.sub { border-color: var(--line); color: var(--muted); font-weight: 400; }
#vMap { background: var(--accent); color: #fff; }
button:focus-visible, a:focus-visible { outline: 3px solid #f0a020; outline-offset: 2px; }

/* ---- 図面 ---- */
.stage { position: relative; flex: 1; min-height: 0; }
.osd { position: absolute !important; inset: 0; background: #fff; }   /* OpenSeadragon が position:relative を書き込むので上書き */
.zoom { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 3; }
.zoom button {
  width: 48px; height: 48px; border-radius: 10px; border: 2px solid var(--accent); background: rgba(255,255,255,.95);
  color: var(--accent); font-size: 24px; font-weight: 700; padding: 0;
}
.zoom #zHome { font-size: 14px; }
.arrow {
  position: absolute; z-index: 3; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--accent);
  background: rgba(255,255,255,.92); color: var(--accent); font-size: 18px; padding: 0; display: none;
}
.arrow.on { display: block; }
.arrow.up { top: 12px; left: 50%; transform: translateX(-50%); }
.arrow.down { bottom: 12px; left: 50%; transform: translateX(-50%); }
.arrow.left { left: 12px; top: 50%; transform: translateY(-50%); }
.arrow.right { right: 72px; top: 50%; transform: translateY(-50%); }
.vguide {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 3; margin: 0; pointer-events: none;
  max-width: calc(100% - 24px); padding: 6px 18px; border-radius: 99px; background: rgba(31,95,153,.94); color: #fff;
  font-size: 15px; text-align: center; box-shadow: 0 2px 10px rgba(0,0,0,.2);
}
.vguide b { color: #ffe08a; }
.vhint {
  position: absolute; left: 12px; bottom: 12px; z-index: 2; margin: 0; max-width: calc(100% - 90px);
  padding: 6px 16px; border-radius: 99px; background: rgba(31,95,153,.92); color: #fff; font-size: 14px; pointer-events: none;
}
.vhint:empty { display: none; }
.tip {
  position: absolute; z-index: 4; pointer-events: none; padding: 3px 10px; border-radius: 6px;
  background: rgba(29,39,51,.9); color: #fff; font-size: 14px; white-space: nowrap;
}
/* 網図の図郭枠：押せる場所だと分かるよう薄い青で見せる（線の太さは拡大しても画面上で一定） */
.frame-hit { fill: rgba(31,95,153,.07); stroke: rgba(31,95,153,.6); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.frame-hit.hover { fill: rgba(31,95,153,.2); stroke: #1f5f99; stroke-width: 2.5; }
.frame-hit.flash { fill: rgba(31,95,153,.35); stroke: #1f5f99; stroke-width: 3; }
.frame-hit.nodata { fill: rgba(0,0,0,.06); stroke: rgba(0,0,0,.15); }
.nojs { position: absolute; inset: 0; margin: 0; display: flex; align-items: center; justify-content: center; background: #fff; font-size: 18px; }

/* ---- 下の注意書き ---- */
.foot {
  display: flex; gap: 4px 24px; flex-wrap: wrap; justify-content: space-between;
  padding: 6px 16px; background: var(--note); border-top: 2px solid var(--note-b); font-size: 13px;
}

/* ---- 小窓（図面番号・ご利用にあたって） ---- */
.modal { position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.45); }
.mbox {
  width: min(100%, 760px); max-height: 100%; overflow: auto; background: #fff; border-radius: 14px; padding: 20px 24px;
  display: flex; flex-direction: column; gap: 14px;
}
.mbox h2 { margin: 0; font-size: 19px; }
.mbody { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.mbody button {
  padding: 8px 6px; border-radius: 8px; border: 2px solid #7fa9cf; background: #dcebf7; font-size: 17px; font-weight: 700;
}
.mbody button:hover:not(:disabled) { background: #c4dcf0; }
.mbody.nums { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); }
.mbody button:disabled { opacity: .3; cursor: default; }
.mbody .quad { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mbody .quad button { width: min(38vw, 160px); height: 90px; font-size: 24px; }
.mfoot { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.mbtn {
  display: inline-block; min-width: 140px; padding: 9px 20px; border-radius: 99px; border: 2px solid var(--accent);
  background: #fff; color: var(--accent); font-size: 16px; font-weight: 700; text-align: center; text-decoration: none;
}
.mbtn.primary { background: var(--accent); color: #fff; }
.rbox { width: min(100%, 820px); }
.rlist { margin: 0; padding-left: 1.4em; font-size: 15px; }
.rlist li + li { margin-top: 6px; }
.rhow { margin: 0; padding: 10px 14px; border-radius: 8px; background: #eaf2fa; font-size: 15px; }

.toast {
  position: fixed; left: 50%; bottom: 72px; transform: translateX(-50%); z-index: 20; max-width: calc(100% - 32px);
  background: rgba(29,39,51,.92); color: #fff; padding: 10px 22px; border-radius: 99px; font-size: 15px;
}

/* ---- スマートフォン ---- */
@media (max-width: 640px) {
  .bar { padding: 6px 10px; gap: 6px 10px; }
  .ttl { font-size: 15px; }
  .ttl small { display: none; }
  .vtitle { font-size: 15px; }
  .tools { margin-left: 0; width: 100%; gap: 6px; }
  .tbtn { padding: 4px 10px; font-size: 13px; }
  .vguide { font-size: 13px; padding: 5px 12px; border-radius: 12px; }
  .zoom { right: 8px; }
  .zoom button { width: 42px; height: 42px; }
  .arrow.right { right: 58px; }
  .foot { padding: 4px 10px; font-size: 11px; }
  .mbox { padding: 16px; }
}
