/* 清掃員レポート作成ページ - SP最適化 */

/* メディア選択モーダル */
#media-selection-dialog .media-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid #e5e7eb;
  transition: all 0.2s;
}

#media-selection-dialog .media-item:hover {
  border-color: #FF679C;
  transform: scale(1.02);
}

#media-selection-dialog .media-item.selected {
  border-color: #FF679C;
  border-width: 3px;
}

#media-selection-dialog .media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#media-selection-dialog .media-item-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 103, 156, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

#media-selection-dialog .media-item.selected .media-item-overlay {
  opacity: 1;
}

#media-selection-dialog .media-item-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  padding: 4px 8px;
  background: rgba(255, 103, 156, 0.9);
  color: #fff;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  z-index: 1;
}

.staff-report-page {
  min-height: 100vh;
  min-height: 100dvh; /* 動的ビューポート高さ（キーボード対応） */
  background: #f5f5f5;
  padding-top: 0; /* ヘッダーとタブは固定位置なのでpaddingは不要 */
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh; /* 動的ビューポート高さ（キーボード対応） */
  overflow: hidden;
}

.report-form {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 98px);
  overflow: hidden;
  padding-bottom: 0;
  margin-bottom: 0;
}

/* 固定ヘッダー */
.page-header-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  padding: 0 12px;
  z-index: 100;
  gap: 12px;
}

/* 進捗バー */
.form-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: #3b82f6;
  transition: width 0.3s ease;
  z-index: 101;
}

/* タブナビゲーション */
.tabs-navigation {
  position: fixed;
  top: 50px;
  left: 0;
  right: 0;
  height: 40px;
  background: #fff;
  display: flex;
  z-index: 99;
  padding: 0;
  border-bottom: 1px solid #e5e7eb;
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
  background: transparent;
  border: none;
  color: #6b7280;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.tab-btn.active {
  color: #FF679C;
  background: #fdf2f8;
}

.tab-btn .badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
  line-height: 1.2;
}

.tab-content {
  display: none;
  margin-top: 90px; /* 固定ヘッダー（50px）+ タブ（40px）の高さ分 */
  padding-top: 0;
  height: calc(100vh - 90px);
  height: calc(100dvh - 90px); /* 動的ビューポート高さ（キーボード対応） */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  padding-right: 0;
}

/* SP版：カスタムスクロールバー */
@media (max-width: 375px) {
  .tab-content {
    /* スクロールバーを常に表示 */
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
  }
  
  .tab-content::-webkit-scrollbar {
    width: 8px;
  }
  
  .tab-content::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 4px;
  }
  
  .tab-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .tab-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
  }
  
  /* スクロール位置インジケーター（◯） */
  .scroll-indicator {
    position: fixed;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(255, 103, 156, 0.8);
    border-radius: 50%;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.1s ease;
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.9);
  }
  
  .scroll-indicator.visible {
    opacity: 1;
  }
}

#tab-content-new {
  padding-bottom: 0;
  margin-bottom: 0;
  padding-top: 0;
}

.tab-content.active {
  display: block;
}

.back-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border-radius: 10px;
  color: #374151;
  text-decoration: none;
}

.page-title {
  flex: 1;
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.details-hint-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: flex-end;
}

.details-hint {
  font-size: 0.75rem;
  color: #FF679C;
  white-space: nowrap;
  display: none; /* デフォルトでは非表示 */
  font-weight: 600;
  animation: none;
}

.details-hint.visible {
  display: inline-block;
  animation: floatHint 2s ease-in-out infinite;
}

@keyframes floatHint {
  0%, 100% {
    transform: translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateY(-4px);
    opacity: 0.8;
  }
}

.details-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: #f3f4f6;
  border: none;
  border-radius: 8px;
  color: #374151;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.details-btn:hover {
  background: #e5e7eb;
  color: #111827;
}

.details-btn.active {
  background: #FF679C;
  color: #fff;
}

.details-btn-text {
  font-size: 0.85rem;
}

.help-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #6b7280;
  font-size: 1.2rem;
  cursor: pointer;
}

/* サイドパネル */
.side-panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(2px);
}

.side-panel-overlay.active {
  opacity: 1;
  visibility: visible;
}

.side-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 85%;
  max-width: 400px;
  height: 100vh;
  height: 100dvh;
  background: #fff;
  z-index: 1001;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.side-panel.active {
  transform: translateX(0);
}

.side-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #FF679C 0%, #FF8FB1 100%);
  color: #fff;
  flex-shrink: 0;
}

.side-panel-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  color: #fff;
}

.side-panel-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.side-panel-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.side-panel-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
}

/* 基本情報セクション（サイドパネル内） */
.side-panel-content .report-header-section {
  background: transparent;
  padding: 0;
  color: #111827;
  margin-top: 0;
  margin-left: 0;
  margin-right: 0;
  flex-shrink: 0;
  overflow-x: hidden;
  overflow-y: visible;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

.side-panel-content .report-header-section .form-input,
.side-panel-content .report-header-section .form-select {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  color: #111827;
}

.side-panel-content .report-header-section .form-input:focus,
.side-panel-content .report-header-section .form-select:focus {
  border-color: #FF679C;
  background: #fff;
}

.side-panel-content .report-header-section .date-time-label {
  color: #374151;
}

.side-panel-content .report-header-section .dropdown-arrow-btn {
  color: #6b7280;
}

/* サイドパネル内の画像ストック */
.side-panel-content .image-stock-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
  background: transparent;
}

.side-panel-content .image-stock-header {
  margin-bottom: 12px;
}

.side-panel-content .image-stock-header h3 {
  font-size: 0.95rem;
}

.side-panel-content .image-stock-actions {
  flex-wrap: wrap;
  gap: 6px;
}

.side-panel-content .btn-upload-stock {
  font-size: 0.8rem;
  padding: 5px 10px;
}

.side-panel-content .image-stock-description {
  margin-bottom: 10px;
}

.side-panel-content .image-stock-description p {
  font-size: 0.75rem;
}

