/* PC版: 釣果詳細ページは上寄せに統一（タックル有無で位置が変わらないように） */
body.with-header.form-page:has(.fishing-report-show-container) .main-content {
  align-items: flex-start;
}

/* 釣果詳細ページ全体のコンテナ */
.fishing-report-show-container {
  width: 100%;
  max-width: min(90%, 600px);
  /* PC版: ヘッダー60px + マージン20pxを考慮 */
  max-height: calc(100vh - 80px);
  margin: 10px auto;
  padding: 16px;
  font-family: var(--font-family-base);
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
  /* スクロールバーを非表示（スクロールは可能） */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

/* Webkit系（Chrome, Safari）のスクロールバー非表示 */
.fishing-report-show-container::-webkit-scrollbar {
  display: none;
}

/* 画像コンテナ */
.image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
}

.image-container .fishing-report-image-large {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* タップ時のズームエフェクト */
.image-container:active .fishing-report-image-large {
  transform: scale(1.02);
}

/* 釣果画像のスタイル */
.fishing-report-image-large {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease-out;
}

/* PC版: 画像の上にユーザー情報（非表示） */
.pc-user-header {
  display: none;
}

/* グラデーションオーバーレイ */
.image-overlay {
  display: flex;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0) 100%);
  align-items: flex-end;
  padding: 12px;
  pointer-events: none;
}

.image-overlay-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: auto;
  max-width: 95%;
}

