/* アルバムコンポーネント */
.photo-album-component {
  background: white;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.album-daily {
  position: relative;
}

.album-day {
  border-left: 3px solid #007bff;
  padding-left: 1.5rem;
  position: relative;
}

.album-day::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 0;
  width: 13px;
  height: 13px;
  background: #007bff;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 0 0 2px #007bff;
}

.album-date-header {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border-left: 4px solid #007bff;
}

.album-photos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 100%;
}

/* アルバム写真カードスタイル */
.album-photo-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  aspect-ratio: 1;
  background: white;
  cursor: pointer;
}

.album-photo-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.album-photo-item:active {
  transform: translateY(-4px) scale(1.01);
  transition: all 0.1s ease;
}

.photo-container {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  height: 100%;
}

.photo-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.photo-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.album-photo-item:hover .photo-container img {
  transform: scale(1.05);
}

.photo-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 1rem;
}

.album-photo-item:hover .photo-overlay {
  opacity: 1;
}

/* アルバム写真のホバー時の拡大アニメーションを削除 */

.photo-info {
  text-align: center;
  color: white;
}

.photo-title {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.photo-description {
  font-size: 0.875rem;
  margin-bottom: 0;
  opacity: 0.9;
  line-height: 1.4;
}

/* 体調記録カレンダーコンポーネント */
.health-calendar-component {
  background: white;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.health-calendar-table {
  margin-bottom: 0;
}

.health-calendar-table th {
  background: #f8f9fa;
  border-color: #dee2e6;
  font-weight: 600;
  padding: 0.75rem 0.5rem;
}

.calendar-cell {
  padding: 0.5rem;
  min-height: 80px;
  vertical-align: top;
  border-color: #dee2e6;
  transition: background-color 0.2s ease;
}

.calendar-cell:hover {
  background-color: #f8f9fa;
}

.calendar-day-number {
  font-size: 1rem;
  color: #495057;
}

.calendar-records {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.calendar-record-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  background: #007bff;
  color: white;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-record-badge:hover {
  background: #0056b3;
}

/* 記録タイプ別の色分け */
.calendar-record-badge[title*="健康"] {
  background: #28a745;
}

.calendar-record-badge[title*="病気"] {
  background: #dc3545;
}

.calendar-record-badge[title*="予防接種"] {
  background: #17a2b8;
}

.calendar-record-badge[title*="体重"] {
  background: #ffc107;
  color: #212529;
}

.calendar-record-badge[title*="その他"] {
  background: #6c757d;
}

/* ローディング表示コンポーネント */
.loading-spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
  margin-right: 0.5rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-button {
  position: relative;
  transition: all 0.3s ease;
}

.loading-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.loading-button .btn-text {
  transition: opacity 0.3s ease;
}

.loading-button.loading .btn-text {
  opacity: 0;
}

.loading-button .loading-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-button.loading .loading-content {
  opacity: 1;
}

/* フォーム送信時のオーバーレイ */
.form-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.form-loading-overlay.show {
  opacity: 1;
  visibility: visible;
}

.form-loading-spinner {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.form-loading-spinner .spinner-border {
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
}

/* 画像プレビュー関連のスタイル */

.image-preview-container {
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  background-color: #f8f9fa;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
}

/* 複数画像プレビュー */
.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
  min-height: 100px;
}

.image-preview-item {
  position: relative;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 10px;
  background-color: white;
  transition: all 0.3s ease;
}

.image-preview-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.image-preview-item .image-preview-wrapper {
  position: relative;
}

.image-preview-item .image-preview-wrapper img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 6px;
  transition: transform 0.3s ease;
}

/* 画像プレビューのホバー時の拡大アニメーションを削除 */

.image-preview-item .remove-image {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 10;
  padding: 2px 6px;
  font-size: 0.75rem;
}

.image-preview-item .image-info {
  margin-top: 8px;
  text-align: center;
}

.image-preview-item .image-info small {
  font-size: 0.75rem;
  color: #6c757d;
}

.image-preview-container:hover {
  border-color: #0d6efd;
  background-color: #f0f8ff;
}

.image-preview-wrapper {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.image-preview-wrapper img {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.image-info {
  background-color: rgba(0, 0, 0, 0.05);
  padding: 8px 12px;
  border-radius: 6px;
  margin-top: 8px;
}

.image-info small {
  font-weight: 500;
}

/* ドラッグ&ドロップエリア */
.drag-drop-area {
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  background-color: #f8f9fa;
  transition: all 0.3s ease;
  cursor: pointer;
}

.drag-drop-area:hover,
.drag-drop-area.dragover {
  border-color: #0d6efd;
  background-color: #f0f8ff;
}

.drag-drop-area .drag-drop-icon {
  font-size: 3rem;
  color: #6c757d;
  margin-bottom: 1rem;
}

.drag-drop-area .drag-drop-text {
  color: #6c757d;
  font-weight: 500;
}

/* 圧縮進捗表示 */
.compression-progress {
  background: linear-gradient(90deg, #e9ecef 0%, #dee2e6 100%);
  border-radius: 4px;
  height: 4px;
  overflow: hidden;
  margin: 8px 0;
}

.compression-progress-bar {
  background: linear-gradient(90deg, #0d6efd 0%, #0b5ed7 100%);
  height: 100%;
  width: 0%;
  transition: width 0.3s ease;
  animation: progress-animation 2s ease-in-out infinite;
}

@keyframes progress-animation {
  0% {
    width: 0%;
  }
  50% {
    width: 70%;
  }
  100% {
    width: 100%;
  }
}

/* ファイル選択ボタンのスタイル改善 */
.file-input-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

.file-input-wrapper input[type="file"] {
  position: absolute;
  left: -9999px;
}

.file-input-button {
  display: inline-block;
  padding: 12px 24px;
  background-color: #f8f9fa;
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  text-align: center;
}

.file-input-button:hover {
  background-color: #e9ecef;
  border-color: #0d6efd;
}

.file-input-button i {
  font-size: 1.5rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
  display: block;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .album-photos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .photo-container img {
    height: 150px;
  }

  .album-day {
    margin-bottom: 2rem;
  }

  .health-calendar-table th,
  .health-calendar-table td {
    padding: 0.5rem 0.25rem;
    font-size: 0.875rem;
  }

  .calendar-day-number {
    font-size: 0.875rem;
  }

  .calendar-record-badge {
    font-size: 0.75rem;
    padding: 0.125rem 0.25rem;
  }

  .image-preview-wrapper img {
    height: 80px;
  }

  .drag-drop-area {
    padding: 1.5rem;
  }

  .drag-drop-area .drag-drop-icon {
    font-size: 2rem;
  }
}

@media (max-width: 576px) {
  .album-photos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .photo-container img {
    height: 120px;
  }

  .health-calendar-table th,
  .health-calendar-table td {
    padding: 0.25rem 0.125rem;
    font-size: 0.75rem;
  }

  .calendar-day-number {
    font-size: 0.75rem;
  }

  .calendar-record-badge {
    font-size: 0.625rem;
    padding: 0.125rem;
  }
}

/* 写真アルバム関連のスタイル */

/* 写真コンテナ */
.photo-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.photo-link {
  display: block;
  text-decoration: none;
  color: inherit;
  width: 100%;
  height: 100%;
}

.photo-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* お気に入りマーク */
.favorite-mark {
  z-index: 10;
}

.favorite-mark .favorite-icon {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease;
}

.favorite-mark .favorite-icon:hover {
  /* お気に入りアイコンのホバー時の拡大アニメーションを削除 */
}

/* メモツールチップ */
.memo-tooltip {
  z-index: 10;
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
}

.memo-tooltip i {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  padding: 6px;
  color: white;
  font-size: 0.875rem;
  transition: background-color 0.2s ease;
}

.memo-tooltip:hover i {
  background-color: rgba(0, 0, 0, 0.7);
}

/* 写真オーバーレイモーダル */
.photo-display-container {
  max-height: 70vh;
  overflow: hidden;
}

.photo-display-container img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.photo-info-panel {
  height: 100%;
  overflow-y: auto;
}

.cat-list .badge {
  font-size: 0.8rem;
}

/* カスタムツールチップスタイル */
.tooltip-inner {
  max-width: 300px;
  text-align: left;
  background-color: rgba(0, 0, 0, 0.9);
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.4;
}

.tooltip.bs-tooltip-top .tooltip-arrow::before {
  border-top-color: rgba(0, 0, 0, 0.9);
}

.tooltip.bs-tooltip-bottom .tooltip-arrow::before {
  border-bottom-color: rgba(0, 0, 0, 0.9);
}

.tooltip.bs-tooltip-start .tooltip-arrow::before {
  border-left-color: rgba(0, 0, 0, 0.9);
}

.tooltip.bs-tooltip-end .tooltip-arrow::before {
  border-right-color: rgba(0, 0, 0, 0.9);
}

/* ヘッダー猫プロフィール写真 */
.header-cats-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1rem;
}

.header-cat-profile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.4);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.15);
}

.header-cat-profile:hover {
  border-color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.header-cat-image {
  width: 150%;
  height: 150%;
  object-fit: cover;
  margin: -25%;
}

.header-cat-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
}

.header-cat-placeholder i {
  font-size: 1.5rem;
}

/* ドロップダウン */
.header-cats-dropdown {
  position: relative;
}

.header-cats-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.8);
  padding: 0;
}