.side-panel-content .image-stock-grid {
  max-height: 400px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.side-panel-content .image-stock-item {
  width: 60px;
  height: 60px;
}

.side-panel-content .image-stock-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* パネル内の日時・時刻を別々の行に */
.side-panel-content .report-header-section .form-row.three-col.date-time-row {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

.side-panel-content .report-header-section .form-row.three-col.date-time-row .date-time-group {
  width: 100% !important;
  flex: 1 1 auto !important;
  max-width: 100% !important;
}

/* レスポンシブ対応 */
@media (max-width: 480px) {
  .side-panel {
    width: 90%;
    max-width: 90%;
  }
  
  .details-btn-text {
    display: none;
  }
  
  .details-btn {
    padding: 6px;
    min-width: 36px;
  }
  
  .details-hint {
    font-size: 0.7rem;
  }
  
  .details-hint-wrapper {
    gap: 4px;
  }
}

/* タブレット以上ではサイドパネルを少し大きく */
@media (min-width: 481px) {
  .side-panel {
    width: 75%;
    max-width: 350px;
  }
}

.form-row {
  margin-bottom: 8px;
  margin-left: 0;
  margin-right: 0;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: visible;
}

.form-row.two-col {
  overflow-x: hidden;
  overflow-y: visible;
  overflow: hidden;
}

.form-row:last-child {
  margin-bottom: 0;
}

.form-row.two-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row.two-col .date-time-group,
.form-row.three-col .date-time-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  padding: 0;
  gap: 2px; /* ラベルとプレースホルダーの間隔を狭める */
}

.form-row.three-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row.three-col.date-time-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.form-row.three-col-inline {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
}

.form-row.three-col-inline .form-group {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.form-row.three-col-inline .date-time-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  flex: 1;
  min-width: 0;
  padding-right: 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.form-row.three-col-inline .date-time-group:first-child {
  gap: 0;
}

/* 開始・終了のラベルとアイコンの間隔を密着 */
.form-row.three-col-inline .date-time-group:not(:first-child) {
  gap: 0;
}

.form-row.three-col-inline .date-time-group:last-child {
  border-right: none;
  padding-right: 0;
}

.date-time-label {
  font-size: 0.7rem;
  font-weight: 600;
  opacity: 0.95;
  white-space: nowrap;
  flex-shrink: 0;
  color: #fff;
  min-width: fit-content;
  text-align: left;
  margin-bottom: 2px; /* ラベルとプレースホルダーの間隔を狭める */
  padding-left: 0;
  display: block;
}

.date-time-label .required {
  color: #fef08a;
}

.date-time-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  min-width: 0;
  position: relative;
  width: 100%;
  height: 38px; /* ブランド名、開始時刻、終了時刻と高さを統一 */
  margin: 0;
  padding: 0;
}

/* 日付・時刻入力フィールドのプレースホルダー表示を統一 */
.date-time-input-wrapper:has([data-placeholder])::before {
  content: attr(data-placeholder);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af !important; /* 灰色で表示 */
  font-weight: 500;
  pointer-events: none;
  z-index: 2; /* z-indexを上げて確実に表示 */
  font-size: 0.9rem;
  white-space: nowrap;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.95); /* 背景を白にして可読性を確保 */
  padding: 2px 4px;
  border-radius: 2px;
}

/* 開始時刻フィールドのプレースホルダーをスピナーボタンの後に表示 */
.date-time-input-wrapper:has([data-placeholder="開始時間"])::before {
  left: 40px; /* スピナーボタンの幅分右にずらす */
}

/* 値が入力されている場合、またはフォーカス時にプレースホルダーを非表示 */
.date-time-input-wrapper:has(input[value]:not([value=""]))::before,
.date-time-input-wrapper:has(input:focus)::before,
.date-time-input-wrapper:has(input:valid:not(:placeholder-shown))::before {
  display: none;
}

.date-time-icon {
  font-size: 0.85rem;
  color: #fff;
  flex-shrink: 0;
}

/* 日付・時刻入力フィールドのスタイルを統一 */
.date-time-input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  width: 100%;
  box-sizing: border-box;
  color: #111827;
  background: rgba(255, 255, 255, 0.95); /* 白い背景を追加して可読性を確保 */
  height: 38px; /* ブランド名、開始時刻、終了時刻と高さを統一 */
  line-height: 1.5;
  font-size: 0.9rem;
  margin: 0;
  border: none;
  outline: none;
  border-radius: 4px; /* 角を丸くして見やすく */
}

.date-time-input::placeholder {
  color: #9ca3af;
  opacity: 1;
  font-weight: 500;
  font-size: 0.9rem;
}

/* date入力フィールドの表示を統一 */
input[type="date"].date-time-input {
  color: #111827;
}

input[type="date"].date-time-input::-webkit-datetime-edit-text {
  color: #111827;
}

input[type="date"].date-time-input::-webkit-datetime-edit-month-field,
input[type="date"].date-time-input::-webkit-datetime-edit-day-field,
input[type="date"].date-time-input::-webkit-datetime-edit-year-field {
  color: #111827;
}

input[type="date"].date-time-input:invalid::-webkit-datetime-edit-text {
  color: #111827;
}

/* 値が入力されていない場合の表示（プレースホルダーが表示されるため、入力フィールド自体は透明に） */
input[type="date"].date-time-input:invalid {
  color: transparent; /* プレースホルダーが表示されるため、入力フィールド自体は透明に */
}

/* 値が入力されている場合は黒字で表示 */
input[type="date"].date-time-input:valid {
  color: #111827;
}

/* time入力フィールドの表示を統一 */
input[type="time"].date-time-input {
  color: #111827;
  text-align: left;
  direction: ltr;
  padding-left: 12px;
}

input[type="time"].date-time-input::-webkit-datetime-edit-text {
  color: #111827;
}

input[type="time"].date-time-input::-webkit-datetime-edit-hour-field,
input[type="time"].date-time-input::-webkit-datetime-edit-minute-field {
  color: #111827;
}

input[type="time"].date-time-input:invalid::-webkit-datetime-edit-text {
  color: #111827;
}

/* 値が入力されていない場合の表示（プレースホルダーが表示されるため、入力フィールド自体は透明に） */
input[type="time"].date-time-input:invalid {
  color: transparent; /* プレースホルダーが表示されるため、入力フィールド自体は透明に */
}

/* 値が入力されている場合は黒字で表示 */
input[type="time"].date-time-input:valid {
  color: #111827;
}

/* time入力フィールドのプレースホルダーを非表示（data-placeholderがある場合） */
.date-time-input-wrapper:has([data-placeholder]) input[type="time"].date-time-input::placeholder {
  color: transparent;
  opacity: 0;
}

.date-time-input-wrapper:has([data-placeholder]) input[type="time"].date-time-input::-webkit-datetime-edit-text,
.date-time-input-wrapper:has([data-placeholder]) input[type="time"].date-time-input::-webkit-datetime-edit-hour-field,
.date-time-input-wrapper:has([data-placeholder]) input[type="time"].date-time-input::-webkit-datetime-edit-minute-field {
  color: transparent;
}

.date-time-input-wrapper:has([data-placeholder]) input[type="time"].date-time-input:invalid::-webkit-datetime-edit-text,
.date-time-input-wrapper:has([data-placeholder]) input[type="time"].date-time-input:invalid::-webkit-datetime-edit-hour-field,
.date-time-input-wrapper:has([data-placeholder]) input[type="time"].date-time-input:invalid::-webkit-datetime-edit-minute-field {
  color: transparent;
}