.image-overlay-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* アバター＋時間帯バッジのコンテナ */
.avatar-with-time-badge {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

/* 時間帯バッジ（アバター右下に重ねる） */
.avatar-time-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.avatar-time-badge .time-of-day-icon {
  width: 14px;
  height: 14px;
}

/* アバター遷移コンテナ */
.avatar-transition-container {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.pc-user-header .avatar-transition-container {
  width: 32px;
  height: 32px;
}

/* 時間帯アイコン（大きいバージョン） */
.time-icon-large {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: opacity 0.5s ease-out;
}

.time-icon-large.morning {
  background-color: rgba(255, 255, 255, 0.9);
}

.time-icon-large.day {
  background-color: rgba(255, 255, 255, 0.9);
}

.time-icon-large.night {
  background-color: rgba(255, 255, 255, 0.9);
}

.time-icon-large .time-icon-svg {
  width: 80%;
  height: 80%;
}

.time-icon-large.morning .time-icon-svg {
  color: #FFC107; /* アンバー */
}

.time-icon-large.day .time-icon-svg {
  color: #2196F3; /* ブルー */
}

.time-icon-large.night .time-icon-svg {
  color: #3F51B5; /* インディゴ */
}

.time-icon-large.fade-out {
  opacity: 0;
}

/* アバターのフェードイン */
.avatar-transition-container .overlay-user-avatar-link,
.avatar-transition-container .pc-user-avatar-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-transition-container .overlay-user-avatar-link.fade-in,
.avatar-transition-container .pc-user-avatar-link.fade-in {
  opacity: 1;
}

/* 旧スタイル（後方互換性のため残す） */
.time-of-day-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.time-of-day-badge .time-of-day-icon {
  color: inherit;
  filter: none;
}

/* ユーザー情報（名前と日時） */
.user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* 日時表示 */
.fishing-report-datetime {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.8em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* PC版: オーバーレイ内のコメント */
.image-overlay-comment {
  color: #fff;
  font-size: 0.95em;
  line-height: 1.5;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  white-space: pre-wrap;
  max-height: 4.5em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* オーバーレイ上のテキストは白色（アイコンはバッジ内で色付き） */

.image-overlay .fishing-report-user-name {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.image-overlay .fishing-report-user-name a {
  color: #fff;
}

/* オーバーレイ内のアバター */
.overlay-user-avatar-link {
  flex-shrink: 0;
}

.overlay-user-avatar-link .user-avatar {
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* PC版ヘッダーのアバター */
.pc-user-avatar-link {
  flex-shrink: 0;
  text-decoration: none;
}

.pc-user-avatar-link .user-avatar {
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* 画像右上のアクションボタン */
.image-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.image-action-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
  color: #606770;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.image-action-button:hover {
  background-color: #fff;
  transform: scale(1.05);
}

.image-action-button:active {
  transform: scale(0.95);
}

.image-action-button svg {
  width: 18px;
  height: 18px;
}

/* 削除ボタンは赤色でホバー */
.image-action-button.delete-button:hover {
  background-color: #fff;
  color: #d9534f;
}

/* プライバシー設定インジケーター（水色の盾マーク） */
.image-action-button.privacy-indicator {
  background-color: rgba(255, 255, 255, 0.95);
  cursor: default;
}

.image-action-button.privacy-indicator:hover {
  background-color: rgba(255, 255, 255, 0.95);
}

.image-action-button.privacy-indicator svg {
  width: 16px;
  height: 16px;
}

/* コメント通知バー（画面下部固定） */
.comment-notification-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  text-decoration: none;
  display: block;
}

/* モバイル：ボトムナビの上に配置 */
@media (max-width: 768px) {
  .comment-notification-bar {
    bottom: calc(70px + env(safe-area-inset-bottom, 0));
  }
}

.comment-notification-content {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
  color: #fff;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(25, 118, 210, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-size: 14px;
  font-weight: 500;
}

.comment-notification-content:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(25, 118, 210, 0.5);
}

.comment-notification-content:active {
  transform: scale(0.98);
}

.comment-notification-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.comment-notification-text {
  white-space: nowrap;
}

.comment-notification-arrow {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  animation: bounce 1.5s infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(3px);
  }
}

/* 釣果詳細情報のコンテナ */
.fishing-report-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* ヘッダー情報（時間帯アイコン、ユーザー名、リンクコピー） */
.fishing-report-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fishing-report-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.time-of-day-icon {
  width: 24px;
  height: 24px;
  color: #606770;
}

.fishing-report-user-name {
  font-size: 1em;
  font-weight: bold;
}

/* ユーザー名リンクのスタイル */
.fishing-report-user-name a {
  text-decoration: none;
  color: inherit; /* 親要素の文字色を継承 */
}

/* 釣果コメント（PC版では非表示、スマホ版で表示） */
.fishing-report-comment-wrapper {
  display: none;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid #e8ecef;
}

/* コメント本文 */
.owner-comment-body {
  position: relative;
  padding-left: 24px;
}

.quote-icon {
  position: absolute;
  left: 0;
  top: 2px;
  width: 16px;
  height: 16px;
  color: #1877f2;
  opacity: 0.5;
}

.fishing-report-comment {
  font-size: 0.95em;
  color: #333;
  white-space: pre-wrap; /* 改行を反映させる */
  margin: 0;
  line-height: 1.7;
}

/* コメント折りたたみ状態 */
.fishing-report-comment.collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 続きを読むボタン */
.comment-toggle-button {
  background: none;
  border: none;
  color: #1877f2;
  font-size: 0.8em;
  padding: 6px 0 0;
  cursor: pointer;
  font-weight: 500;
  margin-left: 24px;
}

.comment-toggle-button:hover {
  text-decoration: underline;
}

.comment-toggle-button.hidden {
  display: none;
}

/* 魚情報・使用タックル共通セクションスタイル */
.fish-info-section,
.used-tackle-section {
  border-top: none;
  padding: 12px;
  margin-top: 8px;
  background-color: #f8f9fa;
  border-radius: 10px;
}

/* 魚情報が最初の要素の場合は上部の線と余白を削除し、背景を追加 */
.fishing-report-details > .fish-info-section:first-child {
  border-top: none;
  padding: 12px;
  margin-top: 0;
  background-color: #f8f9fa;
  border-radius: 10px;
}

.fish-info-section h3,
.fishing-report-details .used-tackle-section h3 {
  font-size: 0.9em;
  font-weight: 600;
  margin-bottom: 6px;
  color: #606770;
}

.no-tackle-message {
  color: #606770;
  font-size: 0.9em;
  margin: 0;
}

/* 使用タックル - カード形式グリッドレイアウト（PC版） */
.fishing-report-details .tackle-set-display {
  margin-bottom: 12px;
  width: 100%;
  box-sizing: border-box;
}

.fishing-report-details .tackle-set-display .tackle-set-name {
  font-size: 0.75em;
  font-weight: 600;
  color: #606770;
  display: block;
  margin-bottom: 8px;
}

.fishing-report-details .tackle-items-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 100%;
}

.fishing-report-details .tackle-item-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: #f7f8fa;
  border-radius: 8px;
  border: 1px solid #e4e6eb;
  transition: background-color 0.2s, border-color 0.2s;
  overflow: hidden;
  min-width: 0;
}

.fishing-report-details .tackle-item-card.has-memo {
  cursor: pointer;
}

.fishing-report-details .tackle-item-card.has-memo:hover {
  background: #f0f2f5;
  border-color: #d8dadf;
}

.fishing-report-details .tackle-item-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
}

