/* style_segment_1.css
 * 
 */

 body.raingauge-page main{
    padding: 12px;
  }
  
  .rg-screen{
    padding: 12px 12px 24px;
  }
  
  .rg-block{
    margin-top: 12px;
  }
  
  /* ★サブタブ（外作業 / 内作業） */
  .rg-subtabs{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 10px 0 12px;
  }
  
  .rg-subtabs button{
    border: 1px solid #dbe6f5;
    background: #fff;
    border-radius: 12px;
    padding: 10px 12px;
    font-weight: 900;
  }
  
  .rg-subtabs button.active{
    background: #f6f8fb;
  }
  
  /* サブタブのパネル */
  .rg-panel{
    display: none;
  }
  .rg-panel.show{
    display: block;
  }
  
  /* 工程リスト */
  .rg-step-list{
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: grid;
    gap: 10px;
  }
  
  .rg-step{
    border: 1px solid #dbe6f5;
    background: #f6f8fb;
    border-radius: 12px;
    overflow: hidden;
  }
  
  .rg-step-head{
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 10px;
  }
  
  .rg-step-check{
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  .rg-step-done{
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
  }
  
  /* 工程名ボタン */
  .rg-step-open{
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
  
    border: 1px solid #dbe6f5;
    background: #fff;
    border-radius: 10px;
    padding: 8px 10px;
  
    text-align: left;
  }
  
  .rg-step-no{ font-weight: 900; }
  .rg-step-title{
    font-size: 16px;
    font-weight: 900;
  }
  
  /* 右の矢印ボタン */
  .rg-toggle{
    border: 1px solid #dbe6f5;
    background: #fff;
    border-radius: 10px;
    padding: 8px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  .rg-toggle .material-symbols-outlined{
    font-size: 20px;
    line-height: 1;
  }
  
  .rg-toggle.open .material-symbols-outlined{
    transform: rotate(180deg);
  }
  
  /* 工程が完了（取り消し線） */
  .rg-step.done .rg-step-no,
  .rg-step.done .rg-step-title{
    text-decoration: line-through;
    opacity: 0.75;
  }
  
  .rg-step.done{
    opacity: 0.92;
  }
  
  /* 展開部 */
  .rg-detail{
    border-top: 1px dashed #dbe6f5;
    padding: 10px 10px 12px;
  }
  
  .rg-hint{
    font-size: 0.9rem;
    line-height: 1.35;
    background: #ffffff;
    border: 1px solid #dbe6f5;
    border-radius: 10px;
    padding: 8px 10px;
    margin-bottom: 10px;
  }
  
  .rg-badge{
    display: inline-block;
    font-weight: 900;
    font-size: 0.78rem;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid #dbe6f5;
    background: #f6f8fb;
    margin: 0 6px;
  }
  
  /* サブ項目 */
  .rg-sublist{
    display: grid;
    gap: 8px;
    margin-bottom: 0;
  }
  
  .rg-subcheck{
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #fff;
    border: 1px solid #dbe6f5;
    border-radius: 10px;
    padding: 8px 10px;
  }
  
  .rg-subcheck input[type="checkbox"]{
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex: 0 0 auto;
  }
  
  .rg-sub-text{
    line-height: 1.35;
    flex: 1 1 auto;
  }
  
  /* サブ項目：チェックで取り消し線 */
  .rg-subcheck input[type="checkbox"]:checked + .rg-sub-text{
    text-decoration: line-through;
    opacity: 0.7;
  }
  
  /* 写真項目：カメラアイコン */
  .rg-photo{ position: relative; }
  
  .rg-camera{
    flex: 0 0 auto;
    font-size: 22px;
    line-height: 1;
    border-radius: 999px;
    padding: 4px 6px;
    border: 1px solid #ffd7a8;
    background: #fff2e0;
  }
  
  .rg-photo .rg-sub-text{
    font-weight: 800;
  }
  
  /* クリアボタン */
  .rg-actions{
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }
  
  .rg-note{
    margin: 8px 0 0;
    opacity: 0.85;
    line-height: 1.4;
  }
  
  /* obs_list.html 専用：既存CSSを壊さず、最低限だけ追加 */
  .obs-wrap{max-width:1100px;margin:0 auto;padding:10px}
  .obs-grid{display:grid;grid-template-columns:1fr;gap:10px}
  @media (min-width:900px){.obs-grid{grid-template-columns:240px 1fr}}
  .obs-card{background:#fff;border:1px solid rgba(0,0,0,.12);border-radius:10px;padding:10px}
  .obs-card h2{font-size:14px;margin:0 0 8px 0;display:flex;align-items:center;gap:6px}
  .obs-card h2 .material-symbols-outlined{font-size:18px}
  .obs-list{list-style:none;margin:0;padding:0;max-height:56vh;overflow:auto}
  .obs-list button{width:100%;text-align:left;padding:10px;border:0;background:transparent;border-radius:8px;cursor:pointer}
  .obs-list button:hover{background:rgba(0,0,0,.04)}
  .obs-list button.active{background:rgba(0,0,0,.08)}
  .obs-list .sub{font-size:12px;opacity:.7;margin-top:2px}
  .obs-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
  .obs-row .pill{font-size:12px;padding:4px 8px;border-radius:999px;background:rgba(0,0,0,.06)}
  .obs-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
  .obs-actions button{padding:8px 10px;border-radius:8px;border:1px solid rgba(0,0,0,.2);background:#fff;cursor:pointer}
  .obs-actions button:hover{background:rgba(0,0,0,.04)}
  .obs-pre{white-space:pre;overflow:auto;max-height:60vh;background:rgba(0,0,0,.04);padding:10px;border-radius:10px;border:1px solid rgba(0,0,0,.08)}
  .obs-muted{opacity:.75;font-size:12px}
  .obs-search{width:100%;padding:10px;border-radius:10px;border:1px solid rgba(0,0,0,.2);font-size:16px}
  .obs-breadcrumb{font-size:12px;opacity:.8;margin:0 0 8px 0}
  
  /* === HighWater: 計算水位カード（全体トーンに合わせる） === */
.hw-wl-card{
  border: 1px solid #9fb7d9;
  background: #e9f1fb;
  padding: 12px;
  border-radius: 12px;
  margin: 14px 0 0;
}
.hw-wl-title{
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 6px;
}
.hw-wl-row{
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.hw-wl-badge{
  display:inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #8aa8d0;
  background: #d6e5f7;
  color:#193a5f;
  font-weight:800;
  font-size: 12px;
}
.hw-wl-used{
  font-size: 18px;
  font-weight: 900;
}
.hw-calc-wl-input{
  font-size: 20px;
  font-weight: 800;
  border: 1px solid #9fb7d9;
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  width: min(260px, 100%);
}
.hw-bank-wl-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:10px;
  margin-top:12px;
}
.hw-bank-wl-panel{
  border:1px solid #b8c9e2;
  background:#f8fbff;
  border-radius:8px;
  padding:10px;
}
.hw-wl-row[hidden],
.hw-bank-wl-grid[hidden],
#wlHwMethodLabel[hidden],
#wlHwMethodRadios[hidden]{
  display:none !important;
}
.hw-bank-wl-title{
  font-size:14px;
  font-weight:900;
  margin-bottom:8px;
}
.hw-bank-base-row{
  margin-bottom:8px;
}

.hw-section-card{
  border: 1px solid #b8c6d8;
  background: #f8fafc;
  border-radius: 8px;
  padding: 12px;
  margin: 10px 0;
}
.hw-section-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.hw-section-title{
  font-size:16px;
  font-weight:800;
}
.hw-section-sub{
  margin-top:2px;
  color:#475569;
  font-size:12px;
}
.hw-section-profile{
  display:flex;
  align-items:center;
  gap:8px;
  color:#334155;
  font-size:12px;
  font-weight:700;
}
.hw-section-profile select{
  min-width:120px;
  border:1px solid #b8c6d8;
  border-radius:8px;
  padding:7px 10px;
  background:#fff;
  font-size:14px;
}
.hw-section-head-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.hw-section-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  padding:0;
  border:1px solid #b8c6d8;
  border-radius:8px;
  background:#fff;
  color:#334155;
}
.hw-section-toggle .material-symbols-outlined{
  font-size:22px;
  line-height:1;
  transition:transform 0.22s ease;
}
.hw-section-toggle.is-open .material-symbols-outlined{
  transform:rotate(180deg);
}
.hw-section-body{
  display:grid;
  grid-template-rows:0fr;
  opacity:0;
  transition:grid-template-rows 0.22s ease, opacity 0.18s ease;
}
.hw-section-body.is-open{
  grid-template-rows:1fr;
  opacity:1;
}
.hw-section-body-inner{
  min-height:0;
  overflow:hidden;
}
.hw-section-preview-wrap{
  margin-top:10px;
  border:1px solid #cbd5e1;
  background:#fff;
  border-radius:6px;
  overflow:hidden;
}
.hw-section-preview{
  display:block;
  width:100%;
  height:auto;
  min-height:180px;
}
.hw-section-note{
  margin-top:8px;
  color:#334155;
  font-size:12px;
  line-height:1.5;
}
.hw-section-range-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:10px;
  margin-top:10px;
}
.hw-section-range-field{
  display:flex;
  flex-direction:column;
  gap:4px;
  font-size:12px;
  font-weight:700;
  color:#334155;
}
.hw-section-range-field input{
  width:100%;
  font-size:16px;
  border:1px solid #b8c6d8;
  border-radius:8px;
  padding:8px 10px;
  background:#fff;
}
.hw-section-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
}
.hw-section-actions button{
  border:1px solid #b8c6d8;
  background:#fff;
  border-radius:8px;
  padding:8px 10px;
  font-weight:700;
}
.hw-row-bank{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:13px;
  font-weight:700;
}
.hw-row-bank label{
  display:inline-flex;
  align-items:center;
  gap:4px;
  white-space:nowrap;
}
@media (max-width: 520px){
  .hw-bank-wl-grid,
  .hw-section-range-grid{
    grid-template-columns:1fr;
  }
}