/* time入力フィールドのスピナーボタン（プラス/マイナス）を左側に配置 */
input[type="time"].date-time-input::-webkit-inner-spin-button,
input[type="time"].date-time-input::-webkit-outer-spin-button {
  margin: 0;
  padding: 0;
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  height: 20px;
  width: 20px;
  opacity: 1;
  cursor: pointer;
}

/* time入力フィールドのdatetime-edit要素を左寄せ（スピナーの後に配置） */
input[type="time"].date-time-input::-webkit-datetime-edit {
  text-align: left;
  margin-left: 32px; /* スピナーボタンの幅分右にずらす */
  padding-left: 0;
}

input[type="time"].date-time-input::-webkit-datetime-edit-hour-field,
input[type="time"].date-time-input::-webkit-datetime-edit-minute-field {
  text-align: left;
  padding-left: 0;
  margin-left: 0;
}

.form-row.three-col-inline .date-time-group {
  gap: 0;
}

.form-row.three-col-inline .date-time-group .date-time-input-wrapper {
  gap: 0;
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.form-label-inline {
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.95;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 60px;
}

.form-label-inline .required {
  color: #fef08a;
}

.form-label {
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.9;
}

.form-label .required {
  color: #fef08a;
}

.form-input,
.form-select {
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  background: rgba(255,255,255,0.95);
  color: #111827;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  height: 38px; /* 高さを統一 */
  line-height: 1.5;
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23374151' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

.form-input[readonly] {
  cursor: pointer;
  background: rgba(255,255,255,0.95);
}

.form-input::placeholder {
  color: #9ca3af;
  opacity: 0.8;
  padding: 0;
}


.form-input:focus,
.form-select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.5);
}

/* バリデーション */
.form-input.validation-error,
.form-select.validation-error {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-input.validation-valid,
.form-select.validation-valid {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.validation-error-message {
  display: block;
  color: #dc2626;
  font-size: 0.75rem;
  margin-top: 4px;
  padding-left: 4px;
}

.form-group {
  position: relative;
}

/* 進捗バー */
.form-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: #3b82f6;
  transition: width 0.3s ease;
  z-index: 101;
}

/* 店舗検索 */
.store-search-group {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.store-search-group .store-search-wrapper {
  width: 100%;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.store-search-wrapper {
  position: relative;
}

.input-with-dropdown {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-with-dropdown .form-input {
  padding-right: 40px;
}

/* input-with-dropdown内の不要なspan要素を非表示 */
.input-with-dropdown > span {
  display: none !important;
}

#report-brand-search {
  position: relative;
}

#brand-dropdown-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  font-size: 0.85rem;
  pointer-events: auto;
}

.dropdown-arrow-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  font-size: 0.85rem;
}

.dropdown-arrow-btn:hover {
  color: #374151;
}

.dropdown-arrow-btn:active {
  color: #111827;
}

.store-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  margin-top: 4px;
}

.store-search-results-modal {
  margin-top: 12px;
  max-height: calc(85vh - 200px);
  overflow-y: auto;
  background: #fff;
  border-radius: 8px;
}

.store-search-item {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #374151;
  border-bottom: 1px solid #f3f4f6;
}

.store-search-item:last-child {
  border-bottom: none;
}

.store-search-item:hover {
  background: #f9fafb;
}

.store-search-item.no-results {
  color: #9ca3af;
  cursor: default;
  font-style: italic;
}

.store-search-item.no-results:hover {
  background: transparent;
}

/* 画像ストックエリア */
.image-stock-section {
  background: #fff5f8;
  border-bottom: 1px solid #e5e7eb;
  padding: 16px;
  flex-shrink: 0;
}

.image-stock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.image-stock-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #374151;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.image-stock-header h3 i {
  color: #FF679C;
}

.image-stock-actions {
  display: flex;
  gap: 8px;
}

.btn-upload-stock {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #FF679C;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-upload-stock:hover {
  background: #e55a8a;
}

.btn-upload-stock:active {
  background: #cc4d7a;
}

.btn-clear-stock {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-clear-stock:hover {
  background: #dc2626;
}

.image-stock-description {
  margin-bottom: 12px;
}

.image-stock-description p {
  font-size: 0.8rem;
  color: #6b7280;
  margin: 0;
}

.image-stock-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 80px;
  padding: 8px;
  background: #f9fafb;
  border-radius: 8px;
  border: 2px dashed #e5e7eb;
  transition: border-color 0.2s;
}

.image-stock-grid.drag-over {
  border-color: #FF679C;
  background: #fdf2f8;
}

.image-stock-empty {
  width: 100%;
  text-align: center;
  padding: 20px;
  color: #9ca3af;
}

.image-stock-empty i {
  font-size: 2rem;
  margin-bottom: 8px;
  display: block;
  color: #ff679c;
}

.image-stock-empty p {
  font-size: 0.9rem;
  margin: 0 0 4px 0;
}

.image-stock-empty small {
  font-size: 0.75rem;
}

.image-stock-item {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  cursor: move;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s, opacity 0.2s;
  border: 2px solid #e5e7eb;
}

.image-stock-item:hover {
  transform: scale(1.05);
  border-color: #FF679C;
}

.image-stock-item.dragging {
  opacity: 0.5;
  transform: scale(0.9);
}

.image-stock-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-stock-item-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  background: rgba(255, 103, 156, 0.9);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 0.6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  padding: 0;
  min-width: 18px;
  min-height: 18px;
}

.image-stock-item:hover .image-stock-item-remove {
  opacity: 1;
}

.image-stock-item-remove:active {
  background: rgba(220, 38, 38, 0.9);
}

/* 画像ストック選択モード */
.image-stock-item.selected {
  border: 3px solid #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.image-stock-select-check {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 24px;
  height: 24px;
  background: #3b82f6;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  z-index: 10;
}

.image-stock-item.selected .image-stock-select-check {
  display: flex;
}