.fishing-report-details .tackle-memo-indicator {
  flex-shrink: 0;
  margin-left: auto;
  color: #8a8d91;
}

.fishing-report-details .memo-icon {
  width: 14px;
  height: 14px;
}

.fishing-report-details .tackle-item-memo {
  padding: 8px 10px;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #e4e6eb;
}

.fishing-report-details .tackle-item-memo p {
  margin: 0;
  font-size: 0.75em;
  color: #65676b;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.fishing-report-details .tackle-item-memo.hidden {
  display: none;
}

.fishing-report-details .tackle-item-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #e4e6eb;
}

.fishing-report-details .tackle-card-icon {
  width: 20px;
  height: 20px;
  fill: #65676b;
}

.fishing-report-details .tackle-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.fishing-report-details .tackle-item-name {
  font-size: 0.85em;
  font-weight: 600;
  color: #1c1e21;
  line-height: 1.3;
  word-break: break-word;
}

.fishing-report-details .tackle-item-manufacturer {
  font-size: 0.72em;
  color: #65676b;
  font-weight: 500;
}

.fish-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}

.fish-info-item {
  background-color: #ffffff;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.fish-info-label {
  font-weight: bold;
  font-size: 0.85em;
  color: #606770;
  display: block;
  margin-bottom: 3px;
}

.fish-info-value {
  font-size: 1em;
}

/* 未入力の値は薄く表示 */
.fish-info-value.empty {
  color: #adb5bd;
}

/* AI判定結果: 青色で強調表示 */
.fish-info-value.ai-fish-name {
  color: #1877f2;
  font-weight: 500;
}