.header-cats-dropdown-toggle:hover {
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.header-cats-dropdown-toggle i {
  font-size: 1.5rem;
}

.header-cats-dropdown-menu {
  min-width: 200px;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
}

.header-cats-dropdown-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  transition: background-color 0.2s ease;
}

.header-cat-dropdown-image {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #dee2e6;
  margin: -3px;
}

.header-cat-dropdown-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f8f9fa;
  color: #6c757d;
  border: 1px solid #dee2e6;
}

.header-cat-dropdown-placeholder i {
  font-size: 0.9rem;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .header-cats-container {
    margin-left: 0.5rem;
    gap: 0.25rem;
  }

  .header-cat-profile,
  .header-cats-dropdown-toggle {
    width: 45px;
    height: 45px;
  }

  .header-cat-placeholder i {
    font-size: 1.3rem;
  }

  .header-cats-dropdown-toggle i {
    font-size: 1.3rem;
  }
}

@media (max-width: 576px) {
  .header-cats-container {
    margin-left: 0.25rem;
    gap: 0.2rem;
  }

  .header-cat-profile,
  .header-cats-dropdown-toggle {
    width: 40px;
    height: 40px;
  }

  .header-cat-placeholder i {
    font-size: 1.1rem;
  }

  .header-cats-dropdown-toggle i {
    font-size: 1.1rem;
  }
}