/* 一括操作ボタン */
.btn-select-mode,
.btn-bulk-delete {
  padding: 8px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-select-mode:hover,
.btn-bulk-delete:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.btn-select-mode.active {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

.btn-bulk-delete {
  background: #dc2626;
  color: #fff;
  border-color: #dc2626;
}

.btn-bulk-delete:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

/* セクション選択モード */
.section-card.section-selected {
  border: 3px solid #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.section-select-checkbox {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 2px solid #d1d5db;
  border-radius: 50%;
  cursor: pointer;
  margin-right: 8px;
  transition: all 0.2s;
}

.section-card.section-selected .section-select-checkbox {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}

.section-select-checkbox i {
  font-size: 0.875rem;
  display: none;
}

.section-card.section-selected .section-select-checkbox i {
  display: block;
}

/* セクション操作ボタン */
.btn-section-select-mode,
.btn-section-copy,
.btn-section-bulk-delete {
  padding: 8px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-section-select-mode:hover,
.btn-section-copy:hover,
.btn-section-bulk-delete:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.btn-section-select-mode.active {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

.btn-section-bulk-delete {
  background: #dc2626;
  color: #fff;
  border-color: #dc2626;
}

.btn-section-bulk-delete:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

/* トースト通知 */
.toast-container {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 90%;
  width: 400px;
  pointer-events: none;
}

.toast {
  background: #fff;
  border-radius: 8px;
  padding: 16px 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  animation: toastSlideIn 0.3s ease-out;
  border-left: 4px solid;
}

.toast.toast-success {
  border-left-color: #10b981;
}

.toast.toast-error {
  border-left-color: #ef4444;
}

.toast.toast-warning {
  border-left-color: #f59e0b;
}

.toast.toast-info {
  border-left-color: #3b82f6;
}

.toast-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.toast.toast-success .toast-icon {
  color: #10b981;
}

.toast.toast-error .toast-icon {
  color: #ef4444;
}

.toast.toast-warning .toast-icon {
  color: #f59e0b;
}

.toast.toast-info .toast-icon {
  color: #3b82f6;
}

/* 画像アップロード進捗表示用のスタイル */
.upload-progress-toast {
  min-width: 320px;
  max-width: 400px;
}

.upload-progress-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

.upload-progress-text {
  flex: 1;
  min-width: 0;
}

.upload-progress-message {
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.upload-progress-status {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 12px;
}

.upload-progress-bar-container {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.upload-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 0%;
}

.upload-progress-percent {
  font-size: 0.85rem;
  font-weight: 600;
  color: #3b82f6;
  text-align: right;
}

.toast-message {
  flex: 1;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #374151;
}

.toast-close {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.2s, transform 0.1s;
}

.toast-close:active {
  transform: scale(0.9);
}

.toast-close:hover {
  color: #374151;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.toast.toast-exit {
  animation: toastSlideOut 0.3s ease-in forwards;
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* 確認ダイアログ */
.confirm-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.confirm-dialog {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  max-width: 90%;
  width: 400px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: dialogSlideIn 0.3s ease-out;
}

@keyframes dialogSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.confirm-dialog-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e5e7eb;
}

.confirm-dialog-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.confirm-dialog-body {
  padding: 20px 24px;
  flex: 1;
  overflow-y: auto;
}

.confirm-dialog-message {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #374151;
  margin: 0;
}

.confirm-dialog-footer {
  padding: 16px 24px 20px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.confirm-dialog-footer .btn {
  min-width: 80px;
}

/* 実施清掃項目リスト */
.items-list-bar {
  background: #fff;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.items-list-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  display: block;
  margin-bottom: 8px;
}

.items-list-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.items-list-empty {
  font-size: 0.8rem;
  color: #9ca3af;
  font-style: italic;
}

/* セクション追加アイコンエリア */
.section-add-icons-area {
  background: transparent;
  padding: 12px 16px;
  padding-top: 16px; /* タブの下に隠れないように余白を追加 */
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  margin-top: 0; /* タブの直下から始まるように */
}

.section-add-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF679C 0%, #FF8FB1 100%);
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(255, 103, 156, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  z-index: 100;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.section-add-toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(255, 103, 156, 0.4);
}

.section-add-toggle-btn:active {
  transform: scale(0.95);
}

.section-add-toggle-btn.active {
  transform: rotate(45deg);
}

.section-add-hint {
  color: #FF679C;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 4px; /* +ボタンの上に表示 */
  animation: bounceHint 1.2s ease-in-out infinite;
  opacity: 1;
  display: block !important; /* 常に表示 */
  text-align: center;
}

.section-add-hint span {
  display: inline-block;
}

@keyframes bounceHint {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  25% {
    transform: translateY(-10px) scale(1.05);
  }
  50% {
    transform: translateY(0) scale(1);
  }
  75% {
    transform: translateY(-5px) scale(1.02);
  }
}

.section-add-icons {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
}

.section-add-icon-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  color: #374151;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.section-add-icon-btn:hover {
  background: #FF679C;
  border-color: #FF679C;
  color: #fff;
  transform: scale(1.1);
}

.section-add-icon-btn:active {
  transform: scale(0.95);
}

/* セクション下のプラスアイコン */
.section-add-after {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px;
  margin: 8px 0;
}

.section-add-after-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF679C 0%, #FF8FB1 100%);
  border: none;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(255, 103, 156, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.section-add-after-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(255, 103, 156, 0.4);
}

.section-add-after-btn:active {
  transform: scale(0.95);
}

.section-add-after-icons {
  display: none;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  animation: fadeIn 0.3s ease-out;
}

.section-add-after-icons.active {
  display: flex;
}

.section-add-after-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  color: #374151;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.section-add-after-icon:hover {
  background: #FF679C;
  border-color: #FF679C;
  color: #fff;
  transform: scale(1.1);
}

.section-add-after-icon:active {
  transform: scale(0.95);
}

.items-list-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #fdf2f8;
  color: #be185d;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* コンテンツエリア */
.report-content {
  padding: 12px;
  padding-top: 12px; /* セクション追加ボタンがタブの下に隠れないように */
  flex: 1;
  overflow-y: auto;
  min-height: 0; /* flexboxでスクロール可能にするために必要 */
}

/* セクションカード */
.section-card {
  background: #fff;
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  cursor: move;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.section-card.dragging {
  opacity: 0.5;
  transform: scale(0.98);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.section-card.drag-over {
  border: 2px dashed #FF679C;
  transform: scale(1.02);
}

.section-card.touching {
  background: #f3f4f6;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  cursor: move;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.section-select-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
  pointer-events: auto;
}

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

.section-header:hover {
  background: #f3f4f6;
}

.section-header:active {
  background: #e5e7eb;
}

.section-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 8px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  pointer-events: none;
}

.section-title::before {
  content: '☰';
  color: #9ca3af;
  font-size: 1rem;
  margin-right: 4px;
  cursor: move;
  pointer-events: auto;
}

.section-title i {
  color: #FF679C;
}

.section-copy {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #dbeafe;
  color: #2563eb;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: transform 0.1s, background 0.2s;
}

.section-copy:active {
  transform: scale(0.9);
  background: #bfdbfe;
}

.section-delete {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fee2e2;
  color: #dc2626;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: transform 0.1s, background 0.2s;
}

.section-delete:active {
  transform: scale(0.9);
  background: #fecaca;
}

.section-body {
  padding: 16px 20px;
  min-height: 120px;
}

/* 清掃項目セクション */
.cleaning-item-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.9rem;
  background: #fff;
}

.cleaning-item-add-actions {
  position: relative;
}

.cleaning-item-add-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #dbeafe;
  color: #2563eb;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: transform 0.1s, background 0.2s;
}

.cleaning-item-add-btn:hover {
  background: #bfdbfe;
}

.cleaning-item-add-btn:active {
  transform: scale(0.9);
  background: #93c5fd;
}

.cleaning-item-add-menu {
  min-width: 120px;
  padding: 4px;
}

.cleaning-item-add-menu-item {
  width: 100%;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  color: #374151;
  transition: background 0.2s;
  text-align: left;
}

.cleaning-item-add-menu-item:hover {
  background: #f3f4f6;
}

.cleaning-item-add-menu-item i {
  width: 16px;
  color: #6b7280;
}

.cleaning-item-insert-actions {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cleaning-item-insert-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cleaning-item-insert-btn:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cleaning-item-insert-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.cleaning-item-insert-btn i {
  font-size: 1.1rem;
  color: #3b82f6;
  margin: 0;
}

.cleaning-item-insert-btn span {
  display: none;
}

.cleaning-item-text-field-container {
  position: relative;
}

.cleaning-item-text-field-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: rgba(255, 103, 156, 0.9);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  z-index: 10;
  transition: transform 0.1s, background 0.2s;
}

.cleaning-item-text-field-delete:hover {
  background: rgba(255, 103, 156, 1);
  transform: scale(1.1);
}

/* セクション内画像コンテンツ */
.cleaning-item-image-content {
  margin-top: 16px;
  position: relative;
}

.cleaning-item-image-content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.cleaning-item-image-content-delete {
  width: 24px;
  height: 24px;
  background: rgba(255, 103, 156, 0.9);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  transition: transform 0.1s, background 0.2s;
}

.cleaning-item-image-content-delete:hover {
  background: rgba(255, 103, 156, 1);
  transform: scale(1.1);
}

.cleaning-item-image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cleaning-item-image-grid .image-list {
  min-height: 120px;
  border: 2px dashed #e5e7eb;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.cleaning-item-image-grid .image-thumb {
  width: 80px;
  height: 80px;
  position: relative;
  border-radius: 4px;
  overflow: hidden;
}

.cleaning-item-image-grid .image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cleaning-item-image-grid .image-thumb-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  background: rgba(255, 103, 156, 0.9);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  z-index: 10;
  transition: transform 0.1s, background 0.2s;
}

.cleaning-item-image-grid .image-thumb-remove:hover {
  background: rgba(255, 103, 156, 1);
  transform: scale(1.1);
}

.cleaning-item-text-field-delete:active {
  transform: scale(0.9);
}

/* 画像セクション */
.image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}

/* 施工後セクションは中央に1列表示 */
.image-grid-completed {
  grid-template-columns: 1fr;
  justify-items: center;
}

.image-category {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 施工後カテゴリは中央揃え */
.image-category-completed {
  align-items: center;
  max-width: 100%;
}

.image-category-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
}

.image-category-title.before {
  color: #3b82f6;
}

.image-category-title.after {
  color: #10b981;
}

.image-category-title.completed {
  color: #f59e0b;
}

.image-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 80px;
  padding: 6px;
  border-radius: 8px;
  transition: background-color 0.2s;
  align-items: center;
  justify-content: flex-start;
}