/* スマホ対応 */
@media (max-width: 768px) {
  /* form-pageの中央配置を上揃えに変更（layout.cssより詳細度を上げる） */
  body.with-header.form-page:has(.fishing-report-show-container) .main-content {
    align-items: flex-start;
  }

  /* 詳細度を上げるためにbody.form-pageを追加 */
  body.form-page .fishing-report-show-container {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    box-sizing: border-box;
    border-radius: 0;
    box-shadow: none;
  }

  .fishing-report-show-container .image-navigation-wrapper {
    max-width: 100%;
    margin-bottom: 0;
  }

  .fishing-report-show-container .image-container {
    width: 100%;
    height: 35vh;
    margin: 0;
    padding: 0;
    border-radius: 0;
    overflow: hidden;
  }

  .fishing-report-show-container .fishing-report-image-large {
    width: 100%;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: 0;
    border-radius: 0;
    object-fit: cover;
    object-position: center;
    display: block;
  }

  .image-overlay {
    padding: 10px 14px;
  }

  .time-of-day-badge {
    width: 32px;
    height: 32px;
  }

  .fishing-report-datetime {
    font-size: 0.7em;
  }

  /* スマホ版: オーバーレイ内のコメントを非表示 */
  .image-overlay-comment {
    display: none;
  }

  /* スマホ版: 詳細セクションのコメントを表示 */
  .fishing-report-comment-wrapper {
    display: block;
    padding: 12px 14px;
    margin-top: 10px;
  }

  .owner-comment-body {
    padding-left: 20px;
  }

  .quote-icon {
    width: 14px;
    height: 14px;
  }

  .comment-toggle-button {
    margin-left: 20px;
  }

  .image-actions {
    top: 8px;
    right: 8px;
    gap: 6px;
  }

  .image-action-button {
    width: 32px;
    height: 32px;
  }

  .image-action-button svg {
    width: 16px;
    height: 16px;
  }

  .fishing-report-details {
    padding: 12px 14px 16px;
    gap: 10px;
  }

  .fishing-report-header {
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f2f5;
  }

  .fishing-report-comment {
    font-size: 0.9em;
    line-height: 1.6;
    color: #1c1e21;
  }

  .fish-info-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .fish-info-item {
    padding: 8px;
    border-radius: 8px;
    background-color: #ffffff;
    border: 1px solid #e9ecef;
  }

  .fish-info-label {
    font-size: 0.7em;
    margin-bottom: 3px;
  }

  .fish-info-value {
    font-size: 0.85em;
    font-weight: 500;
  }

  .fish-info-section,
  .used-tackle-section {
    padding: 10px;
    margin-top: 8px;
    border-top: none;
    background-color: #f8f9fa;
    border-radius: 10px;
  }

  /* 魚情報が最初の要素の場合は背景を追加（スマホ版） */
  .fishing-report-details > .fish-info-section:first-child {
    border-top: none;
    padding: 10px;
    margin-top: 0;
    background-color: #f8f9fa;
    border-radius: 10px;
  }

  .fish-info-section h3,
  .fishing-report-details .used-tackle-section h3 {
    font-size: 0.8em;
    font-weight: 600;
    margin-bottom: 6px;
    color: #606770;
  }

  /* 魚種とAI判定は横幅いっぱい */
  .fish-info-item.full-width {
    grid-column: 1 / -1;
  }

  /* 使用タックル - 2列グリッドレイアウト（モバイル版） */
  .fishing-report-details .tackle-set-display {
    margin-bottom: 8px;
  }

  .fishing-report-details .tackle-set-display .tackle-set-name {
    font-size: 0.65em;
    font-weight: 600;
    color: #606770;
    display: block;
    margin-bottom: 6px;
  }

  .fishing-report-details .tackle-items-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .fishing-report-details .tackle-item-card {
    align-items: stretch;
    gap: 6px;
    padding: 8px 6px;
  }

  .fishing-report-details .tackle-item-main {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
  }

  .fishing-report-details .tackle-memo-indicator {
    position: absolute;
    top: 4px;
    right: 4px;
    margin-left: 0;
  }

  .fishing-report-details .tackle-item-card.has-memo {
    position: relative;
  }

  .fishing-report-details .memo-icon {
    width: 12px;
    height: 12px;
  }

  .fishing-report-details .tackle-item-icon {
    width: 24px;
    height: 24px;
  }

  .fishing-report-details .tackle-card-icon {
    width: 14px;
    height: 14px;
  }

  .fishing-report-details .tackle-item-info {
    align-items: center;
    gap: 1px;
  }

  .fishing-report-details .tackle-item-name {
    font-size: 0.7em;
    font-weight: 600;
    line-height: 1.25;
  }

  .fishing-report-details .tackle-item-manufacturer {
    font-size: 0.6em;
    font-weight: 500;
  }

  .fishing-report-details .tackle-item-memo {
    padding: 6px 8px;
    text-align: left;
  }

  .fishing-report-details .tackle-item-memo p {
    font-size: 0.6em;
  }

  .header-action-button {
    width: 32px;
    height: 32px;
  }

  .header-action-button svg {
    width: 18px;
    height: 18px;
  }
}

/* Time-specific icon colors */
.time-of-day-icon.morning {
  color: #FFC107; /* Amber */
}

.time-of-day-icon.day {
  color: #2196F3; /* Blue */
}

.time-of-day-icon.night {
  color: #3F51B5; /* Indigo */
}

/* 送信ボタンの非活性時のスタイル */
.login-form input[type="submit"]:disabled,
.login-form button.login-form__submit:disabled {
  background-color: #a0aec0; /* A neutral gray */
  cursor: not-allowed;
}

/* ライトボックス（全画面画像表示） */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: var(--z-index-modal);
  cursor: pointer;
}

.lightbox-overlay.hidden {
  display: none;
}

.lightbox-image {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
}

/* ヘッダーアクションボタン（リンクコピー、編集、削除） */
.header-action-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background-color: #f0f2f5;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  color: #606770;
  text-decoration: none;
}

.header-action-button:hover {
  background-color: #e4e6e9;
  color: #1877f2;
}

