/* ==========================================================================
   app.css — 建築物の振動測定結果解析プログラム 固有スタイル
   共通スタイルは同フォルダ上位の common.css / common-print.css（同梱方式）
   ========================================================================== */
  /* ====================================================================
     アプリ固有スタイル（共通スタイルは common.css 側で定義済）
     ==================================================================== */

  /* 左ペインを本アプリ用に少し広く（入力項目が多いため） */
  :root { --layout-left-width: 500px; --layout-left-min: 420px; }

  /* ヘッダの英語名称（和名に併記） */
  .app-header h1 .app-name-en { font-size: 0.55em; font-weight: normal; color: var(--color-text-muted); margin-left: 0.6em; letter-spacing: 0.03em; }

  /* --- 時刻歴データ貼付 --- */
  #rawData {
    width: 100%; height: 120px; font-family: var(--font-mono); font-size: 11px;
    border: 1px solid #bbb; border-radius: var(--input-radius); padding: 4px 6px;
    resize: vertical; white-space: pre; overflow: auto;
  }
  .paste-hint { font-size: 10.5px; color: var(--color-text-muted); line-height: 1.5; margin: 3px 0 0 0; }
  .data-stat {
    font-size: 11px; background: var(--color-primary-pale); border: 1px solid var(--color-border);
    border-radius: var(--input-radius); padding: 4px 8px; margin-top: 5px; line-height: 1.6;
  }
  .data-stat.bad { background: #fff5f5; border-color: #fbc; }

  /* --- センサ配置テーブル --- */
  .sens-tab-bar { display: flex; margin: 2px 0 6px 0; border-bottom: 2px solid #aaa; }
  .sens-tab {
    padding: 4px 12px; font-size: 11.5px; cursor: pointer; background: #eee;
    border: 1px solid #aaa; border-bottom: none; margin-right: 2px; border-radius: 4px 4px 0 0;
  }
  .sens-tab.active { background: #fff; border-bottom: 2px solid #fff; margin-bottom: -2px; font-weight: bold; }

  table.sens-table { font-size: 11px; margin-top: 0; }
  table.sens-table th, table.sens-table td { padding: 1px 3px; text-align: center; }
  table.sens-table th { font-size: 10.5px; line-height: 1.25; }
  table.sens-table input[type="number"], table.sens-table input[type="text"] {
    width: 100%; min-width: 42px; padding: 1px 3px; font-size: 11px; border: 1px solid #ccc;
  }
  table.sens-table select { width: 100%; min-width: 46px; padding: 1px 2px; font-size: 11px; border: 1px solid #ccc; }
  table.sens-table td.name-cell { text-align: left; }
  table.sens-table tr.sens-off > td { background: #f0f0f0; color: #999; }

  /* --- 卓越振動数（モード選択）テーブル --- */
  table.selfreq-table { font-size: 11.5px; }
  table.selfreq-table td, table.selfreq-table th { padding: 2px 4px; text-align: center; }
  table.selfreq-table input[type="number"] { width: 78px; padding: 1px 3px; font-size: 11.5px; }
  table.selfreq-table button {
    padding: 0; margin: 0 1px; width: 22px; height: 19px; font-size: 12px; line-height: 1;
    border-radius: 3px; border: 1px solid #a01818; background: #c92a2a;
  }
  table.selfreq-table button:hover { background: #a01818; }

  /* --- 結果グラフ --- */
  .chart-wrap { background: #fff; border: 1px solid var(--color-border-soft); border-radius: 3px; padding: 4px; margin-bottom: 8px; }
  .chart-wrap svg { display: block; width: 100%; height: auto; }
  .chart-title { font-size: 11.5px; font-weight: bold; color: var(--color-primary); margin: 2px 0 2px 4px; }
  .chart-ctrl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11px; color: var(--color-text-muted); margin-bottom: 4px; }
  .chart-ctrl label { display: inline-flex; align-items: center; gap: 3px; }
  .chart-ctrl input[type="number"] { width: 68px; }
  .pick-hint { font-size: 10.5px; color: #1a3c5e; background: var(--color-primary-pale); border-left: 3px solid var(--color-primary); padding: 3px 7px; margin-bottom: 5px; }

  /* --- モード形状図 --- */
  .shape-grid { display: flex; flex-wrap: wrap; gap: 8px; }
  .shape-cell { border: 1px solid var(--color-border-soft); border-radius: 3px; padding: 4px; background: #fff; }
  .shape-cell .shape-cap { font-size: 10.5px; text-align: center; color: var(--color-text-muted); line-height: 1.35; }
  .shape-cell .shape-cap b { color: var(--color-primary); font-size: 11.5px; }

  /* --- アニメーション --- */
  #animStage { background: #fbfcfe; border: 1px solid var(--color-border-soft); border-radius: 3px; text-align: center; }
  #animStage svg { display: block; margin: 0 auto; }
  #animStage { cursor: grab; touch-action: none; user-select: none; }
  #animStage.dragging { cursor: grabbing; }
  .anim-ctrl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11.5px; margin-bottom: 6px; }
  .anim-ctrl input[type="range"] { width: 110px; vertical-align: middle; }
  .anim-ctrl .val { display: inline-block; min-width: 40px; text-align: right; color: var(--color-text-muted); font-family: var(--font-mono); }
  .anim-readout { font-size: 11px; color: var(--color-text-muted); margin-top: 4px; font-family: var(--font-mono); }

  /* --- MAC 行列 --- */
  table.mac-table td { text-align: center; font-family: var(--font-mono); font-size: 11px; }

  /* --- 手法バッジ --- */
  .mth { display: inline-block; padding: 0 5px; border-radius: 3px; font-size: 10px; font-weight: bold; color: #fff; }
  .mth.fdd  { background: #2b5797; }
  .mth.efdd { background: #1e7e20; }
  .mth.ssi  { background: #a0522d; }
  .mth.ema  { background: #7b2d8e; }

  /* --- 進捗オーバーレイ --- */
  #progOverlay {
    display: none; position: fixed; inset: 0; background: rgba(255,255,255,0.86); z-index: 200;
    justify-content: center; align-items: center;
  }
  #progOverlay.active { display: flex; }
  #progOverlay .prog-box {
    background: #fff; border: 2px solid var(--color-primary); border-radius: 6px;
    padding: 18px 26px; width: 420px; max-width: 90vw; box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  }
  #progOverlay .prog-title { font-size: 14px; font-weight: bold; color: var(--color-primary); margin-bottom: 8px; }
  #progOverlay .prog-msg { font-size: 12px; color: var(--color-text-muted); min-height: 2.6em; line-height: 1.3; }
  #progOverlay .prog-bar-bg { background: #e6e8f0; border-radius: 4px; height: 12px; margin: 8px 0 4px 0; overflow: hidden; }
  #progOverlay .prog-bar { background: var(--color-primary); height: 100%; width: 0%; transition: width 0.12s linear; }
  #progOverlay .prog-pct { font-size: 11px; color: var(--color-text-faint); text-align: right; }

  /* --- 解析手法 mode-bar --- */
  .mode-bar .mth-pick { display: inline-flex; align-items: center; gap: 4px; margin-right: 12px; }
  .mode-bar .mth-pick input { transform: scale(1.1); }

  /* --- 結果サマリ（本アプリは検定比を持たないため同定結果の要約を表示） --- */
  .res-summary.info { background: var(--color-primary-pale); border-color: var(--color-primary); }
  .res-summary .sum-line { font-size: 12.5px; line-height: 1.7; }
  .res-summary .sum-line b { color: var(--color-primary); font-size: 14px; }

  /* 折返しの効かない数式的表記の共通 */
  .nowrap { white-space: nowrap; }