/* === HighWater: 出力テーブルをヘッダー基準で詰める（indexを壊さない） === */
body.highwater-page #qavTableWrapper.qav-main-scroll{
  overflow-x: auto;
}

body.highwater-page #qavTableWrapper .qav-main-table{
  width: max-content;     /* 余白で伸びない */
  table-layout: auto;     /* 内容に合わせる */
}

body.highwater-page #qavTableWrapper .qav-main-table th,
body.highwater-page #qavTableWrapper .qav-main-table td{
  white-space: nowrap;    /* ヘッダー折返しで幅が暴れない */
}

.obs-shell{padding:10px}
.obs-toprow{display:flex; gap:8px; align-items:center; margin:8px 0 10px}
.obs-back{display:none; align-items:center; gap:6px; padding:8px 10px; border-radius:10px}
.obs-back.show{display:inline-flex}
.obs-crumb{font-size:12px; opacity:.8}
.obs-panels-outer{overflow:hidden; border-radius:14px}
.obs-panels{display:flex; width:400%; will-change:transform; transition:transform .22s ease}
.obs-panel{flex:0 0 25%; padding:10px}
/* パネル内の上下をそろえる */
.obs-panel h2{margin:0 0 8px; font-size:16px}
/* 既存の .obs-card / .obs-list 等がある想定。無い場合でも最低限崩れないように */