.header-action-button:active {
  background-color: #dddfe2;
}

.header-action-button svg {
  width: 20px;
  height: 20px;
}

/* 削除ボタンは赤色でホバー */
.header-action-button.delete-button:hover {
  background-color: #ffebee;
  color: #d9534f;
}

/* コピー成功時のツールチップ */
.copy-tooltip {
  background-color: #1c1e21;
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85em;
  z-index: var(--z-index-notification);
  animation: tooltip-fade-in 0.2s ease-out;
  pointer-events: none;
  white-space: nowrap;
}

.copy-tooltip.fade-out {
  animation: tooltip-fade-out 0.3s ease-out forwards;
}

/* エラー時のツールチップ */
.copy-tooltip-error {
  background-color: #d9534f;
}

@keyframes tooltip-fade-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes tooltip-fade-out {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(-5px);
  }
}

/* =========================================== */
/* スワイプナビゲーション */
/* =========================================== */

/* 画像とナビゲーション矢印のラッパー */
.image-navigation-wrapper {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 12px;
  animation: fade-in 0.3s ease-out;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 詳細情報のアニメーション */
.fishing-report-details {
  animation: fade-in-up 0.3s ease-out 0.1s both;
}

/* リアクションボタン */
.bait-reactions-container {
  animation: fade-in-up 0.3s ease-out 0.15s both;
}

/* コメントセクション */
.fishing-report-comment-wrapper {
  animation: fade-in-up 0.3s ease-out 0.2s both;
}

/* 魚情報セクション */
.fish-info-section {
  animation: fade-in-up 0.3s ease-out 0.25s both;
}

/* タックルセクション */
.used-tackle-section {
  animation: fade-in-up 0.3s ease-out 0.3s both;
}

/* 魚図鑑モーダル */
.fish-encyclopedia-modal {
  animation: fade-in 0.2s ease-out;
}

/* ナビゲーション矢印ボタン */
.swipe-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  color: #333;
  text-decoration: none;
  transition: all 0.2s ease;
  opacity: 0.7;
}

.swipe-nav-arrow:hover {
  opacity: 1;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-50%) scale(1.05);
}

.swipe-nav-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.swipe-nav-arrow svg {
  width: 24px;
  height: 24px;
}

.swipe-nav-prev {
  left: 8px;
}

.swipe-nav-next {
  right: 8px;
}

/* スライドアウトアニメーション */
.image-container.slide-out-left {
  animation: slide-out-left 0.2s ease-out forwards;
}

.image-container.slide-out-right {
  animation: slide-out-right 0.2s ease-out forwards;
}

@keyframes slide-out-left {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-30px);
  }
}

@keyframes slide-out-right {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(30px);
  }
}

/* モバイル対応 */
@media (max-width: 768px) {
  .swipe-nav-arrow {
    width: 36px;
    height: 36px;
    opacity: 0.5;
  }

  .swipe-nav-arrow svg {
    width: 20px;
    height: 20px;
  }

  .swipe-nav-prev {
    left: 4px;
  }

  .swipe-nav-next {
    right: 4px;
  }
}

/* ===========================================
   コメントセクション
   =========================================== */

.comments-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.comments-section h3 {
  font-size: 16px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.comments-section h3 i {
  color: #3b82f6;
}

.comments-section h3 #comments-count {
  font-weight: 700;
  color: #3b82f6;
}

/* コメント一覧 */
.comments-list {
  margin-bottom: 16px;
}

.comments-empty {
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
  padding: 24px 0;
}

/* 個別コメント */
.comment {
  position: relative;
  padding: 12px;
  padding-right: 40px;
  margin-bottom: 12px;
  background: #f9fafb;
  border-radius: 8px;
}

