* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-tap-highlight-color: transparent;
}
html, body {
  min-height: 100dvh;
}
body {
  background: linear-gradient(180deg, #f7f8fb 0%, #eef1f6 100%);
  color: #1c1c1e;
  padding-top: env(safe-area-inset-top);
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  font-size: 22px;
}
body.modal-open {
  overflow: hidden;
}
.container {
  max-width: 640px;
  margin: 0 auto;
  padding-bottom: 12px;
}
/* ---------- 語言切換 ---------- */
.lang-switch {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin: 14px 0 12px;
}
.lang-switch button {
  font-size: 18px;
  padding: 7px 14px;
  border: 1px solid #e1e5eb;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #4b5563;
  backdrop-filter: blur(8px);
  touch-action: manipulation;
  transition: transform 120ms ease-out, background-color 120ms ease-out;
}
.lang-switch button:active {
  transform: scale(0.95);
  background: #ffffff;
}
/* ---------- 標題 ---------- */
header {
  padding: 18px 4px 14px;
}
header h1 {
  text-align: center;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #ff9a56 0%, #f27024 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 6px;
}
.subtitle {
  text-align: center;
  font-size: 18px;
  color: #6b7280;
  margin-bottom: 8px;
}
/* ---------- 頁面 ---------- */
.page {
  display: block;
}
.hidden {
  display: none !important;
}
h2 {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 14px;
  padding-left: 4px;
}
.label {
  font-size: 20px;
  font-weight: 600;
  color: #374151;
  margin: 18px 4px 10px;
}
/* ---------- 輸入框 ---------- */
.input-box {
  width: 100%;
  font-size: 21px;
  padding: 15px 12px; /* 左右padding由16px減到12px，騰多啲空間 */
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  margin-bottom: 12px;
  background: #ffffff;
  outline: none;
  appearance: none;
  transition: border-color 140ms, box-shadow 140ms;
}
.input-box:focus {
  border-color: #f27024;
  box-shadow: 0 0 4px rgba(242, 112, 36, 0.12);
}
.input-box::placeholder {
  font-size: 16px;  /* placeholder細過輸入文字，唔會逼住 */
  color: #999;
}
/* ---------- 按鈕網格 ---------- */
.btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}
.btn-grid button {
  padding: 16px 10px;
  border: none;
  border-radius: 16px;
  background: #ffffff;
  color: #374151;
  font-size: 19px;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 4px 12px rgba(17, 24, 39, 0.04);
  touch-action: manipulation;
  transition: transform 120ms ease-out, background-color 120ms ease-out;
}
.btn-grid button:active {
  transform: scale(0.96);
  background: #fff7f2;
}
/* ---------- 主按鈕 ---------- */
.big-primary-btn {
  width: 100%;
  padding: 20px;
  margin: 14px 0 10px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(135deg, #ff9a56 0%, #f27024 100%);
  color: #ffffff;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.3px;
  box-shadow: 0 8px 20px rgba(242, 112, 36, 0.28);
  touch-action: manipulation;
  transition: transform 120ms ease-out, box-shadow 120ms ease-out;
}
.big-primary-btn:active {
  transform: scale(0.97);
  box-shadow: 0 4px 12px rgba(242, 112, 36, 0.22);
}
.big-secondary-btn {
  width: 100%;
  padding: 18px;
  margin: 10px 0;
  border: none;
  border-radius: 18px;
  background: #ffffff;
  color: #4b5563;
  font-size: 22px;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 4px 12px rgba(17, 24, 39, 0.04);
  touch-action: manipulation;
  transition: transform 120ms ease-out, background-color 120ms ease-out;
}
.big-secondary-btn:active {
  transform: scale(0.97);
  background: #f9fafb;
}
.save-btn {
  background: linear-gradient(135deg, #34c759 0%, #27a844 100%);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(39, 168, 68, 0.28);
}
.save-btn:active {
  box-shadow: 0 4px 12px rgba(39, 168, 68, 0.22);
}
/* ====== 贊助按鈕樣式 ====== */
.sponsor-button {
  background-color: #fffbf5;
  color:#92400e;
  border:1px solid #fed7aa;
}
.sponsor-button:active{
  background-color:#fff1e0;
}
/* ---------- 資訊卡 ---------- */
.info-card {
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 18px;
  margin: 20px 0 12px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
}
.info-card p {
  display: flex;
  justify-content: space-between;
  font-size: 19px;
  color: #374151;
  margin: 6px 0;
}
.info-card span:last-child {
  font-weight: 700;
  color: #111827;
}
/* ---------- 相片預覽 ---------- */
#photo-preview-wrap {
  margin-top: 10px;
}
#photo-preview-wrap img,
#modal-photo-wrap img {
  width: 100%;
  max-height: 50vh;
  object-fit: contain;
  border-radius: 18px;
  margin: 10px 0;
  display: block;
  background: #f3f4f6;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.06);
}
.clear-photo-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 14px;
  background: #fff1f0;
  color: #e11d48;
  font-size: 19px;
  font-weight: 600;
  margin-top: 6px;
  touch-action: manipulation;
  transition: transform 120ms ease-out, background-color 120ms ease-out;
}
.clear-photo-btn:active {
  transform: scale(0.97);
  background: #ffe4e1;
}
/* ---------- 列表卡片 ---------- */
.item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 18px;
  padding: 16px 14px;
  margin-bottom: 10px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 4px 14px rgba(17, 24, 39, 0.04);
  touch-action: manipulation;
  transition: transform 120ms ease-out, background-color 120ms ease-out;
  cursor: pointer;
}
.item-card:active {
  transform: scale(0.985);
  background-color: #fff7f2;
}
.item-card-text {
  flex-grow: 1;
}
.item-name {
  font-size: 21px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
}
.item-location {
  font-size: 17px;
  color: #6b7280;
}
.item-card-arrow {
  font-size: 24px;
  color: #d1d5db;
  padding-left: 8px;
}
/* ---------- 彈窗 ---------- */
.modal-wrap {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease-out;
  z-index: 100;
}
.modal-wrap:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}
.modal-box {
  background: #ffffff;
  border-radius: 24px;
  width: 100%;
  max-width: 520px;
  max-height: 86vh;
  overflow-y: auto;
  padding: 22px;
  transform: scale(0.93);
  transition: transform 180ms ease-out;
}
.modal-wrap:not(.hidden) .modal-box {
  transform: scale(1);
}
.modal-box h3 {
  font-size: 24px;
  font-weight: 800;
  color: #111827;
  margin-bottom: 10px;
}
.modal-box p {
  font-size: 19px;
  color: #4b5563;
  margin: 8px 0;
}
.modal-btn-row {
  margin-top: 18px;
  display: flex;
  gap: 12px;
}
.modal-btn-row button {
  flex: 1;
  padding: 14px;
  font-size: 21px;
  border-radius: 14px;
  border: none;
  font-weight: 600;
  touch-action: manipulation;
  transition: transform 120ms ease-out, opacity 120ms;
}
.modal-btn-row button:active {
  transform: scale(0.96);
  opacity: 0.88;
}
.modal-btn-row button:first-child {
  background: #fff1f0;
  color: #e11d48;
}
.modal-btn-row button:last-child {
  background: #f3f4f6;
  color: #374151;
}
.del-modal-btn {
  background: #e53935;
  color: white;
}
/* ---------- 提示文字 ---------- */
.tip {
  color: #6b7280;
  font-size: 17px;
  margin: 6px 0 18px;
  padding-left: 4px;
}
/* ---------- 底部 Tab ---------- */
.bottom-tab-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
  box-shadow: 0 -1px 10px rgba(17, 24, 39, 0.06);
  transform: translateY(0);
  transition: transform 240ms ease-out;
  z-index: 90;
}
.bottom-tab-bar.tab-hide {
  transform: translateY(100%);
}
.tab-item {
  flex: 1;
  text-align: center;
  padding: 6px 4px 4px;
  touch-action: manipulation;
  cursor: pointer;
  color: #9aa3b2;
  border-radius: 14px;
  transition: background-color 140ms, color 140ms, transform 120ms;
}
.tab-item:active {
  transform: scale(0.94);
}
.tab-item.active {
  color: #f27024;
  background: rgba(242, 112, 36, 0.1);
}
.tab-icon {
  font-size: 26px;
  margin-bottom: 2px;
}
.tab-text {
  font-size: 14px;
  font-weight: 600;
}
/* ---------- 空狀態 ---------- */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #9aa3b2;
  font-size: 18px;
}
/* 將Netlify浮標移到畫面外，唔會遮擋底部按鈕 */
.netlify-badge {
  position: fixed !important;
  bottom: -100px !important;
}

/* 底部導航欄：拉高、加底部安全邊距，放大字體，適合長者點擊 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 90px;
  padding-bottom: 20px; /* 預留安全空間，防止被瀏覽器/浮水印遮擋 */
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: #ffffff;
  border-top: 1px solid #e5e5e5;
  font-size: 18px;
}

/* 底部每個Tab按鈕加大觸控範圍，長者更容易點中 */
.bottom-nav button {
  padding:12px 16px;
  min-width:90px;
  border:0;
  background:transparent;
  font-size:18px;
}

/* 成頁內容向上移，避免內容被底部導航遮蓋 */
body {
  padding-bottom: 110px !important;
}

