/* style.css — okuchi3 第3層正本（Bootstrap + zuzu.css の不足分。zuzu 画面は comCommonZuzuCSS 末尾）
 * 改版:
 * - 2026-07-27  実施内容タブ: 非アクティブにも枠線。マイク丸・前回タブ色。
 * - 2026-07-23  デバッグ回収残り: 未読込だった okuchi.css の生きたルールを本ファイルへ移設。okuchi.css / okuchi-zuzu.css を物理削除。
 * - 2026-07-14  appoint 予定詳細モーダル: スマホは全面＋上下左右余白（100vw 算ではなく overlay padding）。
 * - 2026-07-14  #17 検査歯式: tooth-cell-missing-exam（欠損グレー・入力可）。
 * - 2026-07-02  user_files フッター「ゴミ箱」: 灰色・控えめ（zuzu-user-files-trash-action）。
 * - 2026-07-02  user_files ゴミ箱行・復元ボタン（zuzu-user-file-trash-row）。
 * - 2026-07-02  user_files 一覧: アイコン＋名称1行・Windows風フォルダ色（zuzu-user-file-row）。
 * - 2026-07-02  公開サイト: page-top-zuzu の main.zuzu-shell-main は height:auto（文書型）。
 * - 2026-07-02  form>hidden 直後のヘッダー上隙間: font-size/line-height 0 + gap 0 + .zuzu-shell で復元。
 * - 2026-07-01 読込一本化: okuchi-zuzu.css 本文を本ファイルへ統合。comCommonZuzuCSS → style.css。
 * - 2026-07-01 okuchi-zuzu.css 読込廃止（棚卸し参照のみ）。
 */


:root {
  --primary: #0066cc;
  --primary-dark: #004080;
  --content-max: 1200px;
}

html {
  scroll-padding-top: 4rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#page-header.top.fixed {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 1.5rem;
  min-height: 4rem;
  box-sizing: border-box;
}

.header-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--primary);
  line-height: 1;
  padding: 0.35rem 0.6rem;
  border: 2px solid var(--primary);
  border-radius: 2rem;
}

.header-logo:hover {
  opacity: 0.85;
}

.header-logo-svg {
  display: block;
  height: 2.1rem;
  width: auto;
  font-family: "Lato", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.header-nav a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  color: #333;
  text-decoration: none;
  border-radius: 4px;
}

.header-nav a:hover {
  color: var(--primary);
  background: rgba(0, 102, 204, 0.06);
}

#page-footer {
  background: #212121;
  color: #e0e0e0;
  padding: 2.5rem 1rem;
  margin-top: 3rem;
  text-align: center;
}

#page-footer .content {
  max-width: var(--content-max);
  margin: 0 auto;
}

.footer-copy {
  font-size: 0.85rem;
  margin: 0 0 1rem;
  color: #b0b0b0;
}

.footer-links {
  font-size: 0.9rem;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.footer-links a {
  color: #b0b0b0;
  text-decoration: none;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-links .separator {
  margin: 0 0.5rem;
  color: #666;
}

.topic-bar {
  background: #fff3e0;
  color: #e65100;
  text-align: center;
  padding: 1rem;
  font-weight: 500;
  border-bottom: 1px solid #ffe082;
}

.button.square {
  min-width: 4.8rem;
  height: 3.2rem;
  padding: 0 0.75rem;
  font-size: 0.95rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  width: clamp(4.4rem, 13vw, 5.8rem);
  height: clamp(2.9rem, 9vw, 3.4rem);
  font-size: clamp(0.88rem, 3.3vw, 0.98rem);
}

.button.square.elevated {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.large-text.bold {
  font-size: 1.65rem;
  letter-spacing: -0.01em;
}

nav.top .content {
  padding: 0 1.25rem;
}

@media (max-width: 600px) {
  .header-inner {
    padding: 0 1rem;
    min-height: 3.5rem;
  }

  .header-nav a {
    padding: 0.45rem 0.65rem;
    font-size: 0.85rem;
  }
}

/* === zuzu 業務画面（旧 okuchi-zuzu.css。新規追記は本節）=== */

/* 2026-06-26  診療予定: 時刻ピッカーは zuzu-ui（表は min-width のみ）。 */
/* 2026-06-26  検診名簿 compact 列: 左右 padding を少し広げて見やすく。 */
/* 2026-06-26  検診名簿: 日時・年齢・性別・QR 列を内容幅に（氏名のみ可変）。 */
/* 2026-06-26  検診名簿 QR 列: サムネ幅に合わせて列幅を最小化。 */
/* 2026-06-26  検診名簿 QR: 一覧は 60px サムネ、クリックでモーダル拡大。 */
/* 2026-06-26  歯式タブ: 検査記号ボタンの最小幅のみ拡大（zuzu-dental-kensa-btn）。 */
/* 2026-06-26  歯式テーブル: 番号行＝secondary-bg（灰）、入力セル＝zuzu-field-bg（白）。 */
/* 2026-06-26  .zuzu-form-check-row の再定義を削除（zuzu.css 正本の枠・padding に委譲。okuchi 側の上書き禁止）。 */
/* 2026-06-26  zuzu-option-box: 背景を --zuzu-field-bg（白）に統一（body テーマ色と独立。zuzu.css 入力系正本）。 */
/* 2026-06-23  user_* アップロード行と直下テーブル: 16px（user_basic セクション行と同型）。 */
/* 2026-06-23  user_basic 編集モード: .zuzu-user-main 内 outline ボタンは class 個別指定なしで白地。 */
/* 2026-06-23  user_basic 編集モード: outline-primary は caution ＋ 含め一律白地（個別除外なし）。 */
/* 2026-06-23  user_basic 編集モード: 白抜き（outline）ナビボタンはオレンジ背景上でも白地・枠を維持。 */
/* 2026-06-23  user_basic 写真情報: 削除×を前面固定（サムネ a より先にクリック）。 */
/* 2026-06-23  user_basic セクション row: ブロック間 16px（g-2 の負 margin-top を打ち消し）。 */
/* 2026-06-23  user_basic 写真情報: サムネ a を block 化（原寸はみ出し防止）。 */
/* 2026-06-23  user_basic 写真情報: サムネ slot＋右上 photo-del-x（×）。 */
/* 2026-06-23  シェルヘッダー見た目: zuzu.css（zuzu-shell-header-*）へ移管。 */
/* 2026-06-23  form-label / zuzu-field-row: beer 再現用 margin・flex 整列を削除（zuzu.css 正本に委譲）。 */
/* 2026-06-23  訪問入力 歯式図ツールバー: ラジオ列 zuzu-form-check-row 中央寄せ。 */
/* 2026-06-22  訪問タブ dropdown: fixed 配置・メニューがタブ行 overflow で切れないよう調整。 */
/* 2026-06-22  訪問タブ: ▼をボタン右端に固定。 */
/* 2026-06-22  訪問タブ: ドロップダウン切替＋▽表示。 */
/* 2026-06-22  ヘッダー: カルテ番号が空のときは上段行を出さない（空 min-height の謎余白防止）。 */
/* okuchi-zuzu.css */
/* 2026-06-22  歯式全画面: stage max 700×600・中央寄せ（aspect-ratio 全幅でフッターが見えなくなるのを防止）。 */
/* 2026-06-22  歯式 Fabric プレースホルダー: max 700×600・中央寄せ（aspect-ratio だけだと幅に引き伸ばされる）。 */
/* 2026-06-22  zuzu-option-box: 内側 .zuzu-form-check-row があるとき外枠を消す（二重枠防止）。 */
/* 2026-06-22  訪問入力 歯式図行: ラジオ・全画面・AI を3等分。 */
/* 2026-06-22  field-caution-input: textarea 用 btn-caution-menu は右上丸（input 1行は従来どおり縦中央）。 */
/* 2026-06-22  cal-table: 親幅100%。狭い画面は min-width で横スクロール。 */
/* 2026-06-22  user サイドナビ: 項目間 gap を少し広げ（0.15rem → 0.4rem）。 */
/* 2026-06-19  user_basic: mb 打ち消し CSS 削除。余白は Bootstrap row g-* のみ。 */
/* 2026-06-19  user_basic 編集モード: input 枠色は触らない（背景オレンジのみ薄く）。 */
/* 2026-06-19  user_basic 編集モード: オレンジ背景のみ。全体を囲む枠・box-shadow を削除。 */
/* zuzu 化した公開ページ用（zuzu-ui 読み込み後）。index / news_detail / terms / privacy / contact / clinic dashboard / list_user */

/* Safari: zuzu-action-bar-fixed がある画面の main 末尾スペーサー（zuzu_safari_bottom_spacer） */
main > .okuchi-zuzu-safari-spacer {
  display: none;
}
.okuchi-zuzu-safari-spacer {
  display: block;
  height: calc(100px + env(safe-area-inset-bottom, 0px));
  min-height: calc(100px + env(safe-area-inset-bottom, 0px));
  background-color: var(--bs-body-bg, #fff);
  flex-shrink: 0;
}

/* --- appoint 予定詳細モーダル（スマホ: 画面の上下左右に余白を取ったうえで中を 100% 表示） --- */
@media (max-width: 639.98px) {
  .appoint-dialog-overlay {
    /* zuzu-appoint.css の 16px／100vw 算をやめ、余白は overlay 側のみ */
    flex-direction: column;
    align-items: stretch;
    justify-content: stretch;
    padding-top: max(1.25rem, env(safe-area-inset-top, 0px));
    padding-right: max(1.25rem, env(safe-area-inset-right, 0px));
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
    padding-left: max(1.25rem, env(safe-area-inset-left, 0px));
    overflow: hidden;
  }
  .appoint-dialog-modal {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    min-height: 0;
    align-self: stretch;
  }
}

/* --- appoint_edit 患者検索モーダル（zuzu / Bootstrap modal） --- */
#modal_search {
  --bs-modal-margin: 1rem;
}
@media (min-width: 576px) {
  #modal_search {
    --bs-modal-margin: 1.25rem;
  }
}
#modal_search .modal-dialog {
  max-width: min(800px, calc(100% - (var(--bs-modal-margin) * 2)));
}
#modal_search .appoint-modal-patient-shell {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: min(70vh, 32rem);
  /* .modal-body 既定の padding を維持（padding:0 禁止：検索欄・一覧が端まで張る） */
}
#modal_search .appoint-modal-patient-list-wrap {
  flex: 1 1 auto;
  min-height: min(40vh, 14rem);
  max-height: min(60vh, 24rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#modal_search .appoint-modal-patient-table {
  --bs-table-hover-bg: var(--bs-secondary-bg);
}
#modal_search .appoint-modal-patient-table tr.modal-search-item {
  cursor: pointer;
}
#modal_search .appoint-modal-patient-karte-col {
  width: 1%;
  vertical-align: middle;
  padding-right: 0.5rem;
}
#modal_search .appoint-modal-patient-name-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  gap: 0.1rem;
}
#modal_search .appoint-modal-patient-kana {
  font-size: 0.7rem;
  font-weight: 400;
  line-height: 1.1;
  color: var(--bs-secondary-color, #6c757d);
}
#modal_search .appoint-modal-patient-name {
  font-weight: 500;
  line-height: 1.25;
}
#modal_search .list-yotei-karte-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--bs-primary, #0d6efd);
  border: 1px solid rgba(var(--bs-primary-rgb, 13, 110, 253), 0.45);
  border-radius: 6px;
  padding: 0 0.42rem;
}
#modal_search .appoint-modal-patient-facility {
  font-size: 0.8rem;
  color: var(--bs-secondary-color, #6c757d);
  line-height: 1.3;
  margin-top: 0.15rem;
}