/* === obs_list: サーバー画像プレビュー（追加） === */
.obs-img-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
@media (min-width: 700px){
  .obs-img-grid{ grid-template-columns: repeat(5, 1fr); }
}
.obs-thumb{
  border: 1px solid rgba(0,0,0,.15);
  background: #fff;
  border-radius: 0;
  padding: 0;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  cursor: pointer;
}
.obs-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* モーダル（全画面表示） */
.obs-img-modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  display: none;
  z-index: 9999;
}
.obs-img-modal.show{ display: block; }

/* 画像表示領域：縦いっぱい、横にあふれた分はスクロール */
.obs-img-viewer{
  position: absolute;
  inset: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.obs-img-viewer-inner{
  height: 100%;
  display: inline-flex;
  align-items: stretch;
}
.obs-img-full{
  height: 100%;
  width: auto;
  max-width: none;
  max-height: none;
  border-radius: 0;
  background: #fff;
  display: block;
}
.obs-img-close{
  position: fixed;
  top: 10px;
  right: 10px;
  border: 0;
  background: rgba(255,255,255,.9);
  border-radius: 0;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.obs-img-close .material-symbols-outlined{
  font-size: 24px;
  line-height: 1;
}

.obs-img-caption{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  color: #fff;
  font-size: 13px;
  opacity: .95;
  text-align: center;
  word-break: break-all;
  background: rgba(0,0,0,.35);
  pointer-events: none;
}
body.obs-modal-open{ overflow: hidden; }


.obs-img-close{ z-index: 10000; }
