* { box-sizing: border-box; }
body {
  font-family: "Yu Gothic UI", "Meiryo", sans-serif;
  margin: 0; background: #f4f6f8; color: #222; font-size: 14px;
}
header { background: #1f4e79; color: #fff; padding: 14px 24px; }
header h1 { margin: 0 0 4px; font-size: 20px; }
header p { margin: 0; font-size: 12px; opacity: .85; }
footer { padding: 12px 24px; font-size: 12px; color: #a00; }

.panel {
  background: #fff; margin: 16px 24px; padding: 16px 20px;
  border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.panel h2 { margin: 0 0 12px; font-size: 16px; color: #1f4e79; }
.hint { font-size: 12px; color: #666; }
/* 機器番号の規則 */
.naming-box { margin: 8px 0; font-size: 12px; }
.naming-box > summary { cursor: pointer; color: #1f4e79; font-weight: bold; }
.naming-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 8px; }
.naming-row label { display: flex; flex-direction: column; gap: 2px; font-size: 11px; }
.naming-row input { width: 64px; font-size: 12px; padding: 2px 4px; }
.naming-row input#nm-sep { width: 34px; }
.naming-note { font-size: 11px; color: #888; align-self: center; }
.req { color: #c00; font-size: 11px; }

/* 導入部: ①新規 / ②継続 の2分岐カード */
.intro-branches { display: flex; gap: 18px; flex-wrap: wrap; align-items: stretch; margin: 10px 0 4px; }
.intro-card { flex: 1 1 380px; min-width: 320px; display: flex; flex-direction: column;
  border: 1px solid #cdd6e0; border-radius: 8px; background: #fafbfd; padding: 14px 16px; }
.intro-card-h { font-size: 15px; font-weight: bold; color: #1f4e79; margin-bottom: 10px;
  border-bottom: 1px solid #dce3ec; padding-bottom: 8px; }
.intro-num { display: inline-block; background: #1f4e79; color: #fff; border-radius: 50%;
  width: 24px; height: 24px; line-height: 24px; text-align: center; font-size: 14px; margin-right: 6px; }
.intro-steps { flex: 1 1 auto; }
.intro-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; margin-bottom: 12px; }
.intro-field input[type=number], .intro-field select { font-size: 13px; padding: 4px 6px; max-width: 320px; }
.intro-field input[type=file] { font-size: 12px; }
.intro-field select#intro-server-list { min-width: 260px; }
.intro-lead { font-size: 12px; color: #444; margin: 0 0 12px; }
.intro-go { width: 100%; margin-top: 12px; font-size: 14px; padding: 11px 18px; }
.intro-card .naming-box { margin: 4px 0 12px; }

.form-row { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-end; }
.form-row label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
input[type=file] { font-size: 12px; }
/* 90px幅は入力フォームの数値だけに限定（表のセル入力は .wN クラスで詰める） */
.form-row input[type=number] { width: 90px; }

button {
  padding: 8px 18px; border: none; border-radius: 5px;
  cursor: pointer; font-size: 14px; font-weight: bold;
}
button.primary { background: #1f4e79; color: #fff; }
button.accent { background: #1e7e34; color: #fff; }
button:hover { opacity: .88; }

.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
button.ghost { background: #eef1f4; color: #1f4e79; border: 1px solid #c3ccd6; }
button.save { background: #b8860b; color: #fff; }
button.danger { background: #c62828; color: #fff; font-weight: 600; }
button.danger:hover { background: #a61f1f; }

/* 保存バー */
.savebar {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  background: #f3f6fa; border: 1px solid #dde4ec; border-radius: 6px;
  padding: 7px 12px; margin-bottom: 12px; font-size: 12px;
}
.savebar-label { font-weight: bold; color: #1f4e79; }
.savebar-sep { color: #bbb; }
.savebar-server { background: #eef5f0; border-color: #cfe3d6; }
.savebar-server .savebar-label { color: #1e7e34; }
#server-info { font-size: 11px; color: #1e7e34; margin-left: auto; }
button:disabled { opacity: .45; cursor: not-allowed; }
.savebar input, .savebar select { font-size: 12px; padding: 3px 6px;
  border: 1px solid #c3ccd6; border-radius: 4px; }
.savebar button { padding: 5px 12px; font-size: 12px; }
#save-info { font-size: 11px; color: #888; margin-left: auto; }

/* 復元バナー */
#restore-banner {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  background: #fff8e1; border: 1px solid #e0c87a; border-radius: 6px;
  padding: 8px 14px; margin-bottom: 12px; font-size: 13px;
}
#restore-banner button { padding: 5px 14px; font-size: 12px; }
#filter-info { font-size: 12px; color: #1e7e34; font-weight: bold; }
#status { font-size: 13px; color: #1f4e79; }
#status.err, .err { color: #c00; font-weight: bold; }
.ok { color: #1e7e34; font-weight: bold; }

#zone-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.zone-card {
  border: 1px solid #bbb; border-radius: 6px; padding: 6px 10px;
  font-size: 12px; line-height: 1.5;
}
.zone-card.ng { border: 2px solid #c00; }
.zone-name-input {
  width: 100%; font-weight: bold; font-size: 13px; color: #1f4e79;
  border: 1px solid #b9c4d0; border-radius: 3px; padding: 1px 4px;
  margin-bottom: 3px; background: rgba(255,255,255,.7);
}
.zone-name-input:focus { background: #fff; outline: 2px solid #1f4e79; }
.zone-card .zc-meta { font-size: 11px; color: #555; margin-bottom: 2px; }
.zone-card .zc-eqs { margin: 3px 0 2px; display: flex; flex-wrap: wrap; gap: 3px; }
.zone-card .zc-eq { display: inline-block; background: rgba(31,78,121,.12); border: 1px solid #9fb3c8;
  border-radius: 8px; padding: 0 6px; font-size: 10.5px; color: #1f4e79; font-weight: 600; }
.zone-card .zc-eq.zc-none { background: rgba(0,0,0,.05); border-color: #ccc; color: #888; font-weight: normal; }
.zone-card .zone-supply-sel { width: 100%; font-size: 11px; padding: 1px 2px; margin-top: 2px;
  border: 1px solid #b9c4d0; border-radius: 3px; background: rgba(255,255,255,.8); color: #1f4e79; }

.table-wrap { overflow-x: auto; max-height: 124vh; overflow-y: auto; }
table { border-collapse: collapse; font-size: 12px; }
/* スプレッドシートが横長化したため室テーブルのみ文字を1pt縮小（読取セル・ヘッダ） */
#room-table { font-size: 11px; }
#room-table thead #head-row th {
  background: #1f4e79; color: #fff; padding: 4px 6px;
  position: sticky; top: 0; z-index: 3; font-weight: normal; white-space: nowrap;
}
#room-table thead #filter-row th {
  background: #e8eef5; padding: 1px 3px; position: sticky; top: 28px; z-index: 3;
  border: 1px solid #ccc;
}
#room-table thead #filter-row .filter-in {
  width: 100%; min-width: 36px; font-size: 10px; padding: 1px 2px;
  border: 1px solid #b9c4d0; border-radius: 3px; background: #fff;
}
#room-table td { border: 1px solid #ccc; padding: 1px 3px; white-space: nowrap; }
#room-table td.ro { text-align: right; color: #333; padding-right: 5px; }
#room-table td.c { text-align: center; }
#room-table td.decided { font-weight: bold; }
#room-table td.path { text-align: left; color: #1f4e79; }
#room-table tr.excluded td { color: #999; }
/* 読取専用セルは内容ぴったり幅に */
#room-table td.ro, #room-table td.c, #room-table td.vt { white-space: nowrap; }

.e { box-sizing: border-box; border: 1px solid #d8d8d8; border-radius: 3px;
  padding: 1px 2px; font-size: 11px; background: rgba(255,255,255,.75); }
/* 数値入力のスピンボタンを消して余白を詰める */
.e[type=number] { -moz-appearance: textfield; }
.e[type=number]::-webkit-outer-spin-button,
.e[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.w3 { width: 34px; } .w4 { width: 42px; } .w5 { width: 52px; }
.w8 { width: 104px; } .w10 { width: 128px; }
#room-table td.vt { font-weight: bold; color: #1f4e79; }
.type-sel { width: 54px; }
/* 複数セル選択（一斉上書き対象） */
#room-table td.bulk-sel { outline: 2px solid #1f4e79; outline-offset: -2px; background: #dbe7f5 !important; }
#bulk-info { font-size: 12px; color: #b8860b; font-weight: bold; }
/* 法定基準[m3/h]列の下段のN値セレクタ（フィルタ行） */
#filter-row .legal-n-sel { color: #1f4e79; font-weight: bold; }
/* 数値の読取セルは右寄せで詰める */
#room-table { table-layout: auto; }

/* 換気必要箇所(spot)の子行 */
#room-table tr.spot-row td { background: #f7f7f7; color: #555; }
.spot-mark { color: #b8860b; font-weight: bold; margin-right: 2px; }
.spot-note { font-size: 11px; color: #999; font-style: italic; }
.spot-zone { color: #999; font-size: 11px; }
.name-cell { white-space: nowrap; }
.room-id { display: inline-block; min-width: 18px; margin-right: 3px; padding: 0 3px;
  background: #1f4e79; color: #fff; border-radius: 3px; font-size: 10px; text-align: center; }
.addspot-btn {
  font-size: 10px; font-weight: normal; padding: 0 5px; margin-left: 4px;
  background: #e8f3ea; color: #1e7e34; border: 1px solid #9ccfa8; border-radius: 3px;
}
.delspot-btn {
  font-size: 12px; font-weight: bold; padding: 0 6px; margin-left: 4px;
  background: #fbe4e4; color: #b00; border: 1px solid #e0a0a0; border-radius: 3px;
}

/* ゾーン間 空気移流（階別） */
#transfer-panel { margin-top: 18px; border-top: 2px solid #1f4e79; padding-top: 10px; }
#transfer-panel h3 { color: #1f4e79; font-size: 15px; margin: 0 0 4px; }
/* 階カードを段組み(マルチカラム)で多段に密に並べる＝縦スクロール解消・段差なし */
#transfer-floors { column-width: 340px; column-gap: 14px; }
.tz-floor { border: 1px solid #cdd6e0; border-radius: 6px; padding: 6px 8px; margin: 0 0 10px;
  background: #fafbfd; break-inside: avoid; -webkit-column-break-inside: avoid;
  display: inline-block; width: 100%; box-sizing: border-box; vertical-align: top; }
.tz-head { font-weight: bold; font-size: 12px; color: #1f4e79; margin-bottom: 4px; }
.tz-head .tz-auto { margin-left: 8px; font-size: 10.5px; font-weight: normal; padding: 1px 8px;
  background: #eef1f4; color: #1f4e79; border: 1px solid #c3ccd6; border-radius: 4px; }
.tz-table { border-collapse: collapse; font-size: 11px; margin-bottom: 5px; width: 100%; }
.tz-table th, .tz-table td { border: 1px solid #ccc; padding: 1px 5px; line-height: 1.35; }
.tz-table th { background: #e8eef5; font-weight: normal; }
.tz-table td.r { text-align: right; } .tz-table td.b { font-weight: bold; }
.tz-table tr.tz-ok td.b { color: #1e7e34; }
.tz-table tr.tz-short td.b { color: #c00; }
.tz-table tr.tz-push td.b { color: #b8860b; }
.tz-add { font-size: 11px; display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.tz-add select, .tz-add input { font-size: 11px; padding: 1px 3px; }
.tz-add-btn { font-size: 11px; padding: 2px 10px; background: #1f4e79; color: #fff; border: none; border-radius: 4px; }
.tz-chip { display: inline-block; background: #eef5f0; border: 1px solid #b9d0c0; border-radius: 10px;
  padding: 1px 4px 1px 8px; margin-left: 4px; font-size: 10.5px; }
.tz-del { border: none; background: none; color: #c00; cursor: pointer; font-weight: bold; }

/* ダクトルート素案: 端末オブジェクト */
.oa-note { font-size: 11px; color: #1e7e34; align-self: center; }
.overlay-warn {
  background: #fdecea; border: 1px solid #e0a0a0; border-radius: 6px;
  color: #b00; font-size: 12px; font-weight: bold; line-height: 1.6;
  padding: 8px 12px; margin: 8px 0;
}
#objs-table .objs-head th { background: #eef5f0; font-size: 11px; padding: 3px 8px; }
#objs-table .obj-link { font-size: 11px; }

/* 経路セル: ドロップダウン＋A室ボタン */
.path-cell { white-space: nowrap; }
.path-sel { max-width: 168px; font-size: 10px; }
.aroom-btn {
  font-size: 11px; font-weight: normal; padding: 1px 6px; margin-left: 3px;
  background: #fff3cd; color: #7a5b00; border: 1px solid #d8c270; border-radius: 3px;
}
.aroom-btn.aroom-warn { background: #f8d7da; color: #c0392b; border-color: #e08; font-weight: bold; }

/* A室選択ポップオーバー */
#aroom-popover {
  position: fixed; z-index: 200; width: 260px; max-height: 70vh;
  background: #fff; border: 1px solid #888; border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,.25); display: flex; flex-direction: column;
}
#aroom-popover .ap-head {
  background: #1f4e79; color: #fff; font-size: 12px; padding: 6px 10px;
  border-radius: 6px 6px 0 0;
}
#aroom-list { overflow-y: auto; padding: 6px 10px; }
.ap-item { display: block; font-size: 12px; padding: 2px 0; cursor: pointer; }
.ap-item .ap-zone { color: #888; font-size: 11px; }
.ap-empty { font-size: 12px; color: #a00; padding: 8px 0; }
.ap-foot { padding: 6px 10px; border-top: 1px solid #ddd; text-align: right; }
.ap-foot button { padding: 4px 14px; font-size: 12px; }

#pdf-frame { width: 100%; height: 78vh; border: 1px solid #ccc; background: #fff; }
.dl {
  font-size: 13px; margin-left: 14px; color: #1e7e34;
  text-decoration: none; font-weight: bold;
}
.dl:hover { text-decoration: underline; }

/* ダクトルート素案: 3表の横並びレイアウト（階フィルタ付き） */
/* 3列を同じ高さに伸ばし、表の枠を下端で揃える＝上端も揃って段差解消 */
.tri-wrap { display: flex; gap: 18px; align-items: stretch; flex-wrap: wrap; margin-top: 4px; }
.tri-col { flex: 1 1 380px; min-width: 340px; display: flex; flex-direction: column; }
.tri-col h4.assign-h { margin-top: 4px; }
.tri-scroll { height: 440px; margin-top: auto; overflow: auto; border: 1px solid #e0e6ee; }
.tri-scroll table { width: 100%; border-collapse: collapse; margin-bottom: 0; }
.tri-scroll tr.assign-head th, .tri-scroll tr.objs-head th {
  position: sticky; top: 0; z-index: 2;
}
/* 3表のセル統一（高さ・罫線・ヘッダ色）。ID指定で従来の個別スタイルを上書き */
.tri-scroll #objs-table td, .tri-scroll #assign-table td, .tri-scroll #vcmode-table td,
.tri-scroll #objs-table th, .tri-scroll #assign-table th, .tri-scroll #vcmode-table th {
  border: 1px solid #ccc; padding: 2px 8px; font-size: 11.5px;
  height: 26px; box-sizing: border-box; line-height: 1.4;
  white-space: nowrap;   /* 折返し禁止＝全行同じ高さ（はみ出しは横スクロール） */
}
.tri-scroll .riser-floor { width: 56px; }   /* ライザーの階範囲(from〜to)を1行に収める */
.tri-scroll .obj-name-edit { width: 120px; text-align: left; }   /* ガラリ・ライザー名称の編集 */
.tri-scroll #assign-table td.assign-rooms { max-width: 200px; overflow: hidden; text-overflow: ellipsis; }   /* 所属室名は省略表示＋ツールチップ全文 */
.tri-scroll #objs-table th, .tri-scroll #assign-table th, .tri-scroll #vcmode-table th {
  background: #ddebf7; font-weight: normal; font-size: 11px; text-align: center;
}
.tri-scroll #vcmode-table td.r, .tri-scroll #objs-table td.r, .tri-scroll #assign-table td.r { text-align: right; }
.tri-scroll select, .tri-scroll input[type="number"], .tri-scroll input[type="text"] {
  font-size: 11px; padding: 1px 3px; height: 20px; box-sizing: border-box;
  border: 1px solid #c3ccd6; border-radius: 3px; vertical-align: middle;
}
.tri-scroll .delobj-btn, .tri-scroll button { height: 20px; padding: 0 8px; font-size: 11px; line-height: 1; }

/* 機器リスト・静圧計算（最下部） */
#units-panel { margin-top: 18px; border-top: 2px solid #e0e6ee; padding-top: 12px; }
#units-panel > h3 { font-size: 15px; color: #1f4e79; margin: 0 0 4px; }
.sp-wrap { overflow-x: auto; border: 1px solid #e0e6ee; margin-bottom: 10px; }
.sp-table { border-collapse: collapse; font-size: 11px; white-space: nowrap; }
.sp-table th, .sp-table td { border: 1px solid #ccc; padding: 1px 5px; text-align: center; }
.sp-table th { background: #ddebf7; font-weight: normal; line-height: 1.2; }
.sp-table th.sp-filt { background: #eaf5ea; }
.sp-table th.sp-dec, .sp-table td.sp-dec { background: #1f4e79; color: #fff; }
.sp-table td.sp-dec.b { font-weight: 700; }
.sp-table th.sp-motor, .sp-table td.sp-motor { background: #1e7e34; color: #fff; }
.sp-table td.sp-motor.b { font-weight: 700; }
.sp-table td.sp-motor input { background: #fff; color: #1e7e34; font-weight: 700; text-align: right; }
.sp-table td.sp-motor input.sp-auto { color: #7a7a7a; font-weight: normal; font-style: italic; }
.sp-table td.r { text-align: right; color: #333; }
.sp-table td:first-child { text-align: left; font-weight: 600; }
.sp-table input { width: 34px; font-size: 11px; padding: 1px 2px; text-align: right; border: 1px solid #c3ccd6; border-radius: 3px; }
.sp-table input.sp-cnt::placeholder { color: #ccc; }
.sp-table td.sp-txt { text-align: left; max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.sp-table th.sp-sortkey:hover { background: #cfe0f0; }
.sp-table input.sp-sel { background: #d7ebff; outline: 1px solid #1f6fb2; }
#sp-rates-box { margin: 0; }

/* 外気処理・生外気 建物集計 */
.oa-summary { margin-top: 16px; }
.oa-summary h3 { font-size: 14px; color: #1f4e79; margin: 0 0 6px; }
.oa-sum-table { border-collapse: collapse; min-width: 340px; }
.oa-sum-table td, .oa-sum-table th {
  border: 1px solid #ccc; padding: 4px 12px; font-size: 12px;
}
.oa-sum-table th { background: #ddebf7; }
.oa-sum-table td.r { text-align: right; }
.oa-sum-table tr.oa-ind td:first-child { padding-left: 22px; color: #444; }
.oa-sum-table tr.oa-sum-total td { background: #eef4fb; font-weight: 600; }
.oa-sum-table tr.oa-sum-ref td { color: #888; font-style: italic; }
.oa-sum-table tr.oa-sum-grand td { background: #1f4e79; color: #fff; font-weight: 700; }

.units-wrap { display: flex; gap: 32px; margin-top: 16px; flex-wrap: wrap; }
.units-wrap h3 { font-size: 14px; color: #1f4e79; margin: 0 0 6px; }
.units-wrap table td, .units-wrap table th {
  border: 1px solid #ccc; padding: 3px 10px; font-size: 12px;
}
.units-wrap table th { background: #ddebf7; }
.units-wrap td.r { text-align: right; }

/* OA/EA点・ダクトルート素案 */
#overlay-panel { margin-top: 18px; border-top: 2px solid #e0e6ee; padding-top: 12px; }
#overlay-panel h3 { font-size: 14px; color: #1f4e79; margin: 0 0 4px; }
.oa-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.oa-form input[type=number] { width: 70px; }
.oa-form input, .oa-form select { font-size: 12px; padding: 4px 6px;
  border: 1px solid #c3ccd6; border-radius: 4px; }
.oa-form label { font-size: 12px; color: #555; display: flex; gap: 4px; align-items: center; }
#objs-table, #assign-table { border-collapse: collapse; font-size: 12px; margin-bottom: 8px; }
#objs-table td, #assign-table td, #assign-table th { border: 1px solid #ccc; padding: 3px 10px; }
#objs-table td.r, #assign-table td.r { text-align: right; }
#objs-table .delobj-btn { padding: 1px 8px; font-size: 11px; }
.assign-h { font-size: 13px; color: #1f4e79; margin: 10px 0 4px; }
#assign-table .assign-head th { background: #ddebf7; }
#assign-table select { font-size: 11px; padding: 2px 4px; border: 1px solid #c3ccd6; border-radius: 3px; }
#objs-table th { border: 1px solid #ccc; padding: 3px 8px; background: #ddebf7; font-weight: normal; }
#objs-table .xy-edit { width: 60px; font-size: 11px; padding: 1px 3px; text-align: right;
  border: 1px solid #c3ccd6; border-radius: 3px; }
#duct-route-preview { border: 1px solid #d8d8d8; border-radius: 4px; margin: 6px 0 14px;
  overflow: auto; background: #fff; min-height: 40px; }
#duct-route-preview svg { display: block; }
#preview-legend { margin: 4px 0; }

/* ===== ゾーニング・マップ（拾い図でゾーン指定） ===== */
#zonemap-panel { margin-top: 18px; border-top: 2px solid #e0e6ee; padding-top: 12px; }
#zonemap-panel h3 { font-size: 14px; color: #1f4e79; margin: 0 0 4px; }
#zonemap-panel .zm-file { font-size: 12px; }
#zonemap-panel .zm-file input { font-size: 11px; }
#zonemap-wrap { position: relative; border: 1px solid #d8d8d8; border-radius: 4px;
  margin: 6px 0 6px; overflow: auto; background: #fff; line-height: 0; text-align: center; }
#zonemap-img { display: block; max-width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
/* SVGは aspect-ratio(=図面の比率)で高さが決まり、max-width(=82vh×比率)で縦82vh相当に収める。
   高さのみのクランプ(max-height)だと幅が残って横に伸びるため、幅側で制限して比率を常に保持 */
#zonemap-svg { display: block; width: 100%; height: auto; margin: 0 auto; }
body.zm-placing #zonemap-svg { cursor: crosshair; }
.place-btn { font-size: 11px; padding: 0 4px; margin-left: 2px; background: #eef3fb;
  border: 1px solid #b9c4d0; border-radius: 3px; cursor: pointer; }
#zonemap-empty { padding: 24px; line-height: 1.5; }
#zonemap-svg .zm-room { cursor: pointer; }
#zonemap-svg .zm-room.sel circle { stroke: #d62828; stroke-width: 2.2; }
#zonemap-svg text { user-select: none; pointer-events: none; }
#zm-selbox { fill: rgba(31,78,121,.12); stroke: #1f4e79; stroke-dasharray: 4 3; stroke-width: 1.2; }
/* 平面マーカーのホバー室名ポップアップ */
#marker-popup { position: fixed; z-index: 9999; pointer-events: none;
  background: rgba(28,45,66,.96); color: #fff; font-size: 11px; line-height: 1.4;
  padding: 4px 9px; border-radius: 5px; box-shadow: 0 2px 10px rgba(0,0,0,.35); max-width: 240px; }
#marker-popup b { display: block; font-size: 12px; }
#marker-popup span { display: block; opacity: .85; }
#marker-popup[hidden] { display: none; }
#zm-calib-pick { background: #fff7e6; border: 1px solid #f0c674; border-radius: 4px; padding: 6px 10px; }
#zm-calib.calibrating { background: #c0392b; }
.zm-fit-grp { font-size: 11px; color: #444; display: inline-flex; align-items: center; gap: 2px; }
.zm-fit-grp button { padding: 2px 8px; font-size: 12px; min-width: 26px; }

/* hidden 属性を確実に効かせる（.oa-form 等の display:flex が [hidden] を上書きするのを防ぐ） */
[hidden] { display: none !important; }

/* 給気ダンパー系統(VAV/CAV)列: 非OHU室の "—" を淡色で */
.muted { color: #aaa; }

/* 座標編集モード: X/Y列は通常隠し、body.xy-mode でのみ表示（ヘッダ/フィルタ/行で同期） */
#room-table .xy-col { display: none; }
body.xy-mode #room-table .xy-col { display: table-cell; }
body.xy-mode #btn-xy-mode { background: #1f4e79; color: #fff; }

/* 系統ペイントモード: 起動中ボタンの強調・塗ったセル・カーソル */
.table-tools button.active { background: #1f6fb2; color: #fff; border-color: #1a5c96; box-shadow: 0 0 0 2px #cfe3f5; }
#room-table input.sys-paint { background: #ffe08a; outline: 1px solid #e0a800; }
body.sys-mode #room-table input.sa-sys,
body.sys-mode #room-table input.ex-sys { cursor: pointer; }
body.sys-mode #room-table input.sa-sys:hover,
body.sys-mode #room-table input.ex-sys:hover { background: #fff3c4; }

/* エアハン外気・吹出条件 入力テーブル */
#ahu-cond-panel { margin: 6px 0 4px; }
.ahu-cond-table { border-collapse: collapse; font-size: 11px; }
.ahu-cond-table th, .ahu-cond-table td { border: 1px solid #c3ccd6; padding: 2px 3px; text-align: center; }
.ahu-cond-table th { background: #eef3f8; color: #1f4e79; font-weight: bold; }
.ahu-cond-table td.ac-sym { background: #f7f9fb; font-weight: bold; white-space: nowrap; text-align: left; }
.ahu-cond-table td.ac-sep { border-left: 2px solid #1f4e79; }
.ahu-cond-table input { text-align: center; }
.ahu-cond-table tr.ac-common td { background: #eef3f8; }
.ahu-cond-table tr.ac-common td.ac-sym { background: #dbe7f5; }
.ahu-cond-table input.ac-sel { outline: 2px solid #1f4e79; outline-offset: -2px; background: #dbe7f5; }

/* パス押出先0室チェック: 未割当の行を強調・件数チップ */
#room-table tr.pass-hl td { background: #f8d7da !important; }
#room-table tr.pass-hl td:first-child { box-shadow: inset 3px 0 0 #c0392b; }
#pass-info { font-size: 12px; color: #c0392b; font-weight: bold; margin-left: 6px; }