.comment:last-child {
  margin-bottom: 0;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.comment-user {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}

.comment-user:hover .comment-user-name {
  text-decoration: underline;
}

.comment-user-icon {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* user_avatarヘルパーのフォールバック用 */
.comment-user-icon.user-avatar-default {
  background: #e5e7eb;
}

.comment-user-name {
  font-weight: 600;
  font-size: 13px;
  color: #374151;
}

.comment-time {
  font-size: 11px;
  color: #9ca3af;
  margin-left: auto;
}

/* 削除フォーム（右端に配置） */
.comment-delete-form {
  position: absolute;
  top: 10px;
  right: 10px;
  margin: 0;
  padding: 0;
}

.comment-delete-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.15s, background-color 0.15s, color 0.15s;
}

.comment:hover .comment-delete-btn {
  opacity: 1;
}

.comment-delete-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* 返信先表示 */
.comment-reply-to {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 6px;
  padding-left: 40px;
}

.comment-reply-to svg {
  flex-shrink: 0;
  color: #9ca3af;
}

.comment-content {
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
  word-break: break-word;
}

.comment-content p {
  margin: 0;
}

/* コメントフォーム */
.comment-form-container {
  margin-top: 16px;
}

.comment-form-row {
  margin-bottom: 8px;
}

.comment-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  resize: vertical;
  min-height: 60px;
  font-family: inherit;
  box-sizing: border-box;
}

.comment-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.comment-form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.comment-form-hint {
  font-size: 12px;
  color: #9ca3af;
}

.comment-form-error {
  padding: 10px 12px;
  margin-bottom: 10px;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #dc2626;
  font-size: 13px;
}

.comment-form-error p {
  margin: 0;
}

.comment-form-error:empty {
  display: none;
}

.comment-submit-btn {
  padding: 8px 20px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.comment-submit-btn:hover {
  background: #2563eb;
}

.comment-submit-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

/* ログインプロンプト */
.comment-login-prompt {
  text-align: center;
  padding: 16px;
  background: #f9fafb;
  border-radius: 8px;
  color: #6b7280;
  font-size: 14px;
}

.comment-login-prompt a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
}

.comment-login-prompt a:hover {
  text-decoration: underline;
}

/* 返信先表示（コメント内） */
.comment-reply-to {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 6px;
  padding-left: 2px;
}

.comment-reply-to svg {
  color: #9ca3af;
}

/* コメントスレッド */
.comment-thread {
  margin-bottom: 12px;
}

.comment-thread:last-child {
  margin-bottom: 0;
}

.comment-thread > .comment {
  margin-bottom: 0;
}

/* 返信コメントのコンテナ */
.comment-replies {
  margin-left: 20px;
  padding-left: 16px;
  border-left: 2px solid #e5e7eb;
  margin-top: 8px;
}

/* 返信がない場合は非表示 */
.comment-replies:empty {
  display: none;
}

/* 返信コメント */
.comment--reply {
  background: #f3f4f6;
  margin-bottom: 8px;
  padding: 10px;
  padding-right: 40px;
}

/* 削除されたコメント */
.comment--deleted {
  background: #f3f4f6;
  padding: 12px;
  padding-right: 12px;
}

.comment-deleted-message {
  color: #9ca3af;
  font-size: 13px;
  font-style: italic;
}

.comment--reply:last-child {
  margin-bottom: 0;
}

/* 返信先アロー（ヘッダー内） */
.comment-reply-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #9ca3af;
  font-size: 12px;
}

.comment-reply-arrow svg {
  transform: scaleX(-1);
}

.comment-reply-to-name {
  color: #3b82f6;
  font-weight: 500;
}

/* コメントアクション（返信ボタンなど） */
.comment-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  padding-top: 6px;
}

.comment-reply-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: transparent;
  color: #6b7280;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.comment-reply-btn:hover {
  background: #f3f4f6;
  color: #3b82f6;
}

.comment-reply-btn svg {
  transition: color 0.2s;
}

.comment-reply-btn:hover svg {
  color: #3b82f6;
}

/* 返信先インジケーター（フォーム上部） */
.comment-reply-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  font-size: 13px;
}

.reply-to-label {
  color: #6b7280;
}

.reply-to-name {
  color: #3b82f6;
  font-weight: 500;
}

.reply-cancel-btn {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s;
}

.reply-cancel-btn:hover {
  background: #dbeafe;
  color: #3b82f6;
}

/* ===========================================
   潮位情報ブロック（日の出・潮・日の入り + 潮位グラフ）
   =========================================== */

