body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 15vh;
  background-color: #f8f9fa;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* home.hbs */
.dispatch-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  width: 90%;
  max-width: 420px;
  padding: 40px 32px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.logo-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.logo-img {
  width: 225px;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}

.logo-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #222222;
  letter-spacing: 0.5px;
}

.option-group {
  display: flex;
  gap: 16px;
  width: 100%;
}

.option-card {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.option-card:hover {
  border-color: #4a90e2;
  background-color: #f4f8ff;
}

.option-card:has(input:checked) {
  border-color: #2563eb;
  background-color: #eff6ff;
  font-weight: 600;
}

.option-card input[type="radio"] {
  margin-right: 8px;
  accent-color: #2563eb;
}

.option-text {
  font-size: 1rem;
  color: #333333;
}

.enter-btn {
  width: 100%;
  padding: 16px;
  background-color: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.enter-btn:hover {
  background-color: #1d4ed8;
}

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


/* photography.hbs */
.upload-container {
  max-width: 600px;
  margin: 40px auto;
  padding: 24px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.upload-title {
  font-size: 1.5rem;
  color: #1a1a1a;
  margin-bottom: 20px;
  font-weight: 600;
}

.camera-input-hidden {
  display: none;
}

.btn-camera {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  background-color: #007aff;
  color: white;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.btn-camera:hover {
  background-color: #0056b3;
}

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

.preview-wrapper {
  margin-top: 20px;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

#preview {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: 12px;
  display: none; /* JS 顯示 */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  animation: fadeIn 0.3s ease-in-out;
}

.action-buttons {
  display: none; /* JS 有圖片時顯示 */
  gap: 12px;
  margin-top: 16px;
}

.btn-submit {
  flex: 2;
  padding: 12px;
  background-color: #34c759;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-cancel {
  flex: 1;
  padding: 12px;
  background-color: #ff3b30;;
  color: #f2f2f7;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.style-selection {
  display: none;
  margin: 20px 0;
  width: 100%;
}

.style-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 12px;
  text-align: left;
}

/* 關鍵：橫向一字排開容器 */
.style-row {
  display: flex;
  flex-direction: row;
  gap: 16px;
  width: 100%;
  
  /* 手機上如果螢幕不夠寬，自動開啟順暢的橫向滑動 */
  overflow-x: auto;
  padding-bottom: 10px; /* 留出陰影與滾動條空間 */
  scroll-snap-type: x mandatory; /* 讓滑動自動對齊卡片 */
  -webkit-overflow-scrolling: touch; /* iOS 順暢滑動 */
}

/* 隱藏原生 Radio */
.style-radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* 單個風格卡片 */
.style-card {
  /* 設定固定寬度或最小寬度，讓圖片維持足夠寬度看清細節 */
  flex: 0 0 260px; /* 每個卡片寬度 260px (可依需求微調，如 280px 或 300px) */
  scroll-snap-align: start;
  cursor: pointer;
}

/* 卡片內部容器 */
.card-content {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  background-color: #fff;
  transition: all 0.2s ease-in-out;
  height: 100%;
}

/* 圖片設置：完整顯示原圖不裁切 */
.style-img {
  width: 100%;
  height: auto;
  max-height: 200px; /* 控制圖片最大高度，保持整體比例協調 */
  object-fit: contain; /* 確保原圖完整呈現，不縮圖、不裁切 */
  border-radius: 6px;
  background-color: #f8f9fa;
}

/* 風格文字 */
.style-name {
  margin-top: 10px;
  font-size: 1rem;
  font-weight: 500;
  color: #333;
}

/* 選中狀態高亮 (藍框 + 背景微藍) */
.style-radio:checked + .card-content {
  border-color: #007bff;
  background-color: #f0f7ff;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.25);
}

.style-radio:checked + .card-content .style-name {
  font-weight: bold;
  color: #007bff;
}

/* 美化橫向滾動條 */
.style-row::-webkit-scrollbar {
  height: 6px;
}
.style-row::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

/* carouselA.hbs / carouselB.hbs */
body.carousel-body {
  margin: 0;
  padding: 0;
  background: #000;
  overflow: hidden;
}

.carousel-page {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: #000;
}

.carousel-status {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  z-index: 2;
}

.carousel-status.hidden {
  display: none;
}

.carousel-image {
  display: block;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  background: #000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
}

.carousel-image.visible {
  opacity: 1;
  visibility: visible;
}

/* printer.hbs */
.printer-page {
  width: min(1200px, calc(100vw - 48px));
  margin: 40px auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.printer-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.printer-title {
  margin: 0;
  color: #1f2937;
  font-size: 2rem;
}

.printer-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.printer-filter {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 180px;
  color: #334155;
  font-weight: 600;
}

.printer-filter input,
.printer-filter select {
  height: 44px;
  padding: 0 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.95rem;
  background: #fff;
}

.printer-actions {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.printer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.printer-summary {
  margin: 0;
  color: #475569;
  font-size: 0.95rem;
}

.printer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 18px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}

.printer-btn-primary {
  background:lightseagreen;
  color: #ffffff;
}

.printer-btn-secondary {
  background: #e2e8f0;
  color: #1e293b;
}

.printer-table-wrap {
  overflow-x: auto;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.printer-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.printer-table th,
.printer-table td {
  padding: 16px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: middle;
  color: #334155;
}

.printer-table th {
  background: #f8fafc;
  color: #0f172a;
  font-size: 0.95rem;
}

.printer-thumbnail {
  display: block;
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
  background: #e2e8f0;
}

.printer-request-id {
  max-width: 280px;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9rem;
}

.printer-empty {
  padding: 32px 24px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  color: #475569;
  text-align: center;
  font-size: 1rem;
}

.printer-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.printer-page-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.printer-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  background: #ffffff;
  color: #1e293b;
  text-decoration: none;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  font-weight: 600;
}

.printer-page-link-current {
  background: lightseagreen;
  color: #ffffff;
}

.printer-page-link-nav {
  min-width: 88px;
}

@media (max-width: 768px) {
  body:has(.printer-page) {
    padding-top: 24px;
    align-items: flex-start;
  }

  .printer-page {
    width: min(100vw - 24px, 1200px);
    margin: 0 auto 24px;
  }

  .printer-actions {
    width: 100%;
  }

  .printer-btn {
    flex: 1;
  }

  .printer-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