/* プロフィール写真エリアのホバー効果 */
.profile-photo-container {
  cursor: pointer;
  overflow: hidden;
  border-radius: 0.375rem;
}

.profile-photo-container:hover .profile-photo-overlay {
  opacity: 1;
}

.profile-photo-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 0.375rem;
}

.upload-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-icon i {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* プロフィール写真ギャラリー（Carousel） */
.profile-gallery {
}

.profile-gallery .carousel {
  border-radius: 8px;
  overflow: hidden;
}

.profile-gallery .carousel-inner {
  border-radius: 8px;
}

.profile-gallery-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
}

.profile-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* プロフィール写真の編集アイコン */
.profile-photo-edit-overlay {
  position: absolute;
  top: 5px;
  right: 5px;
  background-color: rgba(0, 123, 255, 0.8);
  border-radius: 50%;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-photo-edit-overlay i {
  font-size: 0.8rem;
}

/* Carouselコントロールのカスタマイズ */
.profile-gallery .carousel-control-prev,
.profile-gallery .carousel-control-next {
  width: 30px;
  height: 30px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  margin: 0 5px;
}

.profile-gallery .carousel-control-prev-icon,
.profile-gallery .carousel-control-next-icon {
  width: 15px;
  height: 15px;
}

.profile-gallery .carousel-indicators {
  bottom: 5px;
  margin-bottom: 0;
}

.profile-gallery .carousel-indicators button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin: 0 2px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .profile-gallery .carousel-control-prev,
  .profile-gallery .carousel-control-next {
    width: 25px;
    height: 25px;
  }

  .profile-gallery .carousel-control-prev-icon,
  .profile-gallery .carousel-control-next-icon {
    width: 12px;
    height: 12px;
  }

  .upload-icon i {
    font-size: 2.5rem !important;
  }
}

/* 写真詳細オーバーレイ - 基本スタイル */
.photo-detail-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease; /* PC用のアニメーション */
}

.photo-detail-overlay.show {
  opacity: 1;
  visibility: visible;
}

.photo-detail-card {
  width: 90vw;
  max-width: 800px;
  height: 80vh;
  max-height: 600px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  transform: none; /* スケールアニメーションを無効化 */
  transition: none; /* トランジションを無効化 */
  display: flex;
  flex-direction: column;
}

.photo-detail-overlay.show .photo-detail-card {
  transform: none; /* スケールアニメーションを無効化 */
}

.photo-detail-card .card {
  height: 100%;
  display: flex;
  flex-direction: column;
  border: none;
  border-radius: 12px;
}