.tide-info-block {
  background: linear-gradient(135deg, #e8f4fd 0%, #fef9e7 50%, #e8f4fd 100%);
  border-radius: 10px;
  padding: 12px;
  margin-top: 8px;
}

/* ブロック内の潮位グラフは背景を透明に */
.tide-info-block .tide-graph-section {
  background: transparent;
  padding: 0;
  margin-bottom: 0;
  border-radius: 0;
}

.tide-info-block .tide-graph-container {
  position: relative;
  height: 50px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  margin-bottom: 12px;
}

.tide-info-block .tide-graph-svg {
  width: 100%;
  height: 100%;
}

/* ===========================================
   日の出・潮・日の入り統合表示
   =========================================== */

.sun-tide-compact {
  padding: 0 0 8px 0;
  border-top: none;
  margin-top: 0;
}

.sun-tide-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.sun-item,
.tide-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.sun-item svg,
.tide-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sun-tide-label {
  font-size: 0.65em;
  color: #6b7280;
  font-weight: 500;
}

.sun-tide-value {
  font-size: 0.85em;
  font-weight: 600;
  color: #1f2937;
}

/* モバイル対応 */
@media (max-width: 640px) {
  .tide-info-block {
    padding: 10px;
    margin-top: 6px;
    border-radius: 10px;
  }

  .tide-info-block .tide-graph-section {
    background: transparent;
    padding: 0;
    margin-bottom: 0;
  }

  .sun-tide-compact {
    padding: 0 0 6px 0;
  }

  .sun-item svg,
  .tide-item svg {
    width: 18px;
    height: 18px;
  }

  .sun-tide-label {
    font-size: 0.6em;
  }

  .sun-tide-value {
    font-size: 0.75em;
  }
}

/* スマホ表示時はラベル非表示 */
@media (max-width: 480px) {
  .sun-tide-label {
    display: none;
  }
}

/* モバイル対応 */
@media (max-width: 640px) {
  .comments-section {
    margin-top: 20px;
    padding-top: 16px;
  }

  .comments-section h3 {
    font-size: 15px;
  }

  .comment {
    padding: 10px;
    padding-right: 36px;
    margin-bottom: 10px;
  }

  /* スマホでは削除ボタンを常に表示 */
  .comment-delete-btn {
    opacity: 1;
  }

  .comment-delete-form {
    top: 8px;
    right: 6px;
  }

  .comment-user-icon {
    width: 28px !important;
    height: 28px !important;
  }

  .comment-user-name {
    font-size: 12px;
  }

  .comment-content {
    font-size: 13px;
  }

  .comment-input {
    padding: 10px;
    font-size: 13px;
  }

  .comment-reply-indicator {
    padding: 6px 10px;
    font-size: 12px;
  }

  .comment-actions {
    margin-top: 6px;
  }

  .comment-reply-btn {
    font-size: 11px;
    padding: 3px 8px;
  }

  /* 返信のネスト表示（スマホ） */
  .comment-replies {
    margin-left: 12px;
    padding-left: 12px;
  }

  .comment--reply {
    padding: 8px;
    padding-right: 36px;
  }

  .comment-reply-arrow {
    font-size: 11px;
  }
}

/* ==========================================
   地図表示モーダル
   ========================================== */

/* 地図ボタン */
.location-map-button {
  position: relative;
}

.location-map-button.location-hidden svg {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* モーダルオーバーレイ */
.location-map-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

/* モーダルコンテンツ */
.location-map-modal-content {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* モーダルヘッダー */
.location-map-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
}

.location-map-modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.location-map-modal-header .modal-close-button {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s, color 0.2s;
}

.location-map-modal-header .modal-close-button:hover {
  background: #f0f0f0;
  color: #333;
}

/* 地図コンテナ */
.location-map-container {
  width: 100%;
  height: 300px;
}

/* スマホ対応 */
@media (max-width: 600px) {
  .location-map-modal {
    padding: 16px;
    align-items: center;
  }

  .location-map-modal-content {
    max-width: 100%;
    border-radius: 12px;
    max-height: 70vh;
  }

  .location-map-container {
    height: 50vh;
  }
}

/* 地図ボタンのアイコンコンテナ */
.location-button-icons {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 地図ボタンのシールドバッジ */
.location-shield-badge {
  position: absolute;
  bottom: -4px;
  right: -6px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  padding: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
