/*!
 * bs3-compat.css — Bootstrap 5 の上で、Bootstrap 3 の見た目と、bootstrap5-upgrade が残したクラスを再現する（edisone-upgrade の bootstrap5-upgrade が置く）
 * 読み込みは Bootstrap 5 の CSS の直後、案件の CSS（custom.css など）の前。案件ごとの調整はこのファイルを直さず、案件の CSS に書く（流し直すと上書きされる）
 * 値は Bootstrap 3.4.1 のもの。:where() で詳細度を 0 にしたものは、Bootstrap 5 のクラスや案件の CSS が勝つ
 */

/* ---- 1. 基本（文字の大きさ・行の高さ・リンク・見出し） ---------------------------------------- */
/* 本文は 3 が 14px / 1.42857、5 が 16px / 1.5。根（rem）を 14px にして、5 の余白・部品も 3 の大きさに近づける。3 の根は 10px だったので、案件の CSS の rem は大きくなる（bootstrap5-upgrade が CSS-REM の印を付ける） */
html { font-size: 14px; }
:root {
  --bs-body-font-size: 14px; --bs-body-line-height: 1.42857143; --bs-body-color: #333; --bs-body-color-rgb: 51, 51, 51;
  --bs-link-color: #337ab7; --bs-link-color-rgb: 51, 122, 183; --bs-link-hover-color: #23527c; --bs-link-hover-color-rgb: 35, 82, 124;
  --bs-primary: #337ab7; --bs-primary-rgb: 51, 122, 183; --bs-success: #5cb85c; --bs-success-rgb: 92, 184, 92;
  --bs-info: #5bc0de; --bs-info-rgb: 91, 192, 222; --bs-warning: #f0ad4e; --bs-warning-rgb: 240, 173, 78;
  --bs-danger: #d9534f; --bs-danger-rgb: 217, 83, 79; --bs-secondary: #777; --bs-secondary-rgb: 119, 119, 119;
  --bs-border-color: #ddd; --bs-border-radius: 4px; --bs-border-radius-sm: 3px; --bs-border-radius-lg: 6px;
  --bs-body-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;   /* 5 は system-ui */
}
:root { scroll-behavior: auto; }                     /* 5 は smooth（jQuery の animate({scrollTop}) と重なって遅れる・止まる。3 は無し） */
a { text-decoration: none; }                         /* 5 は既定で下線あり */
a:hover, a:focus { text-decoration: underline; }
a.btn:hover, a.btn:focus, a.nav-link:hover, a.dropdown-item:hover, a.page-link:hover, a.list-group-item:hover, a.badge:hover,
.navbar-brand:hover, .navbar-brand:focus, a.btn-close:hover, .carousel-control-prev:hover, .carousel-control-next:hover { text-decoration: none; }
p { margin: 0 0 10px; }
dl { margin-top: 0; margin-bottom: 20px; } dd { margin-bottom: 0; }   /* 5 は dl の下 1rem、dd の下 .5rem */
ul, ol { padding-left: 40px; margin-top: 0; margin-bottom: 10px; }   /* 5 は 2rem（ブラウザの既定 40px を変えた） */
ul ul, ul ol, ol ul, ol ol { margin-bottom: 0; }
.lead { margin-bottom: 20px; font-size: 16px; font-weight: 300; line-height: 1.4; }
@media (min-width: 768px) { .lead { font-size: 21px; } }
/* 3 の blockquote（5 は .blockquote のクラスに見た目を移した。5 の書き方の .blockquote には当てない） */
blockquote:not(.blockquote) { padding: 10px 20px; margin: 0 0 20px; font-size: 17.5px; border-left: 5px solid #eee; }
blockquote:not(.blockquote) p:last-child, blockquote:not(.blockquote) ul:last-child, blockquote:not(.blockquote) ol:last-child { margin-bottom: 0; }
blockquote:not(.blockquote) footer, blockquote:not(.blockquote) small, blockquote:not(.blockquote) .small { display: block; font-size: 80%; line-height: 1.42857143; color: #777; }
blockquote:not(.blockquote) footer::before, blockquote:not(.blockquote) small::before { content: "\2014 \00A0"; }
.blockquote-reverse, blockquote.float-end { padding-right: 15px; padding-left: 0; text-align: right; border-right: 5px solid #eee; border-left: 0; }
/* 3 の code・kbd・pre（5 は code が桃色で背景なし） */
code { padding: 2px 4px; font-size: 90%; color: #c7254e; background-color: #f9f2f4; border-radius: 4px; }
kbd { padding: 2px 4px; font-size: 90%; color: #fff; background-color: #333; border-radius: 3px; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); }
pre { display: block; padding: 9.5px; margin: 0 0 10px; font-size: 13px; line-height: 1.42857143; color: #333; word-break: break-all; word-wrap: break-word; background-color: #f5f5f5; border: 1px solid #ccc; border-radius: 4px; }
pre code { padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap; background-color: transparent; border-radius: 0; }
.pre-scrollable { max-height: 340px; overflow-y: scroll; }   /* 5 で無くなった */
h1, .h1, h2, .h2, h3, .h3 { margin-top: 20px; margin-bottom: 10px; }
h4, .h4, h5, .h5, h6, .h6 { margin-top: 10px; margin-bottom: 10px; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-weight: 500; line-height: 1.1; }
h1, .h1 { font-size: 36px; } h2, .h2 { font-size: 30px; } h3, .h3 { font-size: 24px; }
h4, .h4 { font-size: 18px; } h5, .h5 { font-size: 14px; } h6, .h6 { font-size: 12px; }
label { display: inline-block; max-width: 100%; margin-bottom: 5px; font-weight: 700; }   /* 5 は太字でない */
hr { margin-top: 20px; margin-bottom: 20px; border: 0; border-top: 1px solid #eee; opacity: 1; color: inherit; }
legend { float: none; width: 100%; padding: 0; margin-bottom: 20px; font-size: 21px; line-height: inherit; color: #333; border: 0; border-bottom: 1px solid #e5e5e5; }
.text-primary { color: #337ab7 !important; } .text-success { color: #3c763d !important; } .text-info { color: #31708f !important; }
.text-warning { color: #8a6d3b !important; } .text-danger { color: #a94442 !important; } .text-muted { color: #777 !important; }
.bg-success-subtle { background-color: #dff0d8 !important; } .bg-info-subtle { background-color: #d9edf7 !important; }   /* 3 の bg-*（薄い背景） */
.bg-warning-subtle { background-color: #fcf8e3 !important; } .bg-danger-subtle { background-color: #f2dede !important; }

/* ---- 2. 段組み（3 は float、5 は flex） ----------------------------------------------------------- */
/* 3 は .row の外の col-* も横に並ぶ（float）。5 は .row（flex）の中でないと縦に積まれるので、.row の外では 3 と同じ float にする。
   .row の中では flex が勝つ（flex の子に float は効かない）。詳細度 0 なので 5 の .row > * の余白が勝つ */
/* 段組みの名前だけ（col-steps・col-middle などの自前のクラスには当てない） */
:where([class^="col-1"], [class*=" col-1"], [class^="col-2"], [class*=" col-2"], [class^="col-3"], [class*=" col-3"], [class^="col-4"], [class*=" col-4"],
       [class^="col-5"], [class*=" col-5"], [class^="col-6"], [class*=" col-6"], [class^="col-7"], [class*=" col-7"], [class^="col-8"], [class*=" col-8"],
       [class^="col-9"], [class*=" col-9"], [class^="col-sm-"], [class*=" col-sm-"], [class^="col-md-"], [class*=" col-md-"], [class^="col-lg-"], [class*=" col-lg-"],
       [class^="col-xl-"], [class*=" col-xl-"]) { position: relative; min-height: 1px; padding-right: 15px; padding-left: 15px; }
:where(.col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12) { float: left; }
@media (min-width: 768px) { :where([class^="col-md-"], [class*=" col-md-"]) { float: left; } }
@media (min-width: 992px) { :where([class^="col-lg-"], [class*=" col-lg-"]) { float: left; } }
@media (min-width: 1200px) { :where([class^="col-xl-"], [class*=" col-xl-"]) { float: left; } }
.row:not([class^="g-"], [class*=" g-"], [class^="gx-"], [class*=" gx-"]) { --bs-gutter-x: 30px; }   /* 3 の溝は 30px（5 は 1.5rem）。g-0 などを書いた 5 の row には当てない */
.container, .container-fluid { padding-right: 15px; padding-left: 15px; }
.container::after, .container-fluid::after, .card-body::after { display: table; clear: both; content: ""; }   /* 3 の clearfix（.row の外に並べた float の col-*、float-end だけの panel-body の高さが 0 にならない） */
.container { max-width: none; }                      /* 3 の幅: 768 未満は 100%、768 で 750、992 で 970、1200 で 1170 */
@media (min-width: 768px) { .container { max-width: 750px; } }
@media (min-width: 992px) { .container { max-width: 970px; } }
@media (min-width: 1200px) { .container { max-width: 1170px; } }

/* ---- 3. ボタン ------------------------------------------------------------------------------------ */
.btn { margin-bottom: 0; --bs-btn-padding-x: 12px; --bs-btn-padding-y: 6px; --bs-btn-font-size: 14px; --bs-btn-line-height: 1.42857143; --bs-btn-border-radius: 4px; --bs-btn-font-weight: 400; }
.btn-sm, .btn-group-sm > .btn { --bs-btn-padding-x: 10px; --bs-btn-padding-y: 5px; --bs-btn-font-size: 12px; --bs-btn-line-height: 1.5; --bs-btn-border-radius: 3px; }
.btn-lg, .btn-group-lg > .btn { --bs-btn-padding-x: 16px; --bs-btn-padding-y: 10px; --bs-btn-font-size: 18px; --bs-btn-line-height: 1.3333333; --bs-btn-border-radius: 6px; }
.btn-light {                                          /* 3 の btn-default（bootstrap5-upgrade は btn-default を btn-light にする） */
  --bs-btn-color: #333; --bs-btn-bg: #fff; --bs-btn-border-color: #ccc;
  --bs-btn-hover-color: #333; --bs-btn-hover-bg: #e6e6e6; --bs-btn-hover-border-color: #adadad;
  --bs-btn-active-color: #333; --bs-btn-active-bg: #e6e6e6; --bs-btn-active-border-color: #adadad;
  --bs-btn-disabled-color: #333; --bs-btn-disabled-bg: #fff; --bs-btn-disabled-border-color: #ccc; --bs-btn-focus-shadow-rgb: 204, 204, 204;
}
.btn-primary { --bs-btn-bg: #337ab7; --bs-btn-border-color: #2e6da4; --bs-btn-hover-bg: #286090; --bs-btn-hover-border-color: #204d74; --bs-btn-active-bg: #204d74; --bs-btn-active-border-color: #122b40; --bs-btn-disabled-bg: #337ab7; --bs-btn-disabled-border-color: #2e6da4; --bs-btn-focus-shadow-rgb: 51, 122, 183; }
.btn-success { --bs-btn-bg: #5cb85c; --bs-btn-border-color: #4cae4c; --bs-btn-hover-bg: #449d44; --bs-btn-hover-border-color: #398439; --bs-btn-active-bg: #398439; --bs-btn-active-border-color: #255625; --bs-btn-disabled-bg: #5cb85c; --bs-btn-disabled-border-color: #4cae4c; --bs-btn-focus-shadow-rgb: 92, 184, 92; }
.btn-info { --bs-btn-color: #fff; --bs-btn-bg: #5bc0de; --bs-btn-border-color: #46b8da; --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #31b0d5; --bs-btn-hover-border-color: #269abc; --bs-btn-active-color: #fff; --bs-btn-active-bg: #269abc; --bs-btn-active-border-color: #1b6d85; --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: #5bc0de; --bs-btn-disabled-border-color: #46b8da; --bs-btn-focus-shadow-rgb: 91, 192, 222; }
.btn-warning { --bs-btn-color: #fff; --bs-btn-bg: #f0ad4e; --bs-btn-border-color: #eea236; --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #ec971f; --bs-btn-hover-border-color: #d58512; --bs-btn-active-color: #fff; --bs-btn-active-bg: #d58512; --bs-btn-active-border-color: #985f0d; --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: #f0ad4e; --bs-btn-disabled-border-color: #eea236; --bs-btn-focus-shadow-rgb: 240, 173, 78; }
.btn-danger { --bs-btn-bg: #d9534f; --bs-btn-border-color: #d43f3a; --bs-btn-hover-bg: #c9302c; --bs-btn-hover-border-color: #ac2925; --bs-btn-active-bg: #ac2925; --bs-btn-active-border-color: #761c19; --bs-btn-disabled-bg: #d9534f; --bs-btn-disabled-border-color: #d43f3a; --bs-btn-focus-shadow-rgb: 217, 83, 79; }
.btn-xs, .btn-group-xs > .btn { --bs-btn-padding-x: 5px; --bs-btn-padding-y: 1px; --bs-btn-font-size: 12px; --bs-btn-line-height: 1.5; --bs-btn-border-radius: 3px; }
.btn.w-100 + .btn.w-100 { margin-top: 5px; }
.btn-toolbar { margin-left: -5px; }                 /* 3 の btn-toolbar の間（5 は余白なし） */
.btn-toolbar > .btn, .btn-toolbar > .btn-group, .btn-toolbar > .input-group { margin-left: 5px; }        /* 3 の btn-block を縦に並べたときの間（bootstrap5-upgrade は btn-block を w-100 にする） */
.btn-link { --bs-btn-color: #337ab7; --bs-btn-hover-color: #23527c; text-decoration: none; }
.btn-link:hover, .btn-link:focus { text-decoration: underline; }

/* ---- 4. フォーム -------------------------------------------------------------------------------- */
.form-control { height: 34px; padding: 6px 12px; font-size: 14px; line-height: 1.42857143; color: #555; border-color: #ccc; border-radius: 4px; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); }
.form-control:focus { border-color: #66afe9; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6); }
textarea.form-control, select[multiple].form-control, select[size].form-control { height: auto; }
.form-control[readonly], .form-control:disabled, fieldset[disabled] .form-control { background-color: #eee; opacity: 1; }   /* 3 の灰色（5 は readonly でも白） */
.input-group-sm > .form-control { height: 30px; padding: 5px 10px; font-size: 12px; line-height: 1.5; border-radius: 3px; }   /* 上の .form-control の 34px が 5 の input-group-sm に勝つので、3 の値に戻す */
.input-group-lg > .form-control { height: 46px; padding: 10px 16px; font-size: 18px; line-height: 1.3333333; border-radius: 6px; }
select.form-control { appearance: auto; -webkit-appearance: menulist; }   /* 5 は select に form-select を使い、form-control だと矢印が消える */
.form-control-sm { height: 30px; padding: 5px 10px; font-size: 12px; line-height: 1.5; border-radius: 3px; }
.form-control-lg { height: 46px; padding: 10px 16px; font-size: 18px; line-height: 1.3333333; border-radius: 6px; }
.form-control-plaintext { min-height: 34px; padding-top: 7px; padding-bottom: 7px; }
.form-group { margin-bottom: 15px; }
.help-block { display: block; margin-top: 5px; margin-bottom: 10px; color: #737373; }
.form-text { color: #737373; }
.input-group-text { padding: 6px 12px; font-size: 14px; color: #555; background-color: #eee; border-color: #ccc; }
.input-group-btn { position: relative; display: flex; white-space: nowrap; }
.input-group > .input-group-btn > .btn { position: relative; }
.input-group > .input-group-btn:first-child > .btn { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > .input-group-btn:last-child > .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }
.input-group > .form-control:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }

/* 3 の checkbox / radio の組み立て（div.checkbox > label > input）。5 は form-check */
.checkbox, .radio { position: relative; display: block; margin-top: 10px; margin-bottom: 10px; }
.checkbox label, .radio label { min-height: 20px; padding-left: 20px; margin-bottom: 0; font-weight: 400; cursor: pointer; }
.checkbox input[type="checkbox"], .checkbox-inline input[type="checkbox"], .radio input[type="radio"], .radio-inline input[type="radio"] { position: absolute; margin-top: 4px; margin-left: -20px; }
.checkbox + .checkbox, .radio + .radio { margin-top: -5px; }
.checkbox-inline, .radio-inline { position: relative; display: inline-block; padding-left: 20px; margin-bottom: 0; font-weight: 400; vertical-align: middle; cursor: pointer; }
.checkbox-inline + .checkbox-inline, .radio-inline + .radio-inline { margin-top: 0; margin-left: 10px; }

/* 3 の form-horizontal: form-group が row になり、control-label が右寄せ */
.form-horizontal .form-group { display: flex; flex-wrap: wrap; margin-right: -15px; margin-left: -15px; }
:where(.form-horizontal .form-group) > * { flex-shrink: 0; width: 100%; max-width: 100%; padding-right: 15px; padding-left: 15px; }
.form-horizontal .radio, .form-horizontal .checkbox, .form-horizontal .radio-inline, .form-horizontal .checkbox-inline { padding-top: 7px; margin-top: 0; margin-bottom: 0; }
.form-horizontal .radio, .form-horizontal .checkbox { min-height: 27px; }
@media (min-width: 768px) { .form-horizontal .control-label { padding-top: 7px; margin-bottom: 0; text-align: right; } }
.form-group-sm .form-control { height: 30px; padding: 5px 10px; font-size: 12px; line-height: 1.5; border-radius: 3px; }
.form-group-lg .form-control { height: 46px; padding: 10px 16px; font-size: 18px; line-height: 1.3333333; border-radius: 6px; }

/* 3 の form-inline（5 で無くなった） */
@media (min-width: 768px) {
  .form-inline .form-group { display: inline-block; margin-bottom: 0; vertical-align: middle; }
  .form-inline .form-control { display: inline-block; width: auto; vertical-align: middle; }
  .form-inline .control-label { margin-bottom: 0; vertical-align: middle; }
  .form-inline .input-group { display: inline-flex; width: auto; vertical-align: middle; }
  .form-inline .checkbox, .form-inline .radio { display: inline-block; margin-top: 0; margin-bottom: 0; vertical-align: middle; }
}

/* 3 の入力の状態（JS が form-group に has-error を付け外しする） */
.has-error .help-block, .has-error .control-label, .has-error .radio, .has-error .checkbox, .has-error .form-control-feedback { color: #a94442; }
.has-error .form-control { border-color: #a94442; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); }
.has-error .form-control:focus { border-color: #843534; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483; }
.has-warning .help-block, .has-warning .control-label, .has-warning .radio, .has-warning .checkbox, .has-warning .form-control-feedback { color: #8a6d3b; }
.has-warning .form-control { border-color: #8a6d3b; }
.has-success .help-block, .has-success .control-label, .has-success .radio, .has-success .checkbox, .has-success .form-control-feedback { color: #3c763d; }
.has-success .form-control { border-color: #3c763d; }
.has-feedback { position: relative; }
.has-feedback .form-control { padding-right: 42.5px; }
.form-control-feedback { position: absolute; top: 0; right: 0; z-index: 2; display: block; width: 34px; height: 34px; line-height: 34px; text-align: center; pointer-events: none; }

/* ---- 5. 表 -------------------------------------------------------------------------------------- */
.table { --bs-table-bg: transparent; margin-bottom: 20px; }
.table > :not(caption) > * > * { padding: 8px; line-height: 1.42857143; vertical-align: top; border-bottom-width: 0; border-top: 1px solid #ddd; }
.table > thead > tr > th { vertical-align: bottom; border-bottom: 2px solid #ddd; }
.table:not(.table-bordered) > thead:first-child > tr:first-child > * { border-top: 0; }   /* 3 は表の頭の行の上に線を引かない */
.table-sm > :not(caption) > * > * { padding: 5px; }
.table-bordered > :not(caption) > * > * { border: 1px solid #ddd; }
.table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-bg-type: #f9f9f9; --bs-table-color-type: inherit; }

/* ---- 6. 部品（panel → card、label → badge、modal、nav、dropdown など） ------------------------------- */
.card { margin-bottom: 20px; border-color: #ddd; border-radius: 4px; box-shadow: 0 1px 1px rgba(0, 0, 0, .05); }
.card-header { padding: 10px 15px; color: #333; background-color: #f5f5f5; border-bottom-color: #ddd; }
.card-body { padding: 15px; }
.card-footer { padding: 10px 15px; background-color: #f5f5f5; border-top-color: #ddd; }
.card-title { margin-top: 0; margin-bottom: 0; font-size: 16px; }
.card > .table, .card > .table-responsive > .table, .card > .list-group { margin-bottom: 0; }
.card > .float-end { align-self: flex-end; } .card > .float-start { align-self: flex-start; }   /* 5 の card は縦の flex で float が効かない（3 の panel の直下の pull-right） */   /* 3 の panel の中の表・list-group は下に余白を付けない */
.card-title > a, .card-title > small, .card-title > .small { color: inherit; }   /* 3 の panel-title の中のリンク */
.card.border-success { border-color: #d6e9c6 !important; } .card.border-info { border-color: #bce8f1 !important; }   /* 3 の panel-* の枠の色（5 の border-* は濃い） */
.card.border-warning { border-color: #faebcc !important; } .card.border-danger { border-color: #ebccd1 !important; } .card.border-primary { border-color: #337ab7 !important; }
.card.border-primary > .card-header { color: #fff; background-color: #337ab7; border-color: #337ab7; }
.card.border-success > .card-header { color: #3c763d; background-color: #dff0d8; border-color: #d6e9c6; }
.card.border-info > .card-header { color: #31708f; background-color: #d9edf7; border-color: #bce8f1; }
.card.border-warning > .card-header { color: #8a6d3b; background-color: #fcf8e3; border-color: #faebcc; }
.card.border-danger > .card-header { color: #a94442; background-color: #f2dede; border-color: #ebccd1; }
.badge { padding: .2em .6em .3em; font-size: 75%; font-weight: 700; line-height: 1; color: #fff; background-color: #777; border-radius: .25em; }   /* 3 の badge は灰色（bg-* は !important で勝つ。案件の CSS の .badge の色も後ろなので勝つ） */
.badge:where(:not([class*="bg-"]):not(.rounded-pill)) { background-color: transparent; }   /* 3 の素の .label（label-* の無いもの。bootstrap5-upgrade は badge にする）は背景なし */
.btn .badge { position: relative; top: -1px; }
.list-group-item > .badge { float: right; }
.list-group-item > .badge + .badge { margin-right: 5px; }
.nav-pills .nav-link > .badge { margin-left: 3px; }
.list-group-item.active > .badge, .nav-pills > li.active > .nav-link > .badge, .nav-pills .nav-link.active > .badge { color: #337ab7; background-color: #fff; }
.badge.rounded-pill { min-width: 10px; padding: 3px 7px; font-size: 12px; border-radius: 10px; }
.modal { --bs-modal-width: 600px; --bs-modal-padding: 15px; --bs-modal-header-padding: 15px; --bs-modal-margin: 10px; --bs-modal-footer-gap: 0px; }   /* 3 の modal-footer の余白は 15px */
@media (min-width: 768px) { .modal { --bs-modal-margin: 30px; } }   /* 3 の modal-dialog の上下の余白（768 未満は 10px） */
@media (min-width: 992px) { .modal-lg { --bs-modal-width: 900px; } }   /* modal-xl は 3 に無いので 5 のまま */
.modal-content { border-radius: 6px; box-shadow: 0 5px 15px rgba(0, 0, 0, .5); }
.modal-title { margin: 0; line-height: 1.42857143; }
:not(button).btn-close { display: inline-block; }   /* 3 の .close は a・span にも付けた。5 の .btn-close は display を決めておらず、inline のままだと幅と高さが効かず × が欠ける（button は既定で inline-block） */
.btn-close { float: right; }                          /* 3 の × は右に寄せた（modal-header・alert-dismissible の中は 5 の置き方が勝つ） */
/* × でない文字の close（「閉じる」など）は bootstrap5-upgrade が close のまま残す。3 の見た目 */
.close { float: right; font-size: 21px; font-weight: 700; line-height: 1; color: #000; text-shadow: 0 1px 0 #fff; opacity: .2; }
.close:hover, .close:focus { color: #000; text-decoration: none; cursor: pointer; opacity: .5; }
button.close { padding: 0; cursor: pointer; background: transparent; border: 0; -webkit-appearance: none; appearance: none; }
.modal-header .close { order: 2; margin-left: auto; }
.alert-dismissible .close { position: relative; top: -2px; right: -21px; color: inherit; }
.text-justify { text-align: justify; }
@media (min-width: 768px) { .dl-horizontal dt { float: left; width: 160px; overflow: hidden; clear: left; text-align: right; text-overflow: ellipsis; white-space: nowrap; } .dl-horizontal dd { margin-left: 180px; } }   /* 3 の dl-horizontal（5 に無い） */
.carousel-indicators { list-style: none; }   /* 3 は ol の li で書く。5 は list-style を消さないので番号が出る */
.carousel-indicators [data-bs-target] { width: 10px; height: 10px; margin: 1px; background-color: transparent; border: 1px solid #fff; border-radius: 10px; opacity: 1; }   /* 3 の丸（5 は横棒） */
.carousel-indicators .active { width: 12px; height: 12px; margin: 0; background-color: #fff; }
.carousel-control-prev > .fa, .carousel-control-next > .fa { font-size: 30px; }   /* 3 の矢印（glyphicon-chevron-*）の大きさ。glyphicon は Font Awesome にしてある */
.modal-header .btn-close { order: 2; }               /* 3 は × を見出しの前に書き float で右に出す。5 は flex なので順番で右に送る */
.modal-footer > * { margin: 0 0 0 5px; }
.modal-footer > :first-child { margin-left: 0; }   /* 3 はボタンとボタンの間だけ 5px */
.modal-footer > .float-start { order: -1; }          /* 3 は pull-left のボタンを左に出した（5 の modal-footer は flex で float が効かない） */
.modal-footer > .float-start:not(:has(~ .float-start)) { margin-right: auto; }
.alert { padding: 15px; margin-bottom: 20px; --bs-alert-border-radius: 4px; }
/* 3 の alert の色（5.3 は subtle の色の CSS 変数で、互換 CSS の --bs-success などでは変わらない） */
.alert-success { --bs-alert-color: #3c763d; --bs-alert-bg: #dff0d8; --bs-alert-border-color: #d6e9c6; --bs-alert-link-color: #2b542c; }
.alert-info { --bs-alert-color: #31708f; --bs-alert-bg: #d9edf7; --bs-alert-border-color: #bce8f1; --bs-alert-link-color: #245269; }
.alert-warning { --bs-alert-color: #8a6d3b; --bs-alert-bg: #fcf8e3; --bs-alert-border-color: #faebcc; --bs-alert-link-color: #66512c; }
.alert-danger { --bs-alert-color: #a94442; --bs-alert-bg: #f2dede; --bs-alert-border-color: #ebccd1; --bs-alert-link-color: #843534; }
.progress { --bs-progress-bar-bg: #337ab7; --bs-progress-height: 20px; --bs-progress-font-size: 12px; --bs-progress-bg: #f5f5f5; margin-bottom: 20px; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); }
.nav-tabs > li.active > .nav-link, .nav-tabs > li.active > .nav-link:hover { color: #555; background-color: #fff; border-color: #ddd #ddd transparent; }
.nav-pills > li.active > .nav-link, .nav-pills > li.active > .nav-link:hover { color: #fff; background-color: #337ab7; }
.nav-pills > li + li { margin-left: 2px; }
.nav-pills.flex-column > li + li { margin-top: 2px; margin-left: 0; }   /* 3 の nav-stacked（bootstrap5-upgrade は flex-column にする） */
.nav-link { padding: 10px 15px; }
/* 3 の素の .nav（gentelella のサイドバーの side-menu・child_menu など）は縦の一覧（li が block）。5 の .nav は flex で横に並ぶので、block に戻す。
   tab・pill・navbar-nav と、5 の書き方（flex-column・flex-row・justify-content-*）は除く。詳細度は .nav と同じなので、案件の CSS（.nav.child_menu { display: none } など）が勝つ */
.nav:where(:not(.nav-tabs, .nav-pills, .navbar-nav, .flex-column, .flex-row, .nav-justified, .nav-fill, .card-header-tabs, .card-header-pills, [class*="justify-content-"])) { display: block; }
.nav:where(:not(.nav-tabs, .nav-pills, .navbar-nav, .flex-column, .flex-row, .nav-justified, .nav-fill, .card-header-tabs, .card-header-pills, [class*="justify-content-"]))::after { display: table; clear: both; content: ""; }
.nav:where(:not(.nav-tabs, .nav-pills, .navbar-nav, .flex-column, .flex-row, .nav-justified, .nav-fill, .card-header-tabs, .card-header-pills, [class*="justify-content-"])) > li { position: relative; display: block; }
.dropdown-menu { min-width: 160px; font-size: 14px; }   /* 5 は 10rem（互換 CSS の根 14px で 140px） */
.dropdown-item { padding: 3px 20px; }
.dropdown-item.active, .dropdown-item:active { color: #fff; background-color: #337ab7; }   /* 3 の色（5 は #0d6efd） */
.dropdown-item.disabled, .dropdown-item:disabled { color: #777; }
.dropdown-toggle:has(.caret)::after { display: none; }   /* 3 の矢印は caret。caret を書いたものは 5 の矢印を出さない（二重になる）。5 の書き方の dropdown には当たらない。caret の無い dropdown-toggle は bootstrap5-upgrade が印（DROPDOWN）を付ける */
.caret { display: inline-block; width: 0; height: 0; margin-left: 2px; vertical-align: middle; border-top: 4px dashed; border-right: 4px solid transparent; border-left: 4px solid transparent; }
.breadcrumb { padding: 8px 15px; margin-bottom: 20px; background-color: #f5f5f5; border-radius: 4px; --bs-breadcrumb-divider-color: #ccc; --bs-breadcrumb-item-padding-x: 5px; }   /* 区切りは 3 と同じ「/」。自前の CSS の .breadcrumb > li + li:before は 5 の指定に負けるので印（CSS-CLASS） */
.pagination { display: inline-flex; margin: 20px 0; --bs-pagination-padding-x: 12px; --bs-pagination-padding-y: 6px; --bs-pagination-font-size: 14px; --bs-pagination-color: #337ab7; --bs-pagination-border-color: #ddd;
  --bs-pagination-hover-color: #23527c; --bs-pagination-hover-bg: #eee; --bs-pagination-active-bg: #337ab7; --bs-pagination-active-border-color: #337ab7; --bs-pagination-focus-box-shadow: none; }
/* CI のページ送り（コントローラの設定で li に page-item だけを付け、a に page-link が無いもの）も 3 と同じ箱にする */
.pagination > li > a:not(.page-link), .pagination > li > span:not(.page-link) { position: relative; display: block; padding: 6px 12px; margin-left: -1px; line-height: 1.42857143; color: #337ab7; text-decoration: none; background-color: #fff; border: 1px solid #ddd; }
.pagination > li:first-child > a:not(.page-link), .pagination > li:first-child > span:not(.page-link) { margin-left: 0; border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
.pagination > li:last-child > a:not(.page-link), .pagination > li:last-child > span:not(.page-link) { border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
.pagination > li > a:not(.page-link):hover, .pagination > li > a:not(.page-link):focus { z-index: 2; color: #23527c; background-color: #eee; border-color: #ddd; }
.pagination > .active > a:not(.page-link), .pagination > .active > span:not(.page-link) { z-index: 3; color: #fff; cursor: default; background-color: #337ab7; border-color: #337ab7; }
.pagination > .disabled > a:not(.page-link), .pagination > .disabled > span:not(.page-link) { color: #777; cursor: not-allowed; background-color: #fff; border-color: #ddd; }
/* 3 の pagination は inline-block（親の text-center で真ん中に寄り、上下の余白が前後の要素と重ならない）。5 は block の flex なので inline-flex にした */
.list-group-item-heading { margin-top: 0; margin-bottom: 5px; }
.list-group-item-text { margin-bottom: 0; line-height: 1.3; }
.list-group { margin-bottom: 20px; --bs-list-group-border-color: #ddd; --bs-list-group-active-bg: #337ab7; --bs-list-group-active-border-color: #337ab7; --bs-list-group-action-color: #555; --bs-list-group-action-hover-bg: #f5f5f5; }
.list-group-item { padding: 10px 15px; }
.list-group-item-success { --bs-list-group-color: #3c763d; --bs-list-group-bg: #dff0d8; } .list-group-item-info { --bs-list-group-color: #31708f; --bs-list-group-bg: #d9edf7; }   /* 3 の色 */
.list-group-item-warning { --bs-list-group-color: #8a6d3b; --bs-list-group-bg: #fcf8e3; } .list-group-item-danger { --bs-list-group-color: #a94442; --bs-list-group-bg: #f2dede; }
.img-thumbnail { padding: 4px; line-height: 1.42857143; border-color: #ddd; border-radius: 4px; }

/* ---- 7. 残したクラス（5 に無い部品） ------------------------------------------------------------------ */
.well { min-height: 20px; padding: 19px; margin-bottom: 20px; background-color: #f5f5f5; border: 1px solid #e3e3e3; border-radius: 4px; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); }
.well-sm { padding: 9px; border-radius: 3px; }
.well-lg { padding: 24px; border-radius: 6px; }
.jumbotron { padding: 30px 15px; margin-bottom: 30px; color: inherit; background-color: #eee; }
.jumbotron p { margin-bottom: 15px; font-size: 21px; font-weight: 200; }
@media (min-width: 768px) { .jumbotron { padding: 48px 0; } .container .jumbotron, .container-fluid .jumbotron { padding-right: 60px; padding-left: 60px; border-radius: 6px; } }
.page-header { padding-bottom: 9px; margin: 40px 0 20px; border-bottom: 1px solid #eee; }
.thumbnail { display: block; padding: 4px; margin-bottom: 20px; line-height: 1.42857143; background-color: #fff; border: 1px solid #ddd; border-radius: 4px; }
.thumbnail > img, .thumbnail a > img { display: block; max-width: 100%; height: auto; margin-right: auto; margin-left: auto; }
.thumbnail .caption { padding: 9px; color: #333; }
.media { display: flex; align-items: flex-start; margin-top: 15px; }
.media:first-child { margin-top: 0; }
.media-body { flex: 1; min-width: 0; }
.media-left, .media > .pull-left, .media > .float-start { padding-right: 10px; }
.media-right, .media > .pull-right, .media > .float-end { padding-left: 10px; }
.media-heading { margin-top: 0; margin-bottom: 5px; }
.media-list { padding-left: 0; list-style: none; }
.media-object { display: block; }
.text-hide { font: 0/0 a; color: transparent; text-shadow: none; background-color: transparent; border: 0; }
.navbar-default { background-color: #f8f8f8; border: 1px solid #e7e7e7; }
.navbar-inverse { background-color: #222; border: 1px solid #080808; }
.navbar-default .navbar-brand, .navbar-default .navbar-nav > li > .nav-link, .navbar-default .navbar-text { color: #777; }   /* 3 の navbar の色 */
.navbar-default .navbar-brand:hover, .navbar-default .navbar-nav > li > .nav-link:hover { color: #333; }
.navbar-default .navbar-nav > li.active > .nav-link, .navbar-default .navbar-nav > li > .nav-link.active, .navbar-default .navbar-nav > li > .nav-link.show { color: #555; background-color: #e7e7e7; }
.navbar-inverse .navbar-brand, .navbar-inverse .navbar-nav > li > .nav-link, .navbar-inverse .navbar-text { color: #9d9d9d; }
.navbar-default .navbar-link { color: #777; } .navbar-default .navbar-link:hover { color: #333; } .navbar-inverse .navbar-link { color: #9d9d9d; } .navbar-inverse .navbar-link:hover { color: #fff; }
.navbar-inverse .navbar-brand:hover, .navbar-inverse .navbar-nav > li > .nav-link:hover { color: #fff; }
.navbar-inverse .navbar-nav > li.active > .nav-link, .navbar-inverse .navbar-nav > li > .nav-link.active, .navbar-inverse .navbar-nav > li > .nav-link.show { color: #fff; background-color: #080808; }
.navbar-header { display: flex; align-items: center; }
.navbar:has(> .container-fluid > .navbar-header, > .container > .navbar-header) { min-height: 50px; padding-top: 0; padding-bottom: 0; margin-bottom: 20px; }   /* 3 の navbar の高さ（5 は上下に余白） */
.navbar-header > .navbar-brand { height: 50px; padding: 15px; margin-right: 0; font-size: 18px; line-height: 20px; }
@media (max-width: 767.98px) { .navbar-nav:where(:not(.navbar .navbar-nav)) { margin: 7.5px -15px; } .navbar-nav:where(:not(.navbar .navbar-nav)) > li > .nav-link { padding-top: 10px; padding-bottom: 10px; line-height: 20px; } }
@media (max-width: 767.98px) { .navbar-header { width: 100%; } .navbar > .container-fluid > .navbar-header, .navbar > .container > .navbar-header { width: calc(100% + 30px); margin-right: -15px; margin-left: -15px; } .navbar-collapse .navbar-nav { margin: 7.5px -15px; } .navbar-collapse .navbar-nav .nav-link { padding: 10px 15px; } }   /* 768 未満は header を全幅にしてハンバーガーを右端に */
@media (min-width: 768px) { .navbar > .container-fluid > .navbar-header > .navbar-brand, .navbar > .container > .navbar-header > .navbar-brand { margin-left: -15px; } .navbar:not([class*="navbar-expand"]) .navbar-nav > li > .nav-link { padding-top: 15px; padding-bottom: 15px; line-height: 20px; } }
.navbar-toggle { order: 2; margin: 8px 15px 8px auto; padding: 9px 10px; background-color: transparent; border: 1px solid #ddd; border-radius: 4px; }   /* 3 のハンバーガー（印 NAVBAR で組み直すまでの見た目） */
.navbar-toggle .icon-bar { display: block; width: 22px; height: 2px; border-radius: 1px; background-color: #888; }
.navbar-toggle .icon-bar + .icon-bar { margin-top: 4px; }
.navbar-inverse .navbar-toggle { border-color: #333; }
.navbar-inverse .navbar-toggle .icon-bar { background-color: #fff; }
@media (min-width: 768px) {
  /* 下の 3 行は 3 の書き方の navbar（navbar-expand-* の無いもの）だけ。5 の書き方で組み直した navbar には当てない */
  .navbar:not([class*="navbar-expand"]) .navbar-nav { flex-direction: row; }               /* 3 の navbar は 768 以上で横並び（5 は navbar-expand-* が無いと縦） */
  .navbar:not([class*="navbar-expand"]) .navbar-collapse.collapse { display: flex !important; flex-basis: auto; height: auto !important; }   /* 3 は 768 以上でメニューを常に出す（5 は navbar-expand-* が無いと collapse のまま隠れる） */
  .navbar:not([class*="navbar-expand"]) .navbar-nav .dropdown-menu { position: absolute; }   /* 5 は navbar-expand-* の中でだけ浮かせる。3 の navbar では、開くとナビの中に縦に積まれる */
  .navbar-toggle { display: none; }                  /* 3 のハンバーガーのボタンは 768 未満だけ */
  /* .navbar の外の navbar-nav（gentelella の上のナビ: div.nav_menu > nav > ul.nav.navbar-nav）。3 は 768 以上で li を左に浮かせて横に並べた。5 は縦の flex */
  .navbar-nav:where(:not(.navbar .navbar-nav)) { display: block; float: left; margin: 0; }
  .navbar-nav:where(:not(.navbar .navbar-nav)) > li { float: left; }
  .navbar-nav:where(:not(.navbar .navbar-nav)) > li > .nav-link { padding-top: 15px; padding-bottom: 15px; line-height: 20px; }
  .navbar-nav.navbar-right:where(:not(.navbar .navbar-nav)) { margin-right: -15px; }   /* 3 の navbar-right（2 つ目からは 0） */
  .navbar-right ~ .navbar-nav.navbar-right:where(:not(.navbar .navbar-nav)) { margin-right: 0; }
  .navbar-right { float: right !important; margin-left: auto; }
  .navbar-left { float: left !important; }
  .navbar-text { float: left; margin: 15px; }
  .navbar-form { display: flex; align-items: center; margin: 8px 0; }
}
.navbar-btn { margin-top: 8px; margin-bottom: 8px; }

/* 3 の button プラグイン（data-toggle="buttons"）の中の input を隠す。active の付け外しは 5 に無い（印 BTN-TOGGLE） */
[data-toggle="buttons"] > .btn input[type="radio"], [data-toggle="buttons"] > .btn input[type="checkbox"],
[data-toggle="buttons"] > .btn-group > .btn input[type="radio"], [data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] { position: absolute; clip: rect(0, 0, 0, 0); pointer-events: none; }

/* ---- 8. 表示の切り替え（JS が hide を付け外しする。hidden-xs などは 3 の画面幅のまま） ------------------------ */
.hide, .hidden { display: none !important; }
@media (max-width: 767.98px) { .hidden-xs { display: none !important; } }
@media (min-width: 768px) and (max-width: 991.98px) { .hidden-sm { display: none !important; } }
@media (min-width: 992px) and (max-width: 1199.98px) { .hidden-md { display: none !important; } }
@media (min-width: 1200px) { .hidden-lg { display: none !important; } }
.visible-xs, .visible-sm, .visible-md, .visible-lg,
.visible-xs-block, .visible-xs-inline, .visible-xs-inline-block, .visible-sm-block, .visible-sm-inline, .visible-sm-inline-block,
.visible-md-block, .visible-md-inline, .visible-md-inline-block, .visible-lg-block, .visible-lg-inline, .visible-lg-inline-block { display: none !important; }
@media (max-width: 767.98px) { .visible-xs, .visible-xs-block { display: block !important; } .visible-xs-inline { display: inline !important; } .visible-xs-inline-block { display: inline-block !important; } }
@media (min-width: 768px) and (max-width: 991.98px) { .visible-sm, .visible-sm-block { display: block !important; } .visible-sm-inline { display: inline !important; } .visible-sm-inline-block { display: inline-block !important; } }
@media (min-width: 992px) and (max-width: 1199.98px) { .visible-md, .visible-md-block { display: block !important; } .visible-md-inline { display: inline !important; } .visible-md-inline-block { display: inline-block !important; } }
@media (min-width: 1200px) { .visible-lg, .visible-lg-block { display: block !important; } .visible-lg-inline { display: inline !important; } .visible-lg-inline-block { display: inline-block !important; } }
.visible-print { display: none !important; }
.visible-print-block, .visible-print-inline, .visible-print-inline-block { display: none !important; }
@media print { .visible-print { display: block !important; } .hidden-print { display: none !important; } .visible-print-block { display: block !important; } .visible-print-inline { display: inline !important; } .visible-print-inline-block { display: inline-block !important; } }