.image-list.drag-over {
  background-color: #fdf2f8;
  border: 2px dashed #FF679C;
}

/* 施工後セクションは中央に1列表示 */
.image-grid-completed {
  grid-template-columns: 1fr;
  justify-items: center;
}

/* 施工後カテゴリは中央揃え */
.image-category-completed {
  align-items: center;
  max-width: 100%;
}

/* 施工後リストは中央揃え */
.image-list-completed {
  justify-content: center;
  align-items: center;
}

/* デフォルト画像（プレースホルダー） - 非表示 */
.image-placeholder {
  display: none;
}

.default-no-photo-image {
  display: none;
}

.image-thumb {
  width: 120px;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  cursor: move;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s, opacity 0.2s;
  border: 2px solid #e5e7eb;
}

.image-thumb.dragging {
  opacity: 0.5;
  transform: scale(0.9);
}

.image-thumb.touching {
  background: #f3f4f6;
  transform: scale(0.95);
}

.image-thumb:hover {
  transform: scale(1.05);
}

.image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
}

.image-thumb-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  padding: 8px;
  color: #fff;
  font-size: 0.7rem;
  pointer-events: none;
  z-index: 1;
}

.image-thumb-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  background: rgba(255, 103, 156, 0.9);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 0.65rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s, background 0.2s;
}

.image-thumb-remove:active {
  transform: scale(0.9);
  background: rgba(220, 38, 38, 0.9);
}

.image-add-btn {
  width: 120px;
  height: 120px;
  min-width: 120px;
  min-height: 120px;
  border: 2px dashed #d1d5db;
  border-radius: 10px;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #9ca3af;
  font-size: 0.85rem;
  font-weight: 600;
  gap: 4px;
  transition: transform 0.1s, background 0.2s, border-color 0.2s;
  margin: 0 auto;
}

.image-add-btn i {
  font-size: 1.5rem;
}

.image-add-btn:active {
  background: #f3f4f6;
  border-color: #FF679C;
  color: #FF679C;
}

/* コメント・作業内容セクション */
.section-textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.9rem;
  resize: vertical;
}

.section-textarea:focus {
  outline: none;
  border-color: #FF679C;
}

/* 追加ボタンフッター */
.add-buttons-footer {
  position: relative;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  padding: 8px 12px;
  display: none !important; /* 画面下部のセクション呼び出しボタンを非表示 */
  gap: 6px;
  flex-shrink: 0;
}

.btn-add {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  color: #4b5563;
  font-size: 0.65rem;
  font-weight: 600;
}

.btn-add i {
  font-size: 1.1rem;
  color: #FF679C;
}

.btn-add:active {
  background: #fdf2f8;
  border-color: #FF679C;
}