/* --- 患者一覧 list_user（zuzu） --- */
.list-user-table tbody tr.list-user-row {
  cursor: pointer;
}
.list-user-table a.list-yotei-karte-badge {
  display: inline-grid;
  place-items: center;
  box-sizing: border-box;
  min-inline-size: 2.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  color: var(--bs-primary, #0d6efd);
  border: 1px solid rgba(var(--bs-primary-rgb, 13, 110, 253), 0.45);
  border-radius: 6px;
  padding: 0.22rem 0.42rem 0.1rem;
  text-align: center;
}
.list-user-table .list-user-sex-female {
  color: #d81b60;
}
.list-user-table .list-user-patient {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.list-user-table .list-user-patient-sex {
  flex: 0 0 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
}
.list-user-table .list-user-patient .list-yotei-patient-name-wrap {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.1;
  gap: 0;
}
.list-user-table .list-user-patient .list-yotei-patient-kana {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  line-height: 1.05;
  min-block-size: 1.05em;
  color: var(--bs-secondary-color, #6c757d);
}
.list-user-table .list-user-patient .list-yotei-patient-name {
  display: block;
  font-weight: 500;
  line-height: 1.2;
}

/* --- 診療予定 list_yotei（zuzu） --- */
.list-yotei-date-clickable { cursor: pointer; }
.list-yotei-date-clickable:hover { opacity: 0.85; }
.list-yotei-date-picker-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
}
.list-yotei-date-picker-overlay.show { display: flex; }
.week-date-picker-modal {
  background: var(--bs-body-bg, #fff);
  border-radius: 0.5rem;
  padding: 1.25rem;
  box-shadow: 0 0.25rem 1.5rem rgba(0, 0, 0, 0.2);
  min-width: 280px;
}
.week-date-picker-calendar { margin-bottom: 1rem; }
.week-date-picker-calendar input { display: none; }
.week-date-picker-calendar .flatpickr-calendar {
  box-shadow: none;
  margin: 0 auto;
}
.week-date-picker-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}
.list-yotei-tabs .list-yotei-tab {
  cursor: pointer;
}
.cal-table-scroll-wrap .list-yotei-table {
  width: 100%;
  table-layout: fixed;
}
.cal-table-scroll-wrap .list-yotei-table th:nth-child(1),
.cal-table-scroll-wrap .list-yotei-table td:nth-child(1) {
  width: 38%;
  text-align: left;
}
.cal-table-scroll-wrap .list-yotei-table th:nth-child(2),
.cal-table-scroll-wrap .list-yotei-table td:nth-child(2) {
  width: 28%;
}
.cal-table-scroll-wrap .list-yotei-table th:nth-child(3),
.cal-table-scroll-wrap .list-yotei-table td:nth-child(3),
.cal-table-scroll-wrap .list-yotei-table th:nth-child(4),
.cal-table-scroll-wrap .list-yotei-table td:nth-child(4) {
  width: 17%;
}
@media (max-width: 600px) {
  .cal-table-scroll-wrap {
    -webkit-overflow-scrolling: touch;
  }
  .cal-table-scroll-wrap .list-yotei-table {
    width: max-content;
    max-width: none;
    min-width: 36rem;
    table-layout: auto;
  }
  .cal-table-scroll-wrap .list-yotei-table th:nth-child(1),
  .cal-table-scroll-wrap .list-yotei-table td:nth-child(1) {
    width: auto;
    min-width: 11rem;
    max-width: 16rem;
    overflow-wrap: break-word;
    word-break: break-word;
  }
  .cal-table-scroll-wrap .list-yotei-table th:nth-child(2),
  .cal-table-scroll-wrap .list-yotei-table td:nth-child(2) {
    width: auto;
    min-width: 9rem;
  }
  .cal-table-scroll-wrap .list-yotei-table th:nth-child(3),
  .cal-table-scroll-wrap .list-yotei-table td:nth-child(3),
  .cal-table-scroll-wrap .list-yotei-table th:nth-child(4),
  .cal-table-scroll-wrap .list-yotei-table td:nth-child(4) {
    width: auto;
    min-width: 7.5rem;
  }
}
.list-yotei-patient-cell {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.list-yotei-patient-cell .list-yotei-facility {
  font-size: 0.75rem;
  color: var(--bs-secondary-color, #6c757d);
}
.list-yotei-patient-cell .list-yotei-patient {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.list-yotei-patient-cell .list-yotei-facility .list-yotei-apo-time,
.list-yotei-patient-cell .list-yotei-facility-line .list-yotei-apo-time,
.list-yotei-patient-cell .list-yotei-patient .list-yotei-apo-time {
  display: inline-block;
  flex: 0 0 auto;
  margin-right: 0.35rem;
  white-space: nowrap;
}
.list-yotei-patient-cell .list-yotei-patient .list-yotei-karte-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--bs-primary, #0d6efd);
  border: 1px solid rgba(var(--bs-primary-rgb, 13, 110, 253), 0.45);
  border-radius: 6px;
  padding: 0 0.42rem;
}
.list-yotei-patient-cell .list-yotei-patient .list-yotei-item-sale-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  background: var(--bs-danger, #dc3545);
  border-radius: 4px;
  padding: 0 0.35rem;
  margin-right: 0.25rem;
}
.list-yotei-action-btn.list-yotei-action-item {
  color: var(--bs-warning-text-emphasis, #664d03);
  border-color: var(--bs-warning, #ffc107);
}
.list-yotei-table input.zuzu-time-pick {
  min-width: 0;
}
.list-yotei-patient-cell .list-yotei-patient .list-yotei-patient-name-wrap {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.1;
  gap: 0;
  vertical-align: middle;
}
.list-yotei-patient-cell .list-yotei-patient .list-yotei-patient-kana {
  font-size: 0.7rem;
  font-weight: 400;
  line-height: 1.05;
  color: var(--bs-secondary-color, #6c757d);
}
.list-yotei-patient-cell .list-yotei-patient .list-yotei-patient-name-wrap .list-yotei-patient-name {
  font-weight: 500;
  line-height: 1.2;
}
.list-yotei-patient-cell .list-yotei-patient-stack {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.list-yotei-patient-cell .list-yotei-patient-stack .list-yotei-actions {
  margin-top: 0;
}
.list-yotei-patient-cell .list-yotei-facility-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.35rem;
  row-gap: 0.15rem;
  font-size: 1rem;
  line-height: 1.4;
}
.list-yotei-patient-cell .list-yotei-facility-line .list-yotei-facility-name {
  font-size: 0.8rem;
  color: var(--bs-secondary-color, #6c757d);
  line-height: 1.3;
}
.list-yotei-facility {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.35rem;
  font-size: 1rem;
  line-height: 1.4;
}
.list-yotei-patient-cell .list-yotei-actions {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.25rem;
}
.list-yotei-patient-cell .list-yotei-actions > * {
  flex: 0 0 auto;
  inline-size: 3.5rem;
}
.list-yotei-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  block-size: 1.5rem;
  padding: 0 0.25rem;
  font-size: 0.75rem;
  line-height: 1;
  border-radius: 0.25rem;
  text-decoration: none;
  background: transparent;
  border: 1px solid var(--bs-border-color, #dee2e6);
}
.list-yotei-action-btn.list-yotei-action-karte {
  color: var(--bs-success, #198754);
  border-color: var(--bs-success, #198754);
}
.list-yotei-action-btn.list-yotei-action-route {
  color: var(--bs-primary, #0d6efd);
  border-color: var(--bs-primary, #0d6efd);
}
.list-yotei-action-btn:hover { opacity: 0.9; }
.list-yotei-action-disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  block-size: 1.5rem;
  color: var(--bs-secondary-color, #6c757d);
  cursor: default;
  flex: 0 0 auto;
  inline-size: 3.5rem;
}
.cal-table-scroll-wrap .list-yotei-table > tbody.list-yotei-tbody > tr.list-yotei-data-row:has(+ tr.list-yotei-memo-row) > td {
  border-bottom: none;
  padding-bottom: 0.35rem;
}
.cal-table-scroll-wrap .list-yotei-table > tbody.list-yotei-tbody > tr.list-yotei-memo-row > td {
  padding-top: 0;
}

/* --- clinic ダッシュボード（zuzu） --- */
.zuzu-dash-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  min-height: 5.25rem;
  padding: 0.75rem 0.5rem;
  border: 0;
  border-radius: 0.5rem;
  text-decoration: none;
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  transition: filter 0.15s ease;
}
.zuzu-dash-tile:hover,
.zuzu-dash-tile:focus-visible {
  filter: brightness(1.08);
  color: #fff;
}
.zuzu-dash-tile i {
  font-size: 1.5rem;
  line-height: 1;
}
.zuzu-dash-tile-red { background-color: #e53935; }
.zuzu-dash-tile-orange { background-color: #fb8c00; }
.zuzu-dash-tile-cyan { background-color: #00acc1; }
.zuzu-dash-tile-green { background-color: #43a047; }
.zuzu-dash-tile-purple { background-color: #8e24aa; }
.zuzu-dash-tile-teal { background-color: #00897b; }
.zuzu-dash-tile-brown { background-color: #6d4c41; }
.zuzu-dash-tile-blue { background-color: #1e88e5; }
.zuzu-dash-tile-grey { background-color: #757575; }
.zuzu-dash-tile-pink { background-color: #d81b60; }
.zuzu-dash-tile-indigo { background-color: #3949ab; }

.zuzu-dash-date-label {
  font-size: 1rem;
  line-height: 1.4;
}

.zuzu-dash-date-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.5rem;
  color: var(--bs-body-color, #212529);
  text-decoration: none;
}
.zuzu-dash-date-nav-link:hover,
.zuzu-dash-date-nav-link:focus-visible {
  color: var(--bs-primary, #0d6efd);
}

.zuzu-trust-blocks .button {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  font-size: 0.875rem;
  line-height: 1.5;
  border-radius: var(--bs-border-radius, 0.375rem);
  border: 1px solid transparent;
  background-color: var(--bs-primary, #0d6efd);
  color: #fff;
  cursor: pointer;
}
.zuzu-trust-blocks .button.grey {
  background-color: var(--bs-secondary, #6c757d);
}
.zuzu-trust-blocks .button.border {
  background-color: transparent;
  border-color: var(--bs-border-color, #dee2e6);
  color: var(--bs-body-color, #212529);
}
.zuzu-trust-blocks table {
  width: 100%;
  margin-bottom: 0;
  border-collapse: collapse;
}
.zuzu-trust-blocks th,
.zuzu-trust-blocks td {
  border: 1px solid var(--bs-border-color, #dee2e6);
  padding: 0.5rem 0.75rem;
  vertical-align: middle;
}
.zuzu-trust-blocks thead th {
  background-color: var(--bs-tertiary-bg, #f8f9fa);
}

body.page-top-zuzu {
  --okuchi-primary: #0066cc;
  --okuchi-page-bg: #f5f7fa;
  --okuchi-about-band-bg: #e8f0f8;
  --okuchi-about-band-border: #d4e0ed;
  --okuchi-section-spacing: 3.5rem;
  --okuchi-content-max: 1200px;
  --okuchi-header-offset: 3.5rem;
}

html:has(body.page-top-zuzu) {
  scroll-padding-top: var(--okuchi-header-offset);
}

body.page-top-zuzu.page-top {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--okuchi-page-bg);
  color: #1a1a1a;
}

body.page-top-zuzu main {
  padding-bottom: 1rem;
}

/* 公開サイト: zuzu-shell 外の main.zuzu-shell-main は文書型（100svh スクロール箱にしない）。 */
body.page-top-zuzu main.zuzu-shell-main {
  height: auto;
  max-height: none;
  overflow: visible;
  padding-top: 0;
  padding-left: 0;
  padding-right: 0;
}

body.page-top-zuzu.page-top:not(:has(#main-visual)) main {
  margin-top: var(--okuchi-header-offset);
}

body.page-top-zuzu .section {
  padding: var(--okuchi-section-spacing) 1rem;
  max-width: var(--okuchi-content-max);
  margin: 0 auto;
}

body.page-top-zuzu .section-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 1.5rem;
  color: #333;
}

body.page-top-zuzu .card-feature-orange { border-top: 4px solid #ff9800; }
body.page-top-zuzu .card-feature-blue { border-top: 4px solid #2196f3; }
body.page-top-zuzu .card-feature-green { border-top: 4px solid #4caf50; }
body.page-top-zuzu .card-feature-purple { border-top: 4px solid #6f43c0; }
body.page-top-zuzu .card-feature-pink { border-top: 4px solid #db2777; }

/* ログインカードのボタン（Bootstrap .btn が legacy 色を打ち消すため明示） */
body.page-top-zuzu .btn.orange,
body.page-top-zuzu a.btn.orange {
  background-color: #ff9800 !important;
  border-color: #f57c00 !important;
  color: #222 !important;
}
body.page-top-zuzu .btn.orange:hover,
body.page-top-zuzu a.btn.orange:hover {
  background-color: #f57c00 !important;
  border-color: #ef6c00 !important;
  color: #222 !important;
}

body.page-top-zuzu .btn.blue,
body.page-top-zuzu a.btn.blue {
  background-color: #2196f3 !important;
  border-color: #1976d2 !important;
  color: #fff !important;
}
body.page-top-zuzu .btn.blue:hover,
body.page-top-zuzu a.btn.blue:hover {
  background-color: #1976d2 !important;
  border-color: #1565c0 !important;
  color: #fff !important;
}

body.page-top-zuzu .btn.green,
body.page-top-zuzu a.btn.green {
  background-color: #4caf50 !important;
  border-color: #388e3c !important;
  color: #fff !important;
}
body.page-top-zuzu .btn.green:hover,
body.page-top-zuzu a.btn.green:hover {
  background-color: #388e3c !important;
  border-color: #2e7d32 !important;
  color: #fff !important;
}

body.page-top-zuzu .btn.purple,
body.page-top-zuzu a.btn.purple {
  background-color: #6f43c0 !important;
  border-color: #5936a0 !important;
  color: #fff !important;
}
body.page-top-zuzu .btn.purple:hover,
body.page-top-zuzu a.btn.purple:hover {
  background-color: #5936a0 !important;
  border-color: #4a2d85 !important;
  color: #fff !important;
}

body.page-top-zuzu .btn.pink,
body.page-top-zuzu a.btn.pink {
  background-color: #db2777 !important;
  border-color: #be185d !important;
  color: #fff !important;
}
body.page-top-zuzu .btn.pink:hover,
body.page-top-zuzu a.btn.pink:hover {
  background-color: #be185d !important;
  border-color: #9d174d !important;
  color: #fff !important;
}

body.page-top-zuzu #page-header.navbar.fixed-top {
  z-index: 1030;
  --bs-navbar-padding-y: 0;
  padding-top: 0;
  padding-bottom: 0;
}

body.page-top-zuzu #page-header .navbar-brand {
  margin-bottom: 0;
}

body.page-top-zuzu .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.5rem 1.5rem;
  box-sizing: border-box;
}

body.page-top-zuzu .header-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--okuchi-primary);
  line-height: 1;
  padding: 0.35rem 0.6rem;
  border: 2px solid var(--okuchi-primary);
  border-radius: 2rem;
}

body.page-top-zuzu .header-logo:hover {
  opacity: 0.85;
}

body.page-top-zuzu .header-logo-svg {
  display: block;
  height: 2.1rem;
  width: auto;
  font-family: "Lato", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

body.page-top-zuzu .header-nav .nav-link {
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  color: #333;
  border-radius: 4px;
}

body.page-top-zuzu .header-nav .nav-link:hover,
body.page-top-zuzu .header-nav .nav-link:focus {
  color: var(--okuchi-primary);
  background: rgba(0, 102, 204, 0.06);
}

body.page-top-zuzu .section-features .section-title {
  margin-bottom: 0.75rem;
}

body.page-top-zuzu .section-features .content {
  margin-bottom: 0;
}

body.page-top-zuzu .section-features .feature-grid {
  max-width: var(--okuchi-content-max);
  margin: 0 auto;
  padding: 0 1rem;
}

body.page-top-zuzu .card-feature,
body.page-top-zuzu .card-news {
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

body.page-top-zuzu .card-feature:hover,
body.page-top-zuzu .card-news:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

body.page-top-zuzu .card-image-wrap {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eee;
}

body.page-top-zuzu .card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.page-top-zuzu .card-feature .card-body {
  padding: 1.25rem;
}

body.page-top-zuzu .card-news .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0.75rem;
}

body.page-top-zuzu .card-desc {
  margin: 0.25rem 0 1rem;
  color: #555;
  font-size: 0.95rem;
}

body.page-top-zuzu .section-about {
  max-width: none;
  width: 100%;
  margin: 0;
  background-color: var(--okuchi-about-band-bg);
  border-top: 1px solid var(--okuchi-about-band-border);
  border-bottom: 1px solid var(--okuchi-about-band-border);
}

body.page-top-zuzu .section-about .content {
  max-width: var(--okuchi-content-max);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.5rem;
}

body.page-top-zuzu .about-body {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

body.page-top-zuzu .about-lead {
  font-size: 1.15rem;
  font-weight: 600;
  color: #333;
  margin: 0 0 0.75rem;
}

body.page-top-zuzu .about-text {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.7;
  margin: 0;
}

body.page-top-zuzu .section-news {
  padding-top: 2rem;
  padding-left: 0;
  padding-right: 0;
  max-width: none;
}

body.page-top-zuzu .section-news .content {
  margin-bottom: 0.5rem;
  padding-left: 1rem;
  padding-right: 1rem;
  max-width: var(--okuchi-content-max);
  margin-left: auto;
  margin-right: auto;
}

body.page-top-zuzu .news-scroll {
  margin-left: 16px;
  margin-right: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding: 0 0 0.5rem;
}

body.page-top-zuzu .news-scroll::-webkit-scrollbar {
  height: 6px;
}

body.page-top-zuzu .news-scroll::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

body.page-top-zuzu .card-news-link {
  text-decoration: none;
  color: inherit;
  display: block;
  flex-shrink: 0;
  width: 220px;
  scroll-snap-align: start;
}

body.page-top-zuzu .card-news-link:hover .card-news {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

body.page-top-zuzu .news-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  padding: 0 16px 0.5rem;
  width: max-content;
  max-width: none;
}

body.page-top-zuzu .card-news {
  flex-shrink: 0;
  width: 220px;
  scroll-snap-align: start;
}

body.page-top-zuzu .news-date {
  font-size: 0.7rem;
  color: #888;
  margin: 0 0 0.25rem;
}

body.page-top-zuzu .update-history-more {
  font-size: 0.75rem;
}

body.page-top-zuzu .update-history-changes {
  padding-left: 1.25rem;
  line-height: 1.7;
}

body.page-top-zuzu .update-history-changes li + li {
  margin-top: 0.35rem;
}

body.page-top-zuzu .card-news .small-text {
  margin: 0;
  font-size: 0.8rem;
  color: #555;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

body.page-top-zuzu .card-news-text-only .card-body {
  min-height: 8.5rem;
}

body.page-top-zuzu .card-news-text-only::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--okuchi-primary), #4a9eff);
}

body.page-top-zuzu #page-footer {
  background: #212121;
  color: #e0e0e0;
  padding: 2.5rem 1rem;
  margin-top: 3rem;
  text-align: center;
}

body.page-top-zuzu #page-footer .content {
  max-width: var(--okuchi-content-max);
  margin: 0 auto;
}

body.page-top-zuzu .footer-copy {
  font-size: 0.85rem;
  margin: 0 0 1rem;
  color: #b0b0b0;
}

body.page-top-zuzu .footer-links {
  font-size: 0.9rem;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

body.page-top-zuzu .footer-links a {
  color: #b0b0b0;
  text-decoration: none;
}

body.page-top-zuzu .footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

body.page-top-zuzu .footer-links .separator {
  margin: 0 0.5rem;
  color: #666;
}

body.page-top-zuzu.page-sub .page-header.page-header-news-detail,
body.page-top-zuzu.page-sub .page-header.page-header-sub {
  margin-top: var(--okuchi-header-offset);
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  padding: 0.5rem 1rem 0.75rem;
}

body.page-top-zuzu.page-sub .page-header.page-header-news-detail h1,
body.page-top-zuzu.page-sub .page-header.page-header-sub h1 {
  margin: 0;
  font-size: 1.25rem;
  color: #333;
}

body.page-top-zuzu.page-sub .page-header.page-header-news-detail .back,
body.page-top-zuzu.page-sub .page-header.page-header-sub .back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
  color: var(--okuchi-primary);
  text-decoration: none;
  font-size: 0.9rem;
}

body.page-top-zuzu.page-sub .page-header.page-header-news-detail .back i,
body.page-top-zuzu.page-sub .page-header.page-header-sub .back i {
  font-size: 0.85rem;
}

body.page-top-zuzu.page-sub .page-header.page-header-news-detail .back:hover,
body.page-top-zuzu.page-sub .page-header.page-header-sub .back:hover {
  text-decoration: underline;
}

body.page-top-zuzu .page-sub-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1rem 3rem;
}

body.page-top-zuzu .page-sub-main-narrow {
  max-width: 560px;
}

body.page-top-zuzu .page-sub-body {
  background: #fff;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

body.page-top-zuzu .page-sub-body h2 {
  font-size: 1.1rem;
  margin: 2rem 0 0.75rem;
  color: #333;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid #eee;
}

body.page-top-zuzu .page-sub-body h2:first-child {
  margin-top: 0;
}

body.page-top-zuzu .page-sub-body p,
body.page-top-zuzu .page-sub-body ul {
  font-size: 0.95rem;
  line-height: 1.75;
  color: #444;
  margin: 0 0 1rem;
}

body.page-top-zuzu .page-sub-body ul {
  padding-left: 1.5rem;
}

body.page-top-zuzu .page-sub-body li {
  margin-bottom: 0.35rem;
}

body.page-top-zuzu .page-sub-meta {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 1.5rem;
}

body.page-top-zuzu .page-sub-body .form-note {
  font-size: 0.85rem;
  color: #888;
  margin-top: 0.5rem;
}

body.page-top-zuzu .news-detail-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1rem 3rem;
}

body.page-top-zuzu .news-detail-body {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

body.page-top-zuzu .news-detail-body .card-body {
  padding: 2rem;
}

body.page-top-zuzu .news-detail-body .news-detail-date {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
}

body.page-top-zuzu .news-detail-body .news-body {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #444;
}

@media (max-width: 600px) {
  body.page-top-zuzu {
    --okuchi-section-spacing: 2rem;
  }

  body.page-top-zuzu {
    --okuchi-header-offset: 3.25rem;
  }

  body.page-top-zuzu .header-inner {
    padding: 0.4rem 1rem;
  }

  body.page-top-zuzu .header-nav .nav-link {
    padding: 0.45rem 0.65rem;
    font-size: 0.85rem;
  }

  body.page-top-zuzu.page-top:not(:has(#main-visual)) main {
    margin-top: var(--okuchi-header-offset);
  }

  body.page-top-zuzu .card-news {
    width: 200px;
  }

  body.page-top-zuzu .section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  body.page-top-zuzu .card-feature .card-body,
  body.page-top-zuzu .card-news .card-body {
    padding: 1rem;
  }

  body.page-top-zuzu .news-detail-main {
    padding: 1.5rem 1rem 2rem;
  }

  body.page-top-zuzu .page-sub-main {
    padding: 1.5rem 1rem 2rem;
  }

  body.page-top-zuzu .page-sub-body {
    padding: 1.25rem 1rem;
  }

  body.page-top-zuzu .news-detail-body .card-body {
    padding: 1.25rem 1rem;
  }
}

/* --- clinic user_basic（zuzu） --- */
.zuzu-user-page-row {
  align-items: flex-start;
}
.zuzu-user-page-row > .zuzu-user-side-nav-col {
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
}
.zuzu-user-page-row > .zuzu-user-main {
  flex: 1 1 0;
  min-width: 0;
}
/* 患者メニュー: グローバルドロワー（灰）と差別化する青系 */
.zuzu-user-side-nav-band,
.zuzu-user-drawer-offcanvas {
  --zuzu-user-nav-accent: #1565c0;
  --zuzu-user-nav-accent-dark: #0d47a1;
  --zuzu-user-nav-accent-light: #e3f2fd;
}
.zuzu-user-side-nav-band {
  background: var(--zuzu-user-nav-accent-light, #e3f2fd);
  border-radius: 0.375rem;
  padding: 0.35rem;
  height: 100%;
  min-height: 0;
}
.zuzu-user-side-nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
  max-height: calc(100dvh - 8rem);
  overflow-y: auto;
}
.zuzu-user-side-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.45rem 0.35rem;
  border-radius: 0.375rem;
  text-decoration: none;
  color: var(--bs-body-color, #212529);
  font-size: 0.75rem;
  line-height: 1.2;
  text-align: center;
  border: 0;
  background: transparent;
}
.zuzu-user-side-nav-item i {
  font-size: 1.1rem;
}
.zuzu-user-side-nav-item:hover,
.zuzu-user-side-nav-item:focus-visible {
  background: rgba(21, 101, 192, 0.12);
  color: var(--zuzu-user-nav-accent-dark, #0d47a1);
}
.zuzu-user-side-nav-item.active {
  background: var(--zuzu-user-nav-accent, #1565c0);
  color: #fff;
}
.zuzu-user-side-nav-item.active i {
  color: #fff;
}
.zuzu-user-side-nav-item--disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}
.zuzu-user-main {
  min-width: 0;
}
.zuzu-user-upload-form-row {
  margin-bottom: 16px;
}
.zuzu-user-basic-section-row {
  margin-top: 0;
  margin-bottom: 16px;
}
.zuzu-user-basic-section-row:last-child {
  margin-bottom: 0;
}
/* 患者タブ: 件数（3〜5）に関わらず横幅100%で均等分割 */
.zuzu-user-basic-tabs {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  gap: 0.15rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.zuzu-user-basic-tabs::-webkit-scrollbar {
  display: none;
}
.zuzu-user-basic-tabs > .nav-item {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  margin-left: 0 !important;
}
.zuzu-user-basic-tabs .nav-link,
.zuzu-user-basic-tabs .zuzu-user-basic-tab-disabled,
.zuzu-user-basic-tabs .zuzu-user-basic-edit-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 0.15rem;
  font-size: 0.75rem;
  padding: 0.45rem 0.25rem;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
}
.zuzu-user-basic-tabs .nav-link i.material-icons,
.zuzu-user-basic-tabs .nav-link > i:not([class*="fa-"]) {
  font-size: 1.1rem;
  font-style: normal;
}
.zuzu-user-basic-tabs .nav-link:not(.active):not(.zuzu-user-basic-edit-btn) {
  background-color: rgba(13, 110, 253, 0.1);
  color: var(--bs-primary, #0d6efd);
}
.zuzu-user-basic-tabs .nav-link:not(.active):not(.zuzu-user-basic-edit-btn):hover,
.zuzu-user-basic-tabs .nav-link:not(.active):not(.zuzu-user-basic-edit-btn):focus-visible {
  background-color: rgba(13, 110, 253, 0.16);
  color: var(--bs-primary, #0d6efd);
}
.zuzu-user-basic-tabs .nav-link.active {
  background-color: var(--bs-primary, #0d6efd);
  color: #fff;
}
.zuzu-user-basic-tabs .nav-item .dropdown {
  position: relative;
  min-width: 0;
}
.zuzu-user-basic-tabs .nav-item:has(.dropdown.show) {
  z-index: 20;
}
.zuzu-user-basic-tabs .nav-item .dropdown-menu.zuzu-visit-tab-dropdown-menu {
  z-index: 1060;
}
.zuzu-user-basic-tabs .zuzu-visit-tab-dropdown-toggle {
  border: none;
  position: relative;
  padding-right: 1.25rem;
}
.zuzu-user-basic-tabs .zuzu-visit-tab-caret {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.65rem;
  line-height: 1;
  opacity: 0.9;
}
.zuzu-user-basic-tabs .dropdown-menu .dropdown-item.active {
  background-color: var(--bs-primary, #0d6efd);
  color: #fff;
}
.zuzu-user-basic-tab-disabled {
  opacity: 0.45;
  color: var(--bs-secondary-color, #6c757d);
  cursor: default;
  user-select: none;
}
.zuzu-user-basic-edit-btn {
  border: 2px solid #ffcc80;
  border-radius: 1.75rem;
  background-color: #fff3e0;
  color: #ff9800;
}
/* Bootstrap .btn の hover/focus が枠・背景を消すのを打ち消す（フッター・タブ共通） */
.zuzu-user-basic-edit-btn:not(.edit-mode-on):hover,
.zuzu-user-basic-edit-btn:not(.edit-mode-on):focus-visible {
  border-color: #ffb74d;
  background-color: #ffe0b2;
  color: #f57c00;
}
.zuzu-user-basic-edit-btn:not(.edit-mode-on):active {
  border-color: #f57c00;
  background-color: #ffcc80;
  color: #e65100;
}
.zuzu-user-basic-edit-btn.edit-mode-on {
  border-color: #f57c00 !important;
  background-color: #ffe0b2 !important;
  color: #e65100 !important;
}
.zuzu-visit-input-mode {
  pointer-events: none;
  user-select: none;
  border: 1px solid transparent;
  font-weight: 600;
}
.zuzu-visit-input-mode--new {
  color: var(--bs-primary, #0d6efd);
  border-color: rgba(13, 110, 253, 0.35);
  background-color: rgba(13, 110, 253, 0.1);
}
.zuzu-visit-input-mode--edit {
  color: #e65100;
  border-color: rgba(255, 152, 0, 0.45);
  background-color: rgba(255, 152, 0, 0.12);
}
.zuzu-visit-input-mode--none {
  color: var(--bs-secondary-color, #6c757d);
  border-color: var(--bs-border-color, #dee2e6);
  background-color: var(--bs-secondary-bg, #f8f9fa);
}
#footerEditLabel.edit-mode-on {
  border: 3px solid #e65100;
  border-radius: 0.5rem;
  background-color: #ff6d00;
  color: #fff;
  padding: 0.35rem 0.85rem;
  font-weight: bold;
}
#footerEditLabel.edit-mode-on #footerEditLabelText {
  color: #fff !important;
  cursor: pointer;
  font-size: 1rem;
}
.zuzu-user-basic-edit-trigger.edit-mode-on,
.zuzu-user-basic-edit-btn.edit-mode-on {
  border-color: #bf360c !important;
  background-color: #ff6d00 !important;
  color: #fff !important;
}
.zuzu-user-basic-edit-trigger.edit-mode-on .zuzu-user-basic-edit-label,
.zuzu-user-basic-edit-btn.edit-mode-on .zuzu-user-basic-edit-label {
  color: #fff !important;
}
body.zuzu-user-basic-page-editing {
  background-color: #fff3e0 !important;
}
main.zuzu-shell-main.zuzu-user-basic-main-editing {
  background-color: #fff8f0 !important;
}
/* user_basic 編集モードのみ。.zuzu-user-main 内の outline 系は一括（他タブ・問診等の別 PHP には非適用） */
body.zuzu-user-basic-page-editing .zuzu-user-main .btn-outline-secondary:not(.zuzu-user-basic-edit-trigger):not(.zuzu-user-basic-edit-btn) {
  background-color: #fff !important;
  border-color: var(--bs-secondary-border-subtle, #ced4da) !important;
  color: var(--bs-secondary-color, #6c757d) !important;
}
body.zuzu-user-basic-page-editing .zuzu-user-main .btn-outline-secondary:not(.zuzu-user-basic-edit-trigger):not(.zuzu-user-basic-edit-btn):hover:not(:disabled),
body.zuzu-user-basic-page-editing .zuzu-user-main .btn-outline-secondary:not(.zuzu-user-basic-edit-trigger):not(.zuzu-user-basic-edit-btn):focus-visible:not(:disabled) {
  background-color: var(--bs-secondary-bg, #f8f9fa) !important;
  border-color: var(--bs-secondary, #6c757d) !important;
  color: var(--bs-secondary-color, #6c757d) !important;
}
body.zuzu-user-basic-page-editing .zuzu-user-basic-tabs .nav-link:not(.active):not(.zuzu-user-basic-edit-btn) {
  background-color: #fff;
  border: 1px solid rgba(13, 110, 253, 0.28);
  color: var(--bs-primary, #0d6efd);
}
body.zuzu-user-basic-page-editing .zuzu-user-basic-tabs .nav-link:not(.active):not(.zuzu-user-basic-edit-btn):hover,
body.zuzu-user-basic-page-editing .zuzu-user-basic-tabs .nav-link:not(.active):not(.zuzu-user-basic-edit-btn):focus-visible {
  background-color: rgba(13, 110, 253, 0.08);
  border-color: rgba(13, 110, 253, 0.35);
  color: var(--bs-primary, #0d6efd);
}
body.zuzu-user-basic-page-editing .zuzu-user-main .btn-outline-primary {
  background-color: #fff !important;
  border-color: var(--bs-primary, #0d6efd) !important;
  color: var(--bs-primary, #0d6efd) !important;
}
body.zuzu-user-basic-page-editing .zuzu-user-main .btn-outline-primary:hover:not(:disabled),
body.zuzu-user-basic-page-editing .zuzu-user-main .btn-outline-primary:focus-visible:not(:disabled) {
  background-color: rgba(13, 110, 253, 0.08) !important;
  border-color: var(--bs-primary, #0d6efd) !important;
  color: var(--bs-primary, #0d6efd) !important;
}
.caution-items-group-header .caution-item-add-btn {
  flex-shrink: 0;
}
.footer-plan-pdf--disabled {
  opacity: 0.45;
  cursor: default;
}
select.select-readonly {
  pointer-events: none;
}
.photo-main-wrap {
  position: relative;
  background: #f0f0f0;
  border-radius: 0.5rem;
  overflow: hidden;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-main-img {
  max-width: 100%;
  max-height: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  cursor: pointer;
}
.photo-del-x,
.photo-arrow {
  position: absolute;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  opacity: 0.8;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 0.75rem;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.photo-del-x { top: 4px; right: 4px; opacity: 0.7; }
.photo-arrow { top: 50%; transform: translateY(-50%); }
.photo-arrow-prev { left: 8px; }
.photo-arrow-next { right: 8px; }
.photo-thumb-strip { overflow: hidden; padding: 0.5rem 0.25rem; margin-top: 0.5rem; }
.photo-thumb-inner {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 0.25rem;
}
.photo-thumb-item {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  scroll-snap-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 0.25rem;
  overflow: hidden;
}
.photo-thumb-item.active { border-color: var(--bs-primary, #0d6efd); }
.photo-thumb-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-thumb-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  cursor: default;
  pointer-events: none;
}
.photo-thumb-placeholder img {
  object-fit: contain;
  padding: 0.15rem;
}
.zuzu-user-basic-photo-bar .photo-thumb-strip {
  margin-top: 0;
  padding: 0;
  min-width: 0;
}
.zuzu-user-basic-photo-bar .photo-thumb-slot {
  position: relative;
  flex-shrink: 0;
  width: 100px;
  height: 100px;
}
.zuzu-user-basic-photo-bar .photo-thumb-slot .photo-thumb-item {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: pointer;
}
.zuzu-user-basic-photo-bar .photo-thumb-slot .photo-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.zuzu-user-basic-photo-bar .photo-thumb-del {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 5;
  pointer-events: auto;
}
.zuzu-user-basic-photo-bar .photo-thumb-inner > .photo-thumb-placeholder {
  width: 100px;
  height: 100px;
}
.accordion-report summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: var(--bs-tertiary-bg, #f8f9fa);
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.375rem;
  cursor: pointer;
}
.accordion-report[open] {
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.375rem;
  overflow: hidden;
}
.accordion-report[open] summary {
  border-radius: 0.375rem 0.375rem 0 0;
  border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}
.accordion-report summary.blue1 { background-color: #e3f2fd; }
.accordion-report summary.green1 { background-color: #e8f5e9; }
.kp-family-block {
  position: relative;
  padding-right: 4rem;
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}
.kp-family-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  display: inline-flex;
  gap: 0.25rem;
}
.kp-family-block .kp-family-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.06);
  color: #666;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}
.kp-family-name-furigana { font-weight: 500; font-size: 1.1rem; }
.field-caution-input .caution-textarea-wrap {
  position: relative;
}
.field-caution-input .btn-caution-menu {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  transform: translateY(-50%);
  z-index: 2;
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.06);
  color: #666;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}
.field-caution-input .form-control { padding-right: 2.25rem; }
.field-caution-input .form-control-sm { padding-right: 2rem; }
.field-caution-input .caution-textarea-wrap textarea.form-control {
  padding-right: 2.25rem;
}
.field-caution-input .caution-textarea-wrap textarea.form-control + .btn-caution-menu {
  top: 6px;
  right: 6px;
  transform: none;
}
.field-caution-input .caution-textarea-wrap textarea.form-control + .btn-caution-menu:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
}
.caution-items-group .caution-item-row .caution-textarea-wrap .btn-caution-menu {
  min-width: 2rem;
}
.caution-items-group .caution-item-alert-wrap {
  flex-shrink: 0;
}
/* 郵便・住所・地図・検索: input 右端に青ボタンを添える */
.input-group > .btn.btn-primary,
.input-group > .btn.zuzu-input-group-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  padding-left: 0.65rem;
  padding-right: 0.65rem;
}
.zuzu-option-box {
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: var(--bs-border-radius-sm, 0.25rem);
  padding: 0.5rem 0.75rem;
  background-color: var(--zuzu-field-bg, var(--bs-white, #fff));
}
/* ラジオ・checkbox: 枠は .zuzu-form-check-row のみ（外側 zuzu-option-box は透過） */
.zuzu-option-box:not(:has(.table-responsive)):has(> .zuzu-form-check-row) {
  border: none;
  padding: 0;
  background: transparent;
  min-height: 0;
  display: block;
}
/* form-control 同高（ラジオ・スイッチ行。テーブル枠は除外） */
.zuzu-option-box:not(:has(.table-responsive)) {
  display: flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  min-height: calc(1.5em + 0.75rem + calc(var(--bs-border-width, 1px) * 2));
  font-size: 1rem;
}
.zuzu-option-box:not(:has(.table-responsive)) > .d-flex,
.zuzu-option-box:not(:has(.table-responsive)) > .zuzu-form-check-row {
  width: 100%;
  align-items: center;
}
.zuzu-option-box:not(:has(.table-responsive)) .form-check,
.zuzu-option-box:not(:has(.table-responsive)) .form-check-inline {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0;
  min-height: 0;
  padding-left: 0;
  gap: 0.35rem;
}
.zuzu-option-box:not(:has(.table-responsive)) .form-check-inline {
  margin-right: 0;
}
.zuzu-option-box:not(:has(.table-responsive)) .form-check-input {
  margin-top: 0;
  margin-left: 0;
  float: none;
  flex-shrink: 0;
}
.zuzu-option-box:not(:has(.table-responsive)) .form-check-label {
  font-size: inherit;
  line-height: 1;
  white-space: nowrap;
}
.nearby-row-edit-hit { cursor: pointer; }
/* 生年月日（和暦）: row クラスは使わない（Bootstrap gutter で幅・見た目が縮む） */
#bd_wareki_wrap .bd-wareki-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  align-items: stretch;
  margin: 0;
  width: 100%;
}
#bd_wareki_wrap .bd-wareki-row > [class*="bd-wareki-"] {
  padding: 0;
  margin: 0;
  min-width: 0;
}
#bd_wareki_wrap .bd-wareki-row .form-select {
  width: 100%;
  min-height: calc(1.5em + 0.75rem + calc(var(--bs-border-width, 1px) * 2));
}
@media only screen and (max-width: 720px) {
  #bd_wareki_wrap .bd-wareki-row .bd-wareki-k { grid-column: 1; grid-row: 1; }
  #bd_wareki_wrap .bd-wareki-row .bd-wareki-x { grid-column: 2; grid-row: 1; }
  #bd_wareki_wrap .bd-wareki-row .bd-wareki-m { grid-column: 1; grid-row: 2; }
  #bd_wareki_wrap .bd-wareki-row .bd-wareki-d { grid-column: 2; grid-row: 2; }
}
@media only screen and (min-width: 721px) {
  #bd_wareki_wrap .bd-wareki-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 991.98px) {
  .zuzu-user-page-row > .zuzu-user-main {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
  }
}
.zuzu-user-mobile-nav-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.5rem;
  font-weight: 500;
}
/* user_basic: 患者メニュー横の編集（モバイル） */
.zuzu-user-mobile-edit-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.5rem;
  font-weight: 500;
  flex-shrink: 0;
  border: 2px solid #ffcc80;
  background-color: #fff3e0;
  color: #ff9800;
}
.zuzu-user-mobile-edit-open:hover,
.zuzu-user-mobile-edit-open:focus-visible {
  border-color: #ffb74d;
  background-color: #ffe0b2;
  color: #f57c00;
}
.zuzu-user-mobile-edit-open.edit-mode-on {
  border-color: #f57c00;
  background-color: #ffe0b2;
  color: #e65100;
}
.zuzu-user-drawer-offcanvas {
  --bs-offcanvas-bg: var(--zuzu-user-nav-accent, #1565c0);
  --bs-offcanvas-color: #ffffff;
  --zuzu-drawer-bg: var(--zuzu-user-nav-accent, #1565c0);
  --zuzu-drawer-color: #ffffff;
  --zuzu-drawer-link-hover-bg: rgba(255, 255, 255, 0.14);
  --zuzu-drawer-active-fg: #ffffff;
  --zuzu-drawer-active-bg: var(--zuzu-user-nav-accent-dark, #0d47a1);
}
.zuzu-user-drawer-offcanvas .offcanvas-header {
  border-bottom-color: rgba(255, 255, 255, 0.2) !important;
}
.zuzu-user-drawer-offcanvas .zuzu-user-drawer-nav .nav-link.disabled,
.zuzu-user-drawer-offcanvas .zuzu-user-drawer-nav .nav-link:disabled {
  opacity: 0.45;
  pointer-events: none;
}
.zuzu-user-drawer-offcanvas .zuzu-user-side-nav-label {
  display: inline;
}

/* --- clinic user_basic_first（zuzu）: ymir_frm_col（beer 出力）の Bootstrap 橋渡し --- */
.zuzu-user-basic-form .zuzu-ymir-frm-row {
  --zuzu-ymir-gutter-x: 0.5rem;
  --zuzu-ymir-gutter-y: 0.5rem;
}
.zuzu-user-basic-form .zuzu-ymir-frm-row > [class*="s"],
.zuzu-user-basic-form .zuzu-ymir-frm-row > [class*="m"] {
  padding-right: calc(var(--zuzu-ymir-gutter-x) * 0.5);
  padding-left: calc(var(--zuzu-ymir-gutter-x) * 0.5);
  margin-top: var(--zuzu-ymir-gutter-y);
}
.zuzu-user-basic-form .zuzu-ymir-frm-row.row > .s12,
.zuzu-user-basic-form .zuzu-ymir-frm-row.row > .m12 {
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
}
.zuzu-user-basic-form .zuzu-ymir-frm-row.row > .s6,
.zuzu-user-basic-form .zuzu-ymir-frm-row.row > .m6 {
  flex: 0 0 auto;
  width: 50%;
  max-width: 50%;
}
.zuzu-user-basic-form .zuzu-ymir-frm-row.row > .s4,
.zuzu-user-basic-form .zuzu-ymir-frm-row.row > .m4 {
  flex: 0 0 auto;
  width: 33.3333%;
  max-width: 33.3333%;
}
.zuzu-user-basic-form .zuzu-ymir-frm-row.row > .s3,
.zuzu-user-basic-form .zuzu-ymir-frm-row.row > .m3 {
  flex: 0 0 auto;
  width: 25%;
  max-width: 25%;
}
@media (max-width: 767.98px) {
  .zuzu-user-basic-form .zuzu-ymir-frm-row.row > .s6,
  .zuzu-user-basic-form .zuzu-ymir-frm-row.row > .m6,
  .zuzu-user-basic-form .zuzu-ymir-frm-row.row > .s4,
  .zuzu-user-basic-form .zuzu-ymir-frm-row.row > .m4,
  .zuzu-user-basic-form .zuzu-ymir-frm-row.row > .s3,
  .zuzu-user-basic-form .zuzu-ymir-frm-row.row > .m3 {
    width: 100%;
    max-width: 100%;
  }
}
.zuzu-user-basic-form .zuzu-ymir-frm-row .big-label {
  display: block;
  margin-bottom: 0;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.2;
  color: var(--bs-body-color, #212529);
}
.zuzu-user-basic-form .zuzu-ymir-frm-row nav.border-a,
.zuzu-user-basic-form .zuzu-ymir-frm-row .border-a.br4 {
  border: 1px solid var(--bs-border-color, #dee2e6) !important;
  border-radius: var(--bs-border-radius-sm, 0.25rem) !important;
  padding: 0.375rem 0.75rem !important;
  background: var(--bs-body-bg, #fff);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: center;
  min-height: calc(1.5em + 0.75rem + calc(var(--bs-border-width, 1px) * 2));
  font-size: 1rem;
}
.zuzu-user-basic-form .zuzu-ymir-frm-row label.radio,
.zuzu-user-basic-form .zuzu-ymir-frm-row label.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 !important;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}
.zuzu-user-basic-form .zuzu-ymir-frm-row label.radio span,
.zuzu-user-basic-form .zuzu-ymir-frm-row label.checkbox span {
  font-size: 1rem;
  line-height: 1;
}
.zuzu-user-basic-form .zuzu-ymir-frm-row label.radio input,
.zuzu-user-basic-form .zuzu-ymir-frm-row label.checkbox input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  flex-shrink: 0;
  font-size: 1rem;
  accent-color: var(--bs-primary, #0d6efd);
}
.zuzu-user-basic-form .zuzu-ymir-frm-row label.radio .mr16,
.zuzu-user-basic-form .zuzu-ymir-frm-row label.checkbox .mr16,
.zuzu-user-basic-form .zuzu-ymir-frm-row label.radio.mr16,
.zuzu-user-basic-form .zuzu-ymir-frm-row label.checkbox.mr16 {
  margin-right: 0 !important;
}
.zuzu-user-basic-form .zuzu-ymir-frm-row .field.textarea.border.small {
  border: 0;
  padding: 0;
}
.zuzu-user-basic-form .zuzu-ymir-frm-row textarea.small {
  display: block;
  width: 100%;
  min-height: calc(1.5em + 0.75rem + 2px);
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: var(--bs-border-radius, 0.375rem);
}
.zuzu-user-basic-form input.small:not([type="checkbox"]):not([type="radio"]),
.zuzu-user-basic-form .zuzu-ymir-frm-row input.small:not([type="checkbox"]):not([type="radio"]),
.zuzu-user-basic-form .zuzu-ymir-frm-row input[type="number"],
.zuzu-user-basic-form .zuzu-ymir-frm-row input[type="date"],
.zuzu-user-basic-form .zuzu-ymir-frm-row input[type="time"] {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: var(--bs-border-radius, 0.375rem);
  background-color: var(--bs-body-bg, #fff);
}
.zuzu-user-basic-form .zuzu-ymir-frm-row .field.suffix select.small {
  width: 100%;
  padding: 0.375rem 2rem 0.375rem 0.75rem;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: var(--bs-border-radius, 0.375rem);
  background-color: var(--bs-body-bg, #fff);
}
.zuzu-user-basic-form .zuzu-ymir-frm-row .field.suffix i {
  display: none;
}
.zuzu-user-basic-form .zuzu-ymir-frm-row .field-switch-field .field.middle-align {
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: var(--bs-border-radius-sm, 0.25rem);
  padding: 0.375rem 0.75rem;
  background: var(--bs-body-bg, #fff);
}
.zuzu-user-basic-form .zuzu-ymir-frm-row .field-switch-field .switch input[type="checkbox"] {
  width: 2em;
  height: 1em;
}

/* --- clinic user_basic_first（zuzu）: 歯式テーブル・手書きキャンバス --- */
.zuzu-dental-section .dental-quadrant-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--bs-secondary-color, #6c757d);
  margin-bottom: 0.25rem;
  padding: 0 0.15rem;
}
/* 2026-07-14  複数選択トグル: ON=薄めの青（検査記号ボタン同型サイズ） */
.zuzu-dental-section .zuzu-dental-block-btn {
  line-height: 1.2;
  padding-top: 0.15rem;
  padding-bottom: 0.15rem;
}
.zuzu-dental-section .zuzu-dental-block-btn[aria-pressed="true"] {
  background-color: rgba(13, 110, 253, 0.18);
  border-color: rgba(13, 110, 253, 0.45);
  color: var(--bs-primary, #0d6efd);
}
.zuzu-dental-section .dental-tooth-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.zuzu-dental-section .dental-tooth-table-wrap .table.tooth-table {
  table-layout: fixed;
  width: 100%;
  min-width: 320px;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  --bs-table-cell-padding-y: 0.1rem;
  --bs-table-cell-padding-x: 0.05rem;
}
.zuzu-dental-section .dental-tooth-table-wrap .tooth-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  line-height: 1.2;
}
.zuzu-dental-section .tooth-table td.center-align {
  text-align: center !important;
}
.zuzu-dental-section .tooth-table td.pa0 {
  padding-top: 0.1rem !important;
  padding-bottom: 0.1rem !important;
  padding-left: 0.05rem !important;
  padding-right: 0.05rem !important;
}
.zuzu-dental-section .tooth-table td.rem08 {
  font-size: 0.75rem;
}
/* 歯式: 番号行＝灰、入力セル＝白（Bootstrap+zuzu 変数） */
.zuzu-dental-section .dental-tooth-table-wrap .tooth-table tbody tr.tooth-table-number-row td {
  background-color: var(--bs-secondary-bg, #e9ecef);
}
.zuzu-dental-section .dental-tooth-table-wrap .tooth-table td[id^="pkt"],
.zuzu-dental-section .dental-tooth-table-wrap .tooth-table td[id^="col"],
.zuzu-dental-section .dental-tooth-table-wrap .tooth-table td[data-perm-pkt],
.zuzu-dental-section .dental-tooth-table-wrap .tooth-table td[data-perm-col],
.zuzu-dental-section .dental-tooth-table-wrap .tooth-table td[data-baby-pkt],
.zuzu-dental-section .dental-tooth-table-wrap .tooth-table td[data-baby-col],
.zuzu-dental-section .dental-tooth-table-wrap .tooth-table td[id^="bpkt_"],
.zuzu-dental-section .dental-tooth-table-wrap .tooth-table td[id^="bcol_"] {
  background-color: var(--zuzu-field-bg, #fff);
}
.zuzu-dental-section .dental-quadrant-labels--lower {
  margin-top: 0.25rem;
}
.zuzu-dental-section .zuzu-dental-kensa-tabs .nav-link {
  font-size: 0.875rem;
}
/* 歯式タブ内ボタン（検査記号・ポケット）: 幅のみ拡大（高さは btn-sm のまま） */
.zuzu-dental-section .zuzu-dental-kensa-btn {
  min-width: 3rem;
  padding-left: 0.65rem;
  padding-right: 0.65rem;
}
#dental-chart-block[data-dental-engine="fabric"] .dental-fabric-canvas-placeholder,
#visit-dental-chart-block[data-dental-engine="fabric"] .dental-fabric-canvas-placeholder {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 700px;
  max-height: 600px;
  margin-left: auto;
  margin-right: auto;
  aspect-ratio: 700 / 600;
  background: #fff;
}
#dental-chart-block[data-dental-engine="fabric"] .dental-fabric-stage,
#visit-dental-chart-block[data-dental-engine="fabric"] .dental-fabric-stage {
  width: 100%;
  height: 100%;
  max-width: 700px;
  max-height: 600px;
  display: block;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
}
#dental-chart-block[data-dental-engine="fabric"] .dental-fabric-stage .canvas-container,
#visit-dental-chart-block[data-dental-engine="fabric"] .dental-fabric-stage .canvas-container {
  margin-left: auto !important;
  margin-right: auto !important;
}
#dental-chart-block[data-dental-engine="fabric"] .dental-fabric-stage canvas,
#visit-dental-chart-block[data-dental-engine="fabric"] .dental-fabric-stage canvas {
  border: none !important;
  max-width: 100%;
}
#dental-chart-block[data-dental-engine="fabric"] .dental-chart-inline-bar {
  width: 100%;
}
#dental-chart-block[data-dental-engine="fabric"].dental-fabric-view-only .dental-fabric-stage,
#dental-chart-block[data-dental-engine="fabric"].dental-fabric-view-only .dental-fabric-stage .canvas-container,
#dental-chart-block[data-dental-engine="fabric"].dental-fabric-view-only .dental-fabric-stage .upper-canvas,
#dental-chart-block[data-dental-engine="fabric"].dental-fabric-view-only .dental-fabric-stage .lower-canvas,
#visit-dental-chart-block[data-dental-engine="fabric"].dental-fabric-view-only .dental-fabric-stage,
#visit-dental-chart-block[data-dental-engine="fabric"].dental-fabric-view-only .dental-fabric-stage .canvas-container,
#visit-dental-chart-block[data-dental-engine="fabric"].dental-fabric-view-only .dental-fabric-stage .upper-canvas,
#visit-dental-chart-block[data-dental-engine="fabric"].dental-fabric-view-only .dental-fabric-stage .lower-canvas {
  pointer-events: none !important;
  touch-action: pan-x pan-y pinch-zoom;
}
#dental-chart-block[data-dental-engine="fabric"] .dental-fabric-draw-tools-host {
  display: none !important;
}
/* 歯式全画面: キャンバス max 700×600。ツールバー（zuzu-fabric-fs-tools）を下端に残す */
#dentalFabricFullscreen.is-open,
#visitFabricFullscreen.is-open {
  justify-content: flex-start;
}
#dentalFabricFullscreen .zuzu-fabric-fs-stage,
#visitFabricFullscreen .zuzu-fabric-fs-stage {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 700px;
  max-height: 600px;
  margin-left: auto;
  margin-right: auto;
  aspect-ratio: 700 / 600;
  min-height: 0;
  padding: calc(4px + env(safe-area-inset-top, 0px)) 8px 8px;
  overflow: hidden;
}
#dentalFabricFullscreen .zuzu-fabric-fs-tools,
#visitFabricFullscreen .zuzu-fabric-fs-tools {
  flex: 0 0 auto;
  margin-top: auto;
}
.dental-fabric-fs-done-btn {
  display: none;
}
#dentalFabricFullscreen .dental-fabric-fs-done-btn {
  display: inline-flex;
}
#dental-chart-block,
#dental-chart-block img,
#dental-chart-block > div,
#dental-chart-block .drawing-board-canvas-wrapper,
#dental-chart-block canvas {
  border-radius: 0 !important;
}
.dental-tooth-table-wrap .tooth-table tbody tr.tooth-table-number-row td {
  background-color: var(--bs-secondary-bg, #e9ecef);
}
.dental-tooth-table-wrap .tooth-table tbody tr.tooth-table-number-row {
  border-top: 2px solid var(--bs-border-color, #dee2e6) !important;
  border-bottom: 2px solid var(--bs-border-color, #dee2e6) !important;
}
.dental-tooth-table-wrap .tooth-table.tooth-table-permanent tbody tr td:nth-child(8),
.dental-tooth-table-wrap .tooth-table.tooth-table-baby tbody tr td:nth-child(5),
.dental-tooth-table-wrap .tooth-table.tooth-table-combined tbody tr:not(.dental-combined-baby) td:nth-child(8),
.dental-tooth-table-wrap .tooth-table.tooth-table-combined tbody tr.dental-combined-baby td:nth-child(6) {
  border-right: 2px solid var(--bs-border-color, #dee2e6) !important;
}
#dental-table-combined { display: none; }
.dental-tooth-table-wrap .tooth-table.tooth-table-combined td.dental-baby-pad {
  background-color: rgba(0, 0, 0, 0.06);
}
#dental-chart-block .dental-draw-switch-row {
  max-width: 700px;
}
#dental-chart-block .dental-chart-canvas-wrap {
  position: relative;
  width: 700px;
  max-width: 100%;
  height: 600px;
  margin: 0 auto;
}
#dental-chart-block #dental-base-image {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 0;
  max-width: 100%;
  height: auto;
}
#dental-chart-block #dental-prior-strokes {
  position: absolute;
  left: 0;
  top: 0;
  width: 700px;
  max-width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: contain;
  pointer-events: none;
  z-index: 1;
}
#dental-chart-block #default-board {
  position: absolute;
  left: 0;
  top: 0;
  width: 700px;
  max-width: 100%;
  height: 644px;
  z-index: 2;
}
#dental-chart-block .dental-chart-draw-overlay {
  display: none;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  box-sizing: border-box;
  touch-action: pan-x pan-y pinch-zoom;
  background: rgba(128, 128, 128, 0.22);
}
#dental-chart-block.dental-draw-off .dental-chart-draw-overlay {
  display: block;
}
#dental-chart-block.dental-draw-off #drawing-controls-container {
  opacity: 0.45;
  pointer-events: none;
}
#drawing-controls-container {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}
#dental-table-baby { display: none; }
.tooth-table td[id^="pkt"],
.tooth-table td[id^="col"],
.tooth-table td[id^="bpkt_"],
.tooth-table td[id^="bcol_"],
.tooth-table td[data-perm-pkt],
.tooth-table td[data-perm-col],
.tooth-table td[data-baby-pkt],
.tooth-table td[data-baby-col] {
  cursor: pointer;
  background-color: var(--zuzu-field-bg, #fff);
}
.tooth-table td.tooth-cell-selected {
  background: rgba(255, 165, 0, 0.35) !important;
}
.dental-tooth-table-wrap .tooth-table.tooth-table-combined td.tooth-cell-empty-baby-both {
  position: relative;
}
.dental-tooth-table-wrap .tooth-table.tooth-table-combined td.tooth-cell-empty-baby-both::after {
  content: attr(data-ph);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 0.32);
  font-weight: 600;
  pointer-events: none;
}

/* --- 患者 写真・保険証 ギャラリー / ファイル一覧（zuzu） --- */
.zuzu-user-file-gallery .file-grid,
#file-gallery-wrap .file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.5rem;
}
.zuzu-user-file-gallery .file-item,
#file-gallery-wrap .file-item {
  position: relative;
}
.zuzu-user-file-gallery .file-item-icon-wrap,
#file-gallery-wrap .file-item-icon-wrap {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
}
.zuzu-user-file-gallery .file-item-icon,
#file-gallery-wrap .file-item-icon {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bs-tertiary-bg, #f8f9fa);
  border-radius: 0.375rem;
  border: 1px solid var(--bs-border-color, #dee2e6);
}
.zuzu-user-file-gallery .file-item-icon img,
#file-gallery-wrap .file-item-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.zuzu-user-file-gallery .btn-file-menu,
#file-gallery-wrap .btn-file-menu {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
}
.zuzu-user-file-gallery .btn-file-menu:hover,
#file-gallery-wrap .btn-file-menu:hover {
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
}
.zuzu-user-file-gallery .file-item-name,
#file-gallery-wrap .file-item-name {
  margin-top: 0.25rem;
}

.zuzu-user-files-breadcrumb {
  align-items: center;
  gap: 0;
}
.zuzu-user-files-breadcrumb .nav-link {
  white-space: nowrap;
  font-size: 0.8125rem;
}
.zuzu-action-bar .zuzu-user-files-trash-action {
  color: var(--bs-secondary-color, #6c757d);
}
.zuzu-action-bar .zuzu-user-files-trash-action:hover,
.zuzu-action-bar .zuzu-user-files-trash-action:focus {
  color: var(--bs-secondary-color, #6c757d);
  opacity: 0.85;
}
.zuzu-user-file-list ul.list {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.375rem;
  overflow: hidden;
}
.zuzu-user-file-list ul.list > li {
  border-bottom: 1px solid var(--bs-border-color, #dee2e6);
  margin: 0;
}
.zuzu-user-file-list ul.list > li:last-child {
  border-bottom: 0;
}
.zuzu-user-file-list ul.list a.zuzu-user-file-row,
.zuzu-user-file-list ul.list .zuzu-user-file-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  color: inherit;
}
.zuzu-user-file-list ul.list a.zuzu-user-file-row:hover {
  background: var(--bs-tertiary-bg, #f8f9fa);
}
.zuzu-user-file-list .zuzu-user-file-folder-icon {
  flex-shrink: 0;
  font-size: 1.125rem;
  color: #e8b849;
}
.zuzu-user-file-list .zuzu-user-file-pdf-icon {
  flex-shrink: 0;
  font-size: 1.125rem;
  color: var(--bs-danger, #dc3545);
}
.zuzu-user-file-list .zuzu-user-file-doc-icon,
.zuzu-user-file-list .zuzu-user-file-download-icon {
  flex-shrink: 0;
  font-size: 1rem;
  color: var(--bs-secondary-color, #6c757d);
}
.zuzu-user-file-list .zuzu-user-file-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zuzu-user-file-list .btn-file-menu {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--bs-secondary-color, #6c757d);
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  line-height: 1;
}
.zuzu-user-file-list .btn-file-menu:hover {
  background: var(--bs-tertiary-bg, #f8f9fa);
  color: var(--bs-body-color, #212529);
}
.zuzu-user-file-list .zuzu-user-file-trash-row {
  padding: 0.5rem 0.75rem;
}

/* ファイル操作オーバーレイ（zuzu） */
.zuzu-file-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}
.zuzu-file-menu-overlay.is-open {
  display: flex;
}
.zuzu-file-menu-dialog {
  background: var(--bs-body-bg, #fff);
  border-radius: 0.5rem;
  min-width: 18rem;
  width: min(28rem, 95vw);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}
.zuzu-file-menu-dialog--narrow {
  width: min(22rem, 95vw);
}
.zuzu-file-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--bs-border-color, #dee2e6);
  font-weight: 600;
  font-size: 0.9375rem;
}
.zuzu-file-menu-body {
  padding: 0.5rem 0;
}
.zuzu-file-menu-body--stack {
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.zuzu-file-menu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}
.zuzu-file-menu-footer {
  padding: 0.5rem 1rem;
  border-top: 1px solid var(--bs-border-color, #dee2e6);
  text-align: right;
}

.user-files-toast {
  position: fixed;
  left: 50%;
  bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 2000;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.3;
  max-width: min(92vw, 420px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}
.user-files-toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* user_karte: カレンダー・土日祝・月選択 */
.bg_sat { background-color: #DDF1F9 !important; }
.bg_sun { background-color: #FFDFE5 !important; }
.cal-table-month { font-size: 1.15rem; font-weight: 500; }
.cal-table-month-clickable { cursor: pointer; }
.cal-table {
  border-collapse: collapse;
  font-size: 0.9rem;
}
.cal-table th,
.cal-table td {
  padding: 2px;
  text-align: center;
  box-sizing: border-box;
}
.cal-table-scroll-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
}
.cal-table-scroll-wrap:has(+ .karte-new-visit-row) {
  padding-bottom: 0;
}
.cal-table-scroll-wrap > table.cal-table {
  width: 100%;
  min-width: max-content;
  margin-inline: 0;
  box-sizing: border-box;
}
.karte-month-picker-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
}
.karte-month-picker-overlay.show {
  display: flex;
}
.karte-new-visit-row {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-block: 0.5rem;
}
.karte-surface-new-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 70%;
  max-width: 20rem;
  padding: 0.35rem 0.75rem;
  box-sizing: border-box;
  border: 2px solid #F57C00;
  border-radius: 1.75rem;
  background-color: #FFE0B2;
  color: #E65100;
  text-decoration: none;
  font: inherit;
  line-height: inherit;
  cursor: pointer;
}
.karte-surface-new-btn:hover {
  color: #E65100;
  background-color: #ffe8cc;
}

/* 訪問入力 歯式図: ツールバー3等分（ラジオ / 全画面 / AI） */
.karte-handwrite-bg-nav {
  flex-wrap: nowrap;
}
.karte-handwrite-toolbar-third {
  flex: 1 1 0;
  min-width: 0;
}
.karte-handwrite-toolbar-third > .zuzu-form-check-row.karte-handwrite-toolbar-check-row {
  justify-content: center;
}

/* user_visit_dr/dh: 治療・ケア詳細 */
.karte-chiryo-table td.karte-chiryo-tooth { cursor: pointer; }
.karte-chiryo-table td[id^="karteCol"] { cursor: pointer; }
.karte-chiryo-table td { border: 1px solid var(--bs-border-color, #dee2e6); }
.karte-chiryo-table td.tooth-cell-selected { background: rgba(33, 150, 243, 0.35) !important; }
.karte-chiryo-table td.tooth-cell-missing { background: rgba(220, 53, 69, 0.12) !important; color: #c00; cursor: not-allowed; font-weight: 600; }
.karte-chiryo-table td.karte-chiryo-baby-pad { border: none; background: transparent; }
.karte-chiryo-kbn-wrap[hidden] { display: none !important; }
/* #17 検査歯式グリッド: 欠損（×）はグレー。入力・選択は可（インプラント等） */
#dental-table-permanent td.tooth-cell-missing-exam,
#dental-table-baby td.tooth-cell-missing-exam,
#dental-table-combined td.tooth-cell-missing-exam {
  background: rgba(108, 117, 125, 0.28) !important;
  color: #6c757d;
}
#dental-table-permanent td.tooth-cell-missing-exam.tooth-cell-selected,
#dental-table-baby td.tooth-cell-missing-exam.tooth-cell-selected,
#dental-table-combined td.tooth-cell-missing-exam.tooth-cell-selected {
  background: rgba(33, 150, 243, 0.35) !important;
  color: inherit;
}
.karte-chiryo-entry-row { display: flex; align-items: flex-start; gap: 0.5rem; flex-wrap: wrap; }
.karte-chiryo-entry-fields { display: flex; gap: 0.5rem; flex: 1 1 auto; min-width: 0; }
.karte-chiryo-entry-field { flex: 1 1 0; min-width: 0; }
.karte-chiryo-entry-actions { display: flex; gap: 0.35rem; flex: 0 0 auto; }
.karte-chiryo-list-table { width: 100%; }
.karte-chiryo-list-table td { vertical-align: middle; padding: 0.25rem; }
#karteChiryoListContainer { max-height: 300px; overflow-y: auto; }
#karteChiryoBtnCancelWrap { display: none; }
#karteChiryoBtnCancelWrap.karte-chiryo-visible { display: block; }

/* 訪問入力: 履歴モーダル・TOC FAB */
.visit-history-list { max-height: min(65vh, 28rem); overflow: auto; }
label.visit-history-row {
  display: flex; align-items: center; gap: 0.5rem; width: 100%;
  padding: 0.5rem 0.75rem; margin-bottom: 0.35rem; border: 1px solid var(--bs-border-color);
  border-radius: 0.375rem; cursor: pointer;
}
label.visit-history-row:has(input:checked) { background: rgba(13, 110, 253, 0.08); }
.visit-history-row-meta { display: flex; flex-direction: column; gap: 0.1rem; font-size: 0.875rem; }
.uvh-toc-scroll-target { scroll-margin-top: 4rem; }
.uvh-toc-fab-root {
  position: fixed; right: 0.75rem;
  bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
  z-index: 200; pointer-events: none;
}
.uvh-toc-fab-root .uvh-toc-fab,
.uvh-toc-fab-root .uvh-toc-panel { pointer-events: auto; }
.uvh-toc-fab { width: 3rem; height: 3rem; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.uvh-toc-panel {
  position: absolute; right: 0; bottom: calc(100% + 0.5rem);
  background: var(--bs-body-bg); border: 1px solid var(--bs-border-color);
  border-radius: 0.375rem; box-shadow: 0 0.25rem 1rem rgba(0,0,0,0.15);
}
.uvh-toc-panel[hidden] { display: none !important; }
.uvh-toc-list { max-height: min(50vh, 22rem); overflow-y: auto; padding: 0.25rem 0; min-width: 12rem; }
.uvh-toc-item {
  display: block; width: 100%; text-align: left; border: none; background: transparent;
  padding: 0.5rem 1rem; font-size: 0.875rem; cursor: pointer;
}
.uvh-toc-item:hover { background: var(--bs-secondary-bg); }

/* mst_staff 一覧: 出勤欄の曜日表をセル幅いっぱい・中央揃え */
.workdays-list-table {
  width: 100%;
}
.workdays-list-table th,
.workdays-list-table td.center-align {
  text-align: center;
}

/* 2026-06-23  list_shift ダイアログ: beer .radio/.checkbox 用 CSS 削除（form-check 正本）。 */
/* list_shift シフト管理 */
.shift-dialog-overlay { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 9999; align-items: center; justify-content: center; }
.shift-dialog-overlay.show { display: flex; }
.shift-dialog { background: var(--bs-body-bg); border-radius: 8px; max-width: 360px; width: 90%; padding: 20px; }
.shift-row-nav { display: flex; gap: 0.5rem; align-items: stretch; margin-bottom: 8px; }
.shift-row-nav:last-child { margin-bottom: 0; }
.shift-field-wrap { position: relative; min-height: 2.5rem; display: flex; align-items: center; padding-inline-end: 2.25rem; }
.shift-field-wrap .btn-caution-menu { position: absolute; top: 6px; right: 6px; z-index: 2; width: 28px; height: 28px; padding: 0; display: inline-flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.06); color: #666; border: none; border-radius: 50%; cursor: pointer; line-height: 1; }
.shift-field-wrap .btn-caution-menu:hover { background: rgba(0, 0, 0, 0.1); color: #333; }
.shift-placeholder { color: #999; }
.shift-cell .field.border.small { flex: 1; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius); padding: 0.25rem 0.5rem; min-width: 0; }
.shift-cell .button.small { padding: 0.25rem 0.5rem; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius); background: var(--bs-body-bg); cursor: pointer; }

/* list_items 月別使用テーブル */
.list-items-month-table tbody td { padding: 0.2rem 0.45rem; vertical-align: top; }
.list-items-month-table > tbody > tr:not(:last-child) > td,
.list-items-month-table > thead > tr > th { border-bottom-color: color-mix(in srgb, var(--bs-border-color) 45%, #fff); }
.list-items-month-table > tfoot > tr > td { border-top-color: color-mix(in srgb, var(--bs-border-color) 45%, #fff); }

/* ファイルアップロード（mst_clinic 等） */
.drop-overlay-wrap { position: relative; }
.drop-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; border: 2px dashed var(--bs-primary); border-radius: var(--bs-border-radius); background: var(--bs-secondary-bg); color: var(--bs-primary); font-size: 0.875rem; z-index: 1; opacity: 0; pointer-events: none; transition: opacity 0.15s; }
.drop-overlay.is-visible { opacity: 1; pointer-events: auto; }
.upload-progress-track { width: 100%; height: 8px; background: var(--bs-secondary-bg); border-radius: 1rem; overflow: hidden; }
.upload-progress-fill { height: 100%; width: 0%; background: var(--bs-primary); border-radius: 1rem; transition: width 0.1s; }

/* 検診名簿（kenshin_namebo） */
.kenshin-namebo-table th.kenshin-col-compact,
.kenshin-namebo-table td.kenshin-col-compact {
  width: 1%;
  white-space: nowrap;
  vertical-align: middle;
  padding-left: 0.625rem;
  padding-right: 0.625rem;
}
.kenshin-namebo-table th.kenshin-col-datetime,
.kenshin-namebo-table td.kenshin-col-datetime,
.kenshin-namebo-table th.kenshin-col-linked,
.kenshin-namebo-table td.kenshin-col-linked,
.kenshin-namebo-table th.kenshin-qr-col,
.kenshin-namebo-table td.kenshin-qr-col {
  text-align: center;
}
a.qr-modal-trigger {
  cursor: pointer;
  display: inline-block;
  line-height: 0;
}
a.qr-modal-trigger img.wid60 {
  width: 60px;
  height: 60px;
  max-width: 60px;
  max-height: 60px;
  object-fit: contain;
  display: block;
}
.kenshin-namebo-table td.kenshin-namebo-name-cell {
  padding: 0;
  vertical-align: middle;
}
.kenshin-namebo-table a.kenshin-namebo-name-link {
  display: flex;
  align-items: center;
  min-height: 60px;
  padding: 0.5rem 0.75rem;
  color: inherit;
  text-decoration: none;
}
.kenshin-namebo-table a.kenshin-namebo-name-link:hover {
  background: var(--bs-secondary-bg);
}
#modal_qr_img {
  width: auto;
  height: auto;
  max-width: min(280px, 80vw);
  max-height: min(280px, 80vw);
}

/* 2026-07-02  form 内 hidden 群と .zuzu-shell の間: flex 匿名テキストの行高でヘッダー上に隙間が出るのを防ぐ。.zuzu-shell 内で font を復元。 */
html.zuzu-shell-doc body > form,
html:has(> body > form > .zuzu-shell) body > form {
  font-size: 0;
  line-height: 0;
  gap: 0;
}
html.zuzu-shell-doc body > form > .zuzu-shell,
html:has(> body > form > .zuzu-shell) body > form > .zuzu-shell {
  font-size: var(--bs-body-font-size, 1rem);
  line-height: var(--bs-body-line-height, 1.5);
}

/* ヘッダー上段カルテ番号（okuchi2 固有・user_*）。色は Bootstrap text-primary。行間0・小さめ字。 */
.okuchi-header-karte {
  font-size: 0.75rem;
  line-height: 1;
  margin: 0;
}

/* === 2026-07-23  okuchi.css 回収（未読込だった生きたルールを第3層へ）===
 * 旧 okuchi.css / okuchi-zuzu.css からの移設。アポ系は zuzu-appoint.css 正本。
 * beer `.field-with-button` 保険証ルールは input-group 化済みのため持ち込まない。
 */

.list-yotei-route-link { cursor: pointer; text-decoration: none; color: #3788d8; }

.list-yotei-route-link:hover { opacity: 0.8; }

.list-yotei-route-row { cursor: pointer; text-decoration: none; }

.list-yotei-route-inline { display: inline-block; margin-left: 0.25rem; vertical-align: middle; cursor: pointer; text-decoration: none; }

/* 治療記録（user_karte_top） */
.karte-chiryo-table td[id^="karteCol"] { cursor: pointer; }

.karte-chiryo-list-item { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--field); cursor: pointer; }

.karte-chiryo-list-item:last-child { border-bottom: none; }

.karte-chiryo-list-item:hover { background: var(--surface-variant); }

.karte-chiryo-list-item.editing { background: rgba(255, 165, 0, 0.15) !important; }

#top .field input,
#top .field textarea,
#top .field select,
#top #karteChiryoNote { background-color: #fff !important; }

/* 訪問入力履歴（user_visit_dr / user_visit_dh）: 通常 modal の一段広い幅＋ラジオ1行 */
dialog.visit-history-modal.modal.large {
  width: min(92vw, 36rem);
  max-width: 36rem;
  padding: 1rem 1.25rem 1.1rem;
}

.visit-history-list {
  max-height: min(65vh, 28rem);
  overflow: auto;
  min-height: 2.5rem;
  /* 親 dialog の角丸＋ overflow と二重にならないよう、内側へ余白（行の角が欠けない） */
  margin: 0;
  padding: 0.5rem 0.35rem 0.65rem;
  border-radius: 0;
}

label.radio.visit-history-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  margin: 0;
  padding: 0.55rem 0.65rem;
  /* スクロール枠内では角丸を弱くし、クリップで欠けにくくする */
  border-radius: 4px;
  border: 1px solid var(--outline, #e0e0e0);
  background-color: #fff;
  cursor: pointer;
  flex-wrap: nowrap;
  box-sizing: border-box;
}

label.radio.visit-history-row + label.radio.visit-history-row {
  margin-top: 0.45rem;
}

label.radio.visit-history-row:hover {
  background-color: #f7f9fc;
}

label.radio.visit-history-row:has(input:checked) {
  border-color: var(--primary, #3788d8);
  background-color: #fff;
  box-shadow: inset 0 0 0 1px rgba(55, 136, 216, 0.35);
}

label.radio.visit-history-row input[type="radio"] {
  flex: 0 0 auto;
  margin: 0;
}

.visit-history-row-date {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex: 0 0 auto;
  font-weight: 500;
  color: var(--on-surface, #1a1a1a);
}

.visit-history-row-staff {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--on-surface-variant, #555);
}

/* ご家族情報（KP）表示ブロック：border-b のみ。grid で s12 氏名+振り仮名 / s12 郵便番号+住所 / s12 m4×3 tel・携帯・email。ペン・ごみ箱は右上に絶対配置 */
.kp-family-block {
  position: relative;
  padding-right: 4rem;
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--md-sys-color-outline-variant, #e0e0e0);
}

.kp-family-block .grid {
  gap: 0;
  margin: 2px 0;
  line-height: 1.1;
}

.kp-family-block .grid > * {
  margin: 0;
  line-height: 1.1;
}

.kp-family-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  display: inline-flex;
  gap: 4px;
}

.kp-family-block .kp-family-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
}

.kp-family-postal-address {
  word-break: break-all;
}

.kp-family-tel,
.kp-family-mobile,
.kp-family-email {
  font-size: 0.9rem;
}

/* 会社編集：管理者メールアドレス・パスワードの背景を白に（BeerCSS・autofill 対策） */
#mst-company-edit .field.border.small input[type="email"],
#mst-company-edit .field.border.small input[type="password"] {
  background: #fff !important;
  background-color: #fff !important;
}

#mst-company-edit .field.border.small input[type="email"]:-webkit-autofill,
#mst-company-edit .field.border.small input[type="email"]:-webkit-autofill:hover,
#mst-company-edit .field.border.small input[type="email"]:-webkit-autofill:focus,
#mst-company-edit .field.border.small input[type="password"]:-webkit-autofill,
#mst-company-edit .field.border.small input[type="password"]:-webkit-autofill:hover,
#mst-company-edit .field.border.small input[type="password"]:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
  box-shadow: 0 0 0 1000px #fff inset !important;
}

/* 患者基本情報：編集モードONのとき「編集」を色で表示（形は変えず色のみ） */
#btnEditBasic.edit-mode-on {
  background: rgba(25, 118, 210, 0.28);
  color: #1565c0;
}

/* patient_basic の選択モーダル：幅を最大に統一 */
#modal_select_caution,
#modal_select_drug {
  width: 95vw;
  max-width: 960px;
  min-inline-size: min(95vw, 960px);
  inline-size: min(95vw, 960px);
  block-size: auto;
  max-block-size: 90vh;
}

/* trust_apply: 会社コード入力 + 検索ボタンの縦位置を揃える */
.trust-search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem;
}

.trust-search-row .trust-search-input {
  flex: 1 1 18rem;
  min-width: 14rem;
}

.trust-search-row .trust-search-button {
  flex: 0 0 auto;
  margin-bottom: 0.125rem;
}

.upload-progress-wrap { padding: 0.75rem 1rem; }

.upload-progress-percent { text-align: right; font-size: 0.875rem; margin-bottom: 0.35rem; color: var(--on-surface-variant, #666); }

.list-yotei-tabs .list-yotei-route-btn { padding: 0.35rem 0.6rem !important; min-block-size: auto !important; block-size: auto !important; }

#user-nav-toggle {
  align-self: center;
}

#user-side-nav.max #user-nav-toggle {
  margin-inline-start: auto;
  align-self: flex-start;
}

/* スマホ時: 左列は最小 3.5rem、中身で伸びる */
@media (max-width: 992px) {
  .page-layout {
    grid-template-columns: minmax(3.5rem, auto) 1fr auto !important;
  }
  .page-layout .user-side-nav-band {
    inline-size: 100% !important;
    min-inline-size: 0 !important;
    max-inline-size: none !important;
    padding-inline: 0 !important;
    padding-block: 0.25rem 0 !important;
    box-sizing: border-box;
  }
  .page-layout .user-side-nav-band .user-side-nav {
    inline-size: 100% !important;
    min-inline-size: 0 !important;
    max-inline-size: none !important;
    padding-block: 0.25rem 0 !important;
    padding-inline: 0.35rem !important;
    align-items: center !important;
    text-align: center !important;
    box-sizing: border-box;
  }
  .page-layout .user-side-nav-band #user-nav-toggle {
    margin-inline: 0 !important;
  }
  .page-layout nav.left.max {
    min-inline-size: 0 !important;
    max-inline-size: 100% !important;
  }
  .page-layout nav.left.max > a > div { display: none; }
  .page-layout nav.left.max > a {
    flex-direction: column;
    inline-size: 100%;
    max-inline-size: 4rem;
    padding: 0.25rem;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
  }
}

/* 保険証画面 (user_hoken.php): ファイル一覧・共有モーダル */
#file-list-wrap .file-grid { grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); }

#file-list-wrap .file-grid .file-item { position: relative; }

#file-list-wrap .file-grid .file-item-icon-wrap { position: relative; display: block; width: 100%; aspect-ratio: 1; }

#file-list-wrap .file-grid .file-item-icon { width: 100%; height: 100%; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }

#file-list-wrap .file-grid .file-item-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }

#file-list-wrap .file-grid .btn-file-menu { position: absolute; top: 6px; right: 6px; z-index: 2; width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.5); color: #fff; border: none; border-radius: 50%; cursor: pointer; line-height: 1; }

#file-list-wrap .file-grid .btn-file-menu:hover { background: rgba(0,0,0,0.7); color: #fff; }

.file-menu-modal-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.5); display: none; align-items: center; justify-content: center; padding: 1rem; box-sizing: border-box; }

.file-menu-modal-overlay.is-open { display: flex; }

.file-menu-modal-content { background: var(--md-sys-color-surface-container-high, #fff); border-radius: 12px; min-width: 16rem; max-width: 90vw; box-shadow: 0 8px 24px rgba(0,0,0,0.2); }

.file-menu-modal-title { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 1rem 1.25rem; border-bottom: 1px solid rgba(0,0,0,0.12); font-weight: 600; font-size: 1rem; box-sizing: border-box; }

.file-menu-modal-title .btn-file-delete { width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: none; border: none; cursor: pointer; color: var(--md-sys-color-error, #b3261e); }

.file-menu-modal-title .btn-file-delete:hover { opacity: 0.8; }

.file-menu-modal-body .file-menu-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0.75rem 1.25rem; }

.file-menu-modal-body .file-menu-label { font-size: 0.875rem; }

.file-menu-modal-body .file-menu-divider { height: 1px; margin: 0; background: rgba(0,0,0,0.12); }

.file-menu-modal-footer { padding: 0.5rem 1.25rem; border-top: 1px solid rgba(0,0,0,0.12); text-align: right; }

.file-menu-modal-footer .btn-file-menu-close { font-size: 0.8125rem; color: var(--md-sys-color-primary); cursor: pointer; background: none; border: none; text-decoration: underline; }

.file-menu-modal-footer .btn-file-menu-close:hover { opacity: 0.8; }

/* 保険証アップロード (user_hoken_up.php) */
.hoken-up-pending-list { max-height: 20rem; overflow-y: auto; }

.hoken-up-pending-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0; border-bottom: 1px solid rgba(0,0,0,0.08); flex-wrap: wrap; }

.hoken-up-pending-row:last-child { border-bottom: none; }

.hoken-up-pending-name { flex: 1 1 8rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.875rem; }

.hoken-up-pending-summary { flex: 0 0 auto; font-size: 0.75rem; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; }

.hoken-up-pending-actions { flex: 0 0 auto; display: flex; gap: 0.25rem; align-items: center; }

/* user_visit_home: 治療・ケア詳細（karte chiryo）・歯式図ブロック */
#karteChiryoSelectedTooth { color: var(--primary); }

#karteAiAnalysisWrap .karte-ai-btn { display: flex; width: 80%; max-width: none; margin: 0 auto; }

#karte-dental-chart-block { display: none; position: relative; z-index: 1; }

#karte-dental-chart-block.karte-dental-chart-visible { display: block; }

.karte-dental-chart-inner { position: relative; width: 700px; height: 600px; margin: 0 auto; max-width: 100%; }

.karte-dental-chart-bg { position: absolute; left: 0; top: 0; width: 100%; height: auto; }

/* user_filing.php / user_report.php: Beer table.border の td 下線をオフ。日付ブロック間は <hr> 行で区切り */
.surface table.filing-list-outer > tbody > tr > td {
  border-block-end: none !important;
}

/* 日付列: 幅は HTML の wid100（ymir）で固定。td に Beer .top-align を付けない（display:flex で列幅が崩れる） */
.surface table.filing-list-outer > tbody > tr.filing-day-row > td:first-child {
  padding-top: 6px;
  padding-bottom: 6px;
  padding-inline-end: 0.5rem;
  vertical-align: top;
  white-space: nowrap;
  box-sizing: border-box;
}

/* user_report.php: 日付列を内側 .button.small の文字位置に近づける */
.surface table.filing-list-outer.filing-list-report > tbody > tr.filing-day-row > td:first-child {
  padding-top: 10px;
}

.surface table.filing-list-outer > tbody > tr.filing-day-row > td:last-child {
  padding: 4px 4px 4px 0;
  vertical-align: top;
}

.surface table.filing-list-outer > tbody > tr.filing-day-sep > td {
  padding: 0;
  vertical-align: middle;
}

.surface table.filing-list-outer hr.filing-day-hr {
  margin: 0;
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

/* user_filing.php / user_report.php: 内側ファイル行は枠なし・行詰め */
.surface table.filing-inner-table {
  border-collapse: collapse;
  border: none;
  margin: 0;
}

.surface table.filing-inner-table td {
  border: none !important;
  padding: 2px;
  vertical-align: middle;
  line-height: 1.2;
}

.surface table.filing-inner-table .button.small {
  padding-top: 2px;
  padding-bottom: 2px;
  min-height: 0;
  line-height: 1.2;
}

.surface table.filing-inner-table label.switch {
  margin: 0;
}

/* user_filing.php: 1列目を広げ帳票・届出の2列目を表の右端へ */
.surface table.filing-inner-table td.filing-inner-main {
  width: 100%;
}

/* user_filing.php: 内側2列目（編集・削除）を右寄せ・行の縦中央で統一（top-align との差を解消） */
.surface table.filing-inner-table td.filing-cell-actions {
  text-align: right;
  vertical-align: middle;
}

.surface table.filing-inner-table .filing-row-actions {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
}

/* 鉛筆・ゴミ箱: 同じボックスで縦位置を揃える */
.surface table.filing-inner-table a.filing-row-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0.15rem 0.35rem;
  box-sizing: border-box;
  min-height: 1.5rem;
  min-width: 1.5rem;
}

.surface table.filing-inner-table a.filing-row-action-icon i {
  line-height: 1;
}

/* user_visit_home: 右下 FAB。一覧は div+button（BeerCSS menu の行に近い見た目のみ） */
.uvh-toc-scroll-target {
  scroll-margin-top: 4rem;
}

.uvh-toc-fab-root {
  position: fixed;
  right: 0.75rem;
  bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  pointer-events: none;
}

.uvh-toc-fab-root .uvh-toc-fab,
.uvh-toc-fab-root .uvh-toc-panel {
  pointer-events: auto;
}

/* FAB: オレンジ塗り + アイコンを白（Beer の .orange は背景のみのため補足） */
.uvh-toc-fab-root .uvh-toc-fab.button.orange {
  color: #fff !important;
}

.uvh-toc-fab-root .uvh-toc-fab.button.orange > i {
  color: inherit;
}

.uvh-toc-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.5rem);
  padding: 0;
  margin: 0;
  overflow: visible;
  background: transparent;
  border: none;
  box-shadow: none;
}

/* beer.css menu に寄せたパネル（見た目のみ） */
.uvh-toc-list {
  box-sizing: border-box;
  background-color: var(--surface-container);
  color: var(--on-surface);
  box-shadow: var(--elevate2);
  border-radius: 0.25rem;
  padding: 0.5rem 0;
  margin: 0;
  inline-size: max-content;
  min-inline-size: min(16rem, calc(100vw - 2rem));
  max-inline-size: min(20rem, calc(100vw - 2rem));
  max-block-size: min(50vh, 22rem);
  overflow-x: hidden;
  overflow-y: auto;
  font-size: 1rem;
  font-weight: normal;
  text-align: start;
}

.uvh-toc-item {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 0.5rem 1rem;
  min-block-size: 3rem;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
  white-space: nowrap;
}

.uvh-toc-item:hover,
.uvh-toc-item:focus-visible {
  background-color: var(--active);
}

.uvh-toc-item-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 2026-04-10 検査記号一覧: オプションセル・並び替えが操作できることを示す */
.kensa-kigo-list-table .kensa-kigo-opt {
  cursor: pointer;
}

.kensa-kigo-list-table tbody tr .handle-cell {
  cursor: grab;
}

/* 保険証アップロード: プレビュー／OCR 表示（input-group 化後も class は継続利用） */
.hoken-up-preview-card {
  border: 1px solid var(--line, #ddd);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  background: var(--panel, rgba(255, 255, 255, 0.4));
}

.hoken-up-preview-card .hoken-up-thumb {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  margin: 0 auto 0.75rem;
}

.hoken-up-preview-meta {
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 0.5rem;
}

.hoken-up-preview-meta dt {
  color: var(--dim, #666);
  font-size: 0.75rem;
  margin: 0.35rem 0 0.1rem;
}

.hoken-up-preview-meta dd {
  margin: 0 0 0.25rem;
  word-break: break-word;
}

.hoken-up-ocr-ta {
  min-block-size: 10rem;
  font-size: 0.8rem;
  font-family: ui-monospace, Consolas, monospace;
}

/* 訪問 実施内容: 前回／今回／次回タブ — 全タブに枠線、アクティブは薄い色 */
#visitJisshiTabs {
  border-bottom: 0;
}
#visitJisshiTabs .nav-link {
  position: relative;
  z-index: 0;
  margin-bottom: -1px;
  border: 1px solid var(--bs-border-color, #dee2e6);
  color: var(--bs-body-color, #212529);
  background-color: var(--bs-body-bg, #fff);
  border-radius: 0;
}
#visitJisshiTabs .nav-item + .nav-item .nav-link {
  margin-left: -1px;
}
#visitJisshiTabs .nav-item:first-child .nav-link {
  border-top-left-radius: var(--bs-border-radius, 0.375rem);
}
#visitJisshiTabs .nav-item:last-child .nav-link {
  border-top-right-radius: var(--bs-border-radius, 0.375rem);
}
#visitJisshiTabs .nav-link:hover,
#visitJisshiTabs .nav-link:focus {
  border-color: var(--bs-border-color, #dee2e6);
  isolation: isolate;
  z-index: 1;
}
#visitJisshiTabs .nav-link.active {
  z-index: 2;
  background-color: rgba(13, 110, 253, 0.12);
  color: var(--bs-primary, #0d6efd);
  font-weight: 600;
  border-color: var(--bs-border-color, #dee2e6);
  border-bottom-color: var(--bs-body-bg, #fff);
}

/* 実施内容 zuzu-voice マイク: caution「…」と同型の右上丸 */
.zuzu-voice-field .zuzu-voice-mic {
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.06);
  color: #666;
  border-radius: 50%;
}
.zuzu-voice-field .zuzu-voice-mic:hover,
.zuzu-voice-field .zuzu-voice-mic:focus {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
}
.zuzu-voice-field.zuzu-voice-recording .zuzu-voice-mic {
  background: rgba(220, 53, 69, 0.12);
  color: #dc3545;
}