.photo-detail-image-container {
  position: relative;
  flex: 7;
  min-height: 300px;
  max-height: 70vh;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-detail-card .card-img-top {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.photo-detail-card .custom-overlay-body {
  padding-top: 0rem;
  background: white;
  flex: 3;
  min-height: 150px;
  max-height: 30vh;
  overflow-y: auto;
}

/* 3点メニュー */
.photo-actions {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.2s ease; /* PC用のアニメーション */
}

.photo-detail-image-container:hover .photo-actions {
  opacity: 1;
}

.photo-actions .dropdown-toggle {
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
}

.photo-actions .dropdown-toggle:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
}

.photo-actions .dropdown-toggle:focus {
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.photo-actions .dropdown-menu {
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 120px;
}

.photo-actions .dropdown-item {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
}

.photo-actions .dropdown-item:hover {
  background-color: #f8f9fa;
}

.photo-actions .dropdown-item.text-danger:hover {
  background-color: #f8d7da;
}

/* メモ表示 */
.memo-read-mode {
  margin-bottom: 0;
  min-height: 60px;
  display: flex;
  align-items: center;
}

.memo-text {
  font-size: 1rem;
  line-height: 1.6;
  color: #495057;
  margin-bottom: 0;
  word-wrap: break-word;
  white-space: pre-wrap;
  max-height: 200px;
  overflow-y: auto;
}

.memo-text:hover {
  background-color: #f8f9fa;
  border-radius: 4px;
  padding: 0.5rem;
  margin: -0.5rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.memo-text:empty::before {
  content: "メモがありません";
  color: #6c757d;
  font-style: italic;
}

.memo-edit-mode {
  margin-top: 0;
}

.memo-edit-container {
  position: relative;
}

.memo-edit-container textarea {
  border: 2px solid #e9ecef;
  border-radius: 8px;
  resize: vertical;
  min-height: 80px;
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color 0.2s ease;
}

.memo-edit-container textarea:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
  outline: none;
}

.memo-edit-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  justify-content: flex-end;
}

.memo-edit-actions .btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

/* レスポンシブ対応 - 統合版 */
@media (max-width: 768px) {
  .photo-detail-card {
    width: 95vw;
    height: 450px;
    max-height: 95vh;
  }

  .photo-detail-image-container {
    max-height: 50vh;
    min-height: 250px;
  }

  .photo-detail-card .custom-overlay-body {
    padding: 1rem;
    min-height: 120px;
  }
}

@media (max-width: 576px) {
  /* 携帯向けレイアウト最適化 */
  .photo-detail-card {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
    transform: none;
  }

  .photo-detail-overlay.show .photo-detail-card {
    transform: none;
  }

  .photo-detail-card .card {
    border-radius: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
  }

  .photo-detail-image-container {
    flex: 8;
    max-height: 80vh;
    min-height: 80vh;
    background: #000;
  }

  .photo-detail-card .card-img-top {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    background: #000;
  }

  .photo-detail-card .custom-overlay-body {
    flex: 3;
    flex-shrink: 0;
    padding: 1rem;
    min-height: 30vh;
    background: white;
    border-top: 1px solid #dee2e6;
    transition: all 0.3s ease;
    overflow: hidden;
  }

  /* メモエリア折りたたみ状態 */
  .photo-detail-card .custom-overlay-body.collapsed {
    flex: 0;
    min-height: 0;
    padding: 0;
    opacity: 0;
    height: 0;
    margin: 0;
    border: none;
    overflow: hidden;
  }

  /* 編集モード時は折りたたみを無効化 */
  .photo-detail-card .custom-overlay-body.collapsed .memo-edit-mode {
    display: block !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 200px !important;
  }

  /* メモ非表示時の写真エリア調整 */
  .photo-detail-card
    .custom-overlay-body.collapsed
    + .photo-detail-image-container,
  .photo-detail-card:has(.custom-overlay-body.collapsed)
    .photo-detail-image-container {
    flex: 1;
    max-height: 100vh;
    min-height: 100vh;
  }

  /* 折りたたみボタン */
  .memo-toggle-button {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
  }

  .memo-toggle-button:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
  }

  .memo-toggle-button.collapsed {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
  }

  .memo-toggle-button.hidden {
    opacity: 0;
    pointer-events: none;
  }

  /* 戻るボタン */
  .photo-back-button {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    text-decoration: none;
  }

  .photo-back-button:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
    color: white;
  }

  .photo-back-button.hidden {
    opacity: 0;
    pointer-events: none;
  }

  /* アクションボタン調整 */
  .photo-actions .dropdown-toggle {
    width: 40px;
    height: 40px;
  }

  .photo-actions.hidden {
    opacity: 0;
    pointer-events: none;
  }

  /* メモ編集アクション調整 */
  .memo-edit-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 1rem;
  }

  /* メモ表示調整 */
  .memo-read-mode {
    min-height: 80px;
  }

  .memo-text {
    font-size: 1.1rem;
  }

  .memo-edit-container textarea {
    font-size: 1.1rem;
    min-height: 100px;
  }
}