/* 送信ボタン */
.submit-section {
  position: relative;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  padding: 8px 16px;
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.btn-preview {
  flex: 0 0 auto;
  padding: 10px 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
  min-height: 44px;
}

.btn-preview:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.btn-preview:active {
  background: #f3f4f6;
  transform: scale(0.98);
}

.btn-submit {
  flex: 1;
  padding: 10px 20px;
  background: linear-gradient(135deg, #FF679C 0%, #FF8FB1 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(255, 103, 156, 0.3);
  min-height: 44px;
}

.btn-submit:active {
  transform: scale(0.98);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* モーダル */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none; /* デフォルトで非表示 */
  align-items: flex-end;
  justify-content: center;
}

/* ブランド選択・店舗選択モーダルをサイドパネルの上に表示 */
#brand-select-modal,
#store-select-modal {
  z-index: 2000 !important;
}

.modal-overlay .modal-content {
  width: 100%;
  max-width: 100%;
  max-height: 85vh;
  background: #fff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
}

.modal-content {
  display: flex;
  flex-direction: column;
  max-height: 85vh;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border: none;
  border-radius: 8px;
  color: #6b7280;
  cursor: pointer;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  color: #111827;
  background: #ffffff;
}

.modal-footer {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

.modal-footer .btn {
  flex: 1;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-outline {
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #374151;
}

.btn-primary {
  background: #FF679C;
  border: none;
  color: #fff;
}

/* 画像倉庫モーダル */
.warehouse-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.warehouse-tabs .tab-btn {
  flex: 1;
  padding: 10px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.warehouse-tabs .tab-btn.active {
  border-color: #FF679C;
  background: #fdf2f8;
  color: #FF679C;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* アップロードエリア */
.upload-area {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.upload-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 16px;
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  background: #f9fafb;
  cursor: pointer;
  color: #6b7280;
  font-size: 0.85rem;
  font-weight: 500;
}

.upload-btn i {
  font-size: 2rem;
  color: #FF679C;
}

.upload-btn:active {
  background: #fdf2f8;
  border-color: #FF679C;
}

.upload-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.upload-preview-item {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.upload-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ストック選択グリッド */
.stock-selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
  padding: 8px;
}

.stock-selection-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.2s;
}

.stock-selection-item:hover {
  border-color: #FF679C;
  transform: scale(1.05);
}

.stock-selection-item.selected {
  border-color: #FF679C;
  box-shadow: 0 0 0 3px rgba(255, 103, 156, 0.2);
}

.stock-selection-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stock-selection-check {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  background: rgba(255, 103, 156, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.stock-selection-item.selected .stock-selection-check {
  opacity: 1;
}

/* ライブラリフィルター */
.library-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.library-filters .form-input,
.library-filters .form-select {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.85rem;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-height: 250px;
  overflow-y: auto;
}

.library-item {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: 2px solid transparent;
}

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

.library-item.selected {
  border-color: #FF679C;
}

.library-item.selected::after {
  content: '✓';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: #FF679C;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

/* 画像セクションタイプ選択モーダル */
.image-section-type-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0;
}

.image-section-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  gap: 8px;
}

.image-section-type-btn:hover {
  border-color: #FF679C;
  background: #fff5f8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 103, 156, 0.15);
}

.image-section-type-btn i {
  font-size: 2rem;
  color: #FF679C;
  margin-bottom: 4px;
}

.image-section-type-btn .type-title {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.image-section-type-btn .type-description {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
}

/* ヘルプモーダル */
.help-section {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.help-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.help-section h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.help-section h4 i {
  color: #FF679C;
}

.help-section p {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0;
  line-height: 1.5;
}

/* ローディング */
.loading {
  text-align: center;
  padding: 20px;
  color: #9ca3af;
}

/* ダークモード対応 */
body.dark-mode .staff-report-page {
  background: #111827;
}

body.dark-mode .page-header-fixed {
  background: #1f2937;
  border-color: #374151;
}

body.dark-mode .page-title {
  color: #f9fafb;
}

body.dark-mode .section-card {
  background: #1f2937;
}

body.dark-mode .section-header {
  background: #374151;
  border-color: #4b5563;
}

body.dark-mode .section-title {
  color: #f9fafb;
}

body.dark-mode .items-list-bar {
  background: #1f2937;
  border-color: #374151;
}

body.dark-mode .add-buttons-footer {
  background: #1f2937;
  border-color: #374151;
}

body.dark-mode .submit-section {
  background: #1f2937;
  border-color: #374151;
}

/* 修正依頼リスト */
.revision-list-container {
  padding: 12px;
  min-height: calc(100vh - 98px);
}

.revision-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.revision-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border-left: 4px solid #f59e0b;
}

.revision-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.revision-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.revision-card-date {
  font-size: 0.75rem;
  color: #6b7280;
}

.revision-card-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: #374151;
}

.revision-card-comment {
  background: #fef3c7;
  border-left: 3px solid #f59e0b;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: #92400e;
}

.revision-card-comment-label {
  font-weight: 600;
  margin-bottom: 4px;
  display: block;
}

.revision-card-actions {
  display: flex;
  gap: 8px;
}

.btn-edit {
  flex: 1;
  padding: 10px 16px;
  background: #FF679C;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-edit:active {
  transform: scale(0.98);
  background: #e91e63;
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #9ca3af;
  gap: 12px;
}

.loading-spinner i {
  font-size: 2rem;
  color: #FF679C;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #9ca3af;
  gap: 12px;
  text-align: center;
}

.empty-state i {
  font-size: 3rem;
  color: #d1d5db;
}

.empty-state p {
  font-size: 0.9rem;
  margin: 0;
}

/* ダイアログ要素のスタイル */
.modal-dialog {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(2px);
}

.modal-dialog[open] {
  display: flex;
}

.modal-dialog::backdrop {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(2px);
}

/* SP画面でのダイアログスタイル */
@media (max-width: 768px) {
  .modal-dialog {
    align-items: flex-end;
  }
  
  .modal-dialog .modal-content {
    width: 100%;
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: 85vh;
  }
}

body.dark-mode .modal-dialog {
  background: #1f2937;
}

body.dark-mode .modal-header {
  border-color: #374151;
}

body.dark-mode .modal-header h3 {
  color: #f9fafb;
}

body.dark-mode .modal-footer {
  border-color: #374151;
}

/* ========================================
   レスポンシブ対応（モバイルファースト）
   ======================================== */

/* 超小型デバイス（320px以下） */
@media (max-width: 320px) {
  .page-header-fixed {
    padding: 0 8px;
  }
  
  .page-title {
    font-size: 0.95rem;
  }
  
  .back-btn,
  .help-btn {
    width: 32px;
    height: 32px;
  }
  
  .tab-btn {
    font-size: 0.8rem;
    padding: 10px 8px;
  }
  
  .tab-btn span {
    display: none;
  }
  
  .report-header-section {
    padding: 10px;
  }
  
  /* 日付・開始時刻・終了時刻を水平方向に並べる（320px以下） */
  .form-row.three-col.date-time-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 6px;
    margin-bottom: 8px;
  }
  
  /* パネル内では別行に */
  .side-panel-content .report-header-section .form-row.three-col.date-time-row {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    gap: 12px !important;
  }
  
  .side-panel-content .report-header-section .form-row.three-col.date-time-row .date-time-group {
    width: 100% !important;
    flex: 1 1 auto !important;
    max-width: 100% !important;
  }
  
  .form-row.three-col.date-time-row .date-time-group {
    min-width: 0;
    width: 100%;
  }
  
  .form-row.two-col {
    gap: 10px;
  }
  
  .form-row.three-col:not(.date-time-row) {
    gap: 10px;
  }
  
  .form-row.three-col.date-time-row {
    gap: 6px;
  }
  
  .date-time-label {
    font-size: 0.65rem;
    margin-bottom: 2px; /* ラベルとプレースホルダーの間隔を狭める */
  }
  
  /* 日付・時刻入力フィールドのスタイルを統一 */
  .date-time-input {
    font-size: 0.75rem;
    padding: 8px 12px;
    height: 38px;
  }
  
  /* プレースホルダーのフォントサイズを統一 */
  .date-time-input-wrapper:has([data-placeholder])::before {
    font-size: 0.75rem;
    left: 12px;
  }
  
  .date-time-input::placeholder {
    font-size: 0.75rem;
  }
  
  .form-input,
  .form-select {
    font-size: 0.85rem;
    padding: 10px;
  }
  
  .btn-add {
    font-size: 0.75rem;
    padding: 10px 8px;
  }
  
  .btn-add span {
    display: none;
  }
}

/* 小型デバイス（375px以下） */
@media (max-width: 375px) {
  .page-header-fixed {
    padding: 0 10px;
  }
  
  .page-title {
    font-size: 1rem;
  }
  
  .report-header-section {
    padding: 12px;
  }
  
  /* 日付・開始時刻・終了時刻を水平方向に並べる（SP版） */
  .form-row.three-col.date-time-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 8px;
    margin-bottom: 8px;
  }
  
  .form-row.three-col.date-time-row .date-time-group {
    min-width: 0;
    width: 100%;
  }
  
  /* パネル内では別行に */
  .side-panel-content .report-header-section .form-row.three-col.date-time-row {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    gap: 12px !important;
  }
  
  .side-panel-content .report-header-section .form-row.three-col.date-time-row .date-time-group {
    width: 100% !important;
    flex: 1 1 auto !important;
    max-width: 100% !important;
  }
  
  .form-row.two-col {
    gap: 12px;
  }
  
  .form-row.three-col:not(.date-time-row) {
    gap: 12px;
  }
  
  .form-row.three-col.date-time-row {
    gap: 8px;
  }
  
  .date-time-label {
    font-size: 0.7rem;
    margin-bottom: 2px; /* ラベルとプレースホルダーの間隔を狭める */
  }
  
  .form-row.three-col-inline {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .form-row.three-col-inline .date-time-group {
    flex: 1 1 100%;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-right: 0;
    padding-bottom: 8px;
  }
  
  .form-row.three-col-inline .date-time-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
  
  /* 単独の.form-row内の.date-time-groupの幅を確保 */
  .form-row:not(.two-col):not(.three-col):not(.three-col-inline) .date-time-group {
    width: 100%;
  }
  
  .form-row:not(.two-col):not(.three-col):not(.three-col-inline) .form-group {
    width: 100%;
  }
  
  .date-time-label {
    font-size: 0.8rem;
    min-width: 50px;
  }
  
  /* 日付・時刻入力フィールドのスタイルを統一 */
  .date-time-input {
    font-size: 0.8rem;
    padding: 8px 12px;
    height: 38px;
  }
  
  /* プレースホルダーのフォントサイズを統一 */
  .date-time-input-wrapper:has([data-placeholder])::before {
    font-size: 0.8rem;
    left: 12px;
    color: #9ca3af !important; /* 灰色で表示 */
    display: block !important; /* SP版でも確実に表示 */
  }
  
  /* 開始時間フィールドのプレースホルダーをスピナーボタンの後に表示 */
  .date-time-input-wrapper:has([data-placeholder="開始時間"])::before {
    left: 40px; /* スピナーボタンの幅分右にずらす */
  }
  
  /* 終了時刻フィールドのプレースホルダー */
  .date-time-input-wrapper:has([data-placeholder="終了時刻"])::before {
    left: 12px;
  }
  
  /* 値が入力されている場合、またはフォーカス時にプレースホルダーを非表示 */
  .date-time-input-wrapper:has(input[value]:not([value=""]))::before,
  .date-time-input-wrapper:has(input:focus)::before,
  .date-time-input-wrapper:has(input:valid:not(:placeholder-shown))::before {
    display: none !important;
  }
  
  .date-time-input::placeholder {
    font-size: 0.8rem;
  }
  
  /* time入力フィールドのスピナーボタン（プラス/マイナス）を左側に配置（SP版） */
  input[type="time"].date-time-input::-webkit-inner-spin-button,
  input[type="time"].date-time-input::-webkit-outer-spin-button {
    margin: 0 !important;
    padding: 0 !important;
    position: absolute;
    left: 12px !important;
    top: 50%;
    transform: translateY(-50%);
    height: 20px !important;
    width: 20px !important;
    opacity: 1 !important; /* SP版でも確実に表示 */
    display: block !important; /* SP版でも確実に表示 */
    cursor: pointer !important;
    -webkit-appearance: none !important;
    appearance: none !important;
  }
  
  /* time入力フィールドのdatetime-edit要素を左寄せ（スピナーの後に配置）（SP版） */
  input[type="time"].date-time-input::-webkit-datetime-edit {
    text-align: left;
    margin-left: 32px; /* スピナーボタンの幅分右にずらす */
    padding-left: 0;
  }
  
  /* time入力フィールドのpaddingを調整（SP版） */
  input[type="time"].date-time-input {
    padding-left: 12px !important; /* スピナーボタンのスペースを確保 */
  }
  
  input[type="time"].date-time-input::-webkit-datetime-edit-hour-field,
  input[type="time"].date-time-input::-webkit-datetime-edit-minute-field {
    text-align: left;
    padding-left: 0;
    margin-left: 0;
  }
  
  /* 値が入力されていない場合の表示（SP版） */
  input[type="time"].date-time-input:invalid {
    color: transparent; /* プレースホルダーが表示されるため、入力フィールド自体は透明に */
  }
  
  /* 値が入力されている場合は黒字で表示（SP版） */
  input[type="time"].date-time-input:valid {
    color: #111827;
  }
  
  /* 値が入力されていない場合の表示（SP版） */
  input[type="date"].date-time-input:invalid {
    color: transparent; /* プレースホルダーが表示されるため、入力フィールド自体は透明に */
  }
  
  /* 値が入力されている場合は黒字で表示（SP版） */
  input[type="date"].date-time-input:valid {
    color: #111827;
  }
  
  .form-input,
  .form-select {
    font-size: 0.9rem;
    padding: 10px 12px;
    min-height: 44px; /* タッチターゲットサイズ */
  }
  
  .image-stock-section {
    padding: 12px;
  }
  
  .image-stock-grid {
    gap: 6px;
  }
  
  .image-stock-item {
    width: 60px;
    height: 60px;
  }
  
  .section-card {
    margin: 8px;
    padding: 12px;
  }
  
  .section-header {
    padding: 8px 0;
  }
  
  .section-title {
    font-size: 0.9rem;
  }
  
  .btn-add {
    min-height: 44px; /* タッチターゲットサイズ */
    padding: 12px 16px;
    font-size: 0.85rem;
  }
  
  .add-buttons-footer {
    padding: 12px;
    gap: 8px;
    flex-wrap: wrap;
  }
  
  .add-buttons-footer .btn-add {
    flex: 1 1 calc(50% - 4px);
    min-width: calc(50% - 4px);
  }
  
  .submit-section {
    padding: 12px;
    gap: 8px;
  }
  
  .btn-submit,
  .btn-preview {
    min-height: 48px; /* タッチターゲットサイズ */
    font-size: 0.9rem;
    padding: 12px 20px;
  }
  
  .modal-content {
    width: 95vw;
    max-width: 95vw;
    margin: 10px;
    max-height: calc(100vh - 20px);
  }
  
  .modal-header,
  .modal-footer {
    padding: 12px;
  }
  
  .modal-body {
    padding: 12px;
  }
  
  .toast-container {
    width: calc(100% - 20px);
    max-width: calc(100% - 20px);
    left: 10px;
    transform: none;
  }
  
  .confirm-dialog {
    width: 90vw;
    max-width: 90vw;
  }
  
  .image-list {
    gap: 6px;
  }
  
  .image-thumb {
    width: 120px;
    height: 120px;
  }
}

/* タブレット（768px以下） */
@media (max-width: 768px) {
  .report-header-section {
    padding: 14px;
  }
  
  /* 日付・開始時刻・終了時刻を水平方向に並べる（768px以下） */
  .form-row.three-col.date-time-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 8px;
    margin-bottom: 8px;
  }
  
  .form-row.three-col.date-time-row .date-time-group {
    min-width: 0;
    width: 100%;
  }
  
  /* パネル内では別行に */
  .side-panel-content .report-header-section .form-row.three-col.date-time-row {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    gap: 12px !important;
  }
  
  .side-panel-content .report-header-section .form-row.three-col.date-time-row .date-time-group {
    width: 100% !important;
    flex: 1 1 auto !important;
    max-width: 100% !important;
  }
  
  .form-row.two-col {
    gap: 12px;
  }
  
  .form-row.three-col.date-time-row {
    gap: 8px;
  }
  
  .date-time-label {
    font-size: 0.75rem;
    margin-bottom: 2px; /* ラベルとプレースホルダーの間隔を狭める */
  }
  
  .form-row.three-col-inline {
    gap: 8px;
  }
  
  .form-row.three-col-inline .date-time-group {
    gap: 4px;
    padding-right: 10px;
  }
  
  .date-time-label {
    font-size: 0.8rem;
    min-width: 45px;
  }
  
  .date-time-input {
    font-size: 0.85rem;
    padding: 9px 10px;
  }
  
  .date-time-icon {
    font-size: 0.8rem;
  }
  
  .form-input,
  .form-select {
    padding: 9px 12px;
    font-size: 0.9rem;
  }
  
  .image-stock-section {
    padding: 14px;
  }
  
  .section-card {
    margin: 10px 12px;
  }
  
  .btn-add {
    padding: 11px 14px;
  }
  
  .add-buttons-footer {
    padding: 14px;
  }
  
  .submit-section {
    padding: 14px;
  }
  
  .modal-content {
    width: 90vw;
    max-width: 600px;
  }
  
  .confirm-dialog {
    width: 85vw;
    max-width: 400px;
  }
}

/* タブレット横向き・小型デスクトップ（1024px以下） */
@media (max-width: 1024px) {
  .report-header-section {
    padding: 14px 16px;
  }
  
  .form-row.two-col {
    gap: 12px;
  }
  
  .section-card {
    margin: 8px 0px;
  }
  
  .modal-content {
    max-width: 700px;
  }
}

/* タッチデバイス向けの最適化 */
@media (hover: none) and (pointer: coarse) {
  /* タッチデバイスでのホバー効果を無効化 */
  .image-stock-item:hover {
    transform: none;
  }
  
  .image-stock-item-remove {
    opacity: 1; /* タッチデバイスでは常に表示 */
  }
  
  /* タップフィードバック */
  .btn-add:active,
  .btn-submit:active,
  .btn-preview:active,
  .section-delete:active {
    transform: scale(0.95);
    transition: transform 0.1s;
  }
  
  /* タッチターゲットの最小サイズ確保 */
  .dropdown-arrow-btn,
  .section-delete {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* 画像削除ボタンのサイズを適切に調整 */
  .image-thumb-remove,
  .image-stock-item-remove {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    font-size: 0.6rem;
  }
  
  /* スクロールの改善 */
  .tab-content,
  .modal-body,
  .preview-body {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
}

/* 高解像度ディスプレイ対応 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .image-thumb img,
  .image-stock-item img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* スクロール改善 */
html {
  scroll-behavior: smooth;
}

.tab-content {
  scroll-behavior: smooth;
}

/* プレビューモーダル */
.modal-overlay.preview-modal {
  display: none !important; /* プレビューモーダルはデフォルトで非表示 */
  background: rgba(255, 255, 255, 0.98) !important; /* 背景をほぼ白に */
  backdrop-filter: blur(2px) !important; /* 軽いブラー効果 */
  align-items: center !important; /* 中央配置 */
  justify-content: center !important; /* 中央配置 */
}

.modal-overlay.preview-modal.show {
  display: flex !important; /* showクラスが付いたときのみ表示 */
}

.modal-overlay.preview-modal .modal-content {
  max-width: 90vw;
  max-height: 90vh;
  width: 100%;
  background: white !important; /* モーダルコンテンツの背景も白に */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important; /* 軽い影で区別 */
  border-radius: 0 !important; /* 角丸を削除 */
}

.preview-body {
  max-height: calc(90vh - 120px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.preview-report {
  padding: 20px;
  background: #fff;
  border-radius: 8px;
}

.preview-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid #e5e7eb;
}

.preview-date {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 8px;
  }

.preview-store {
  font-size: 1rem;
  color: #374151;
  margin-bottom: 4px;
}

.preview-brand {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 4px;
}

.preview-time {
  font-size: 0.875rem;
  color: #6b7280;
}

.preview-items-list {
  margin-bottom: 24px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 8px;
}

.preview-items-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.preview-items-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preview-item-tag {
  display: inline-block;
  padding: 4px 12px;
  background: #3b82f6;
  color: #fff;
  border-radius: 16px;
  font-size: 0.875rem;
}

.preview-sections {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.preview-section {
  padding: 16px;
  background: #f9fafb;
  border-radius: 8px;
}

.preview-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}

.preview-content {
  font-size: 0.9375rem;
  color: #374151;
  line-height: 1.6;
  white-space: pre-wrap;
}

.preview-image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.preview-image-category {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preview-category-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  padding: 8px;
  background: #fff;
  border-radius: 4px;
}

.preview-image-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}

.preview-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
}

.preview-no-image {
  padding: 20px;
  text-align: center;
  color: #9ca3af;
  font-size: 0.875rem;
  background: #f3f4f6;
  border-radius: 4px;
}

/* 送信ボタンセクション */

