html,
body {
  color: #fff;
}

body {
  position: relative;
  padding-bottom: 80px;
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 1030;
}

.flash {
  position: absolute;
  top: -4px;
  left: 50px;
  background: #ffe4ec;
  color: #b3004b;
  padding: 8px 18px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9999;
}

.flash.show {
  opacity: 1;
}

/* スマホ時にテーブルをカード風に縦積み */
@media (max-width: 992px) {
  .table-responsive,
  .table {
    width: 100%;
  }

  /* ヘッダは非表示 */
  .table thead {
    display: none;
  }

  /* 各行をカード化 */
  .table tbody tr {
    position: relative;
    display: block;
    margin-bottom: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    overflow: hidden; /* ← 角丸を維持 */
    z-index: 1; /* ← 枠線を手前に */
  }

  .table tbody td {
    position: relative;
    z-index: 0; /* ← 中身を奥に */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem; /* ← 中身の余白は td に */
    border: none;
  }

  /* 左側ラベル（data-label）を表示 */
  .table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    margin-right: 0.5rem;
    flex: 0 0 auto;
    width: 30%;
  }

  /* 値部分 */
  .table tbody td > * {
    flex: 1 1 auto;
    text-align: left;
  }

  .table tbody td[data-label='Actions'] .btn {
    margin-left: 0.5rem;
  }

  /* 長いテキストの折り返し */
  .table tbody td div,
  .table tbody td a {
    white-space: normal;
    word-break: break-word;
  }

  /* .text-end を上書きして左寄せにする */
  td.text-end[data-label='Actions'] {
    text-align: left !important;
    vertical-align: middle;
    padding-left: 0.5rem;
  }

  /* ボタン群を左端に揃えて横並びにする */
  td.text-end[data-label='Actions'] > div {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
  }
}
@media (max-width: 576px) {
  body {
    padding-bottom: 130px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 0; /* ← 行間ゼロ */
  }

  .footer-title {
    margin: 0; /* ← 完全に余白ゼロ */
    padding: 0;
    line-height: 1.1; /* ← 文字の上下も詰める */
  }

  .footer-links {
    display: flex;
    justify-content: center;
    gap: 0.4rem; /* ボタン同士は少しだけ余白 */
    margin: 0;
    padding: 0;
  }

  footer {
    padding-top: 0.4rem; /* フッター全体の上下も詰める */
    padding-bottom: 0.4rem;
  }
}

@media (min-width: 992px) {
  table.table {
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #dee2e6; /* 外枠を1本に統一 */
    border-radius: 12px;
    overflow: hidden; /* 角丸を綺麗に見せる */
  }

  /* 内側の縦線・横線 */
  table.table th,
  table.table td {
    border: 1px solid #dee2e6;
    border-left: none;
    border-right: none;
  }

  /* 左端セルは外枠と重なるので左線を消す */
  table.table th:first-child,
  table.table td:first-child {
    border-left: none;
  }

  /* 右端セルも外枠と重なるので右線を消す */
  table.table th:last-child,
  table.table td:last-child {
    border-right: none;
  }
}

.preline {
  white-space: pre-line;
}

canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
}

/* コメントカード全体黒にする */
.card {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
}

.card-header {
  background-color: rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

.card-body {
  color: #fff;
}

.card-footer {
  background-color: rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

.custom-table-bg tbody tr td {
  background-color: rgba(0, 0, 0, 0.4);
  color: #fff;
}
