:root {
  --brand: #14b8a6;
  --brand-50: #ecfdf5;
  --ink: #0f172a;
  --muted: #64748b;
  --panel: #ffffff;
  --ring: #d1fae5;
  --shadow: 0 10px 30px rgba(2, 6, 23, .08);
  --link-bg: #f0f9ff;
  --link-border: #e0f2fe;
  --link-color: #0369a1;
  --nav-height: 60px; /* 定義導覽列基本高度 */
}

html { scroll-behavior: smooth; }
html, body { 
  margin: 0; 
  padding: 0; 
  background: #f8fafc; 
  color: var(--ink); 
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, Noto Sans TC, sans-serif; 
  display: flex; 
  flex-direction: column; 
  min-height: 100vh; 
}

/* ★ 重要修正：底部留白加大，避免內容被導覽列遮住 */
body { padding-bottom: 120px; }

.wrap { position: relative; max-width: 1160px; margin: 0 auto; padding: 18px 12px 28px; width: 100%; box-sizing: border-box; flex: 1; }

.pill { font-size: 12px; background: #ecfeff; color: #0f766e; padding: 4px 8px; border-radius: 999px; border: 1px solid #a5f3fc; }
.link { font-size: 12px; color: var(--link-color); background: var(--link-bg); border: 1px solid var(--link-border); text-decoration: none; font-weight: 600; padding: 3px 8px; border-radius: 6px; transition: background .2s; }
.link:hover { background: var(--link-border); }

/* --- 字體呼吸感 --- */
.h { 
  font-weight: 700; 
  font-size: 18px; 
  margin: 4px 0 8px; 
  line-height: 1.55; 
  letter-spacing: 0.3px;
}
.meta { 
  font-size: 13px; 
  line-height: 1.6; 
  margin-bottom: 10px; 
}
.meta div { margin-bottom: 3px; }

.meta-region { 
  cursor: pointer; position: relative; display: inline-block; transition: color 0.2s; color: #334155; font-weight: 600; 
}
.meta-region:hover { color: var(--brand); text-decoration: underline; }
.meta-region:active { transform: scale(0.98); }
.meta-region::after { content: '點擊複製'; position: absolute; left: 100%; top: 0; margin-left: 8px; background: #334155; color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 4px; opacity: 0; pointer-events: none; transition: opacity 0.2s; white-space: nowrap; }
.meta-region:hover::after { opacity: 1; }

.meta-time { color: #64748b; }

.tag { font-size: 11px; padding: 2px 8px; border-radius: 4px; background: #f1f5f9; border: 1px solid #cbd5e1; color: #475569; margin-right: 6px; display: inline-block; font-weight: 500; }
.tag[data-cat*="市集"], .tag[data-cat*="美食"], .tag[data-cat*="小吃"] { background: #fff7ed; color: #c2410c; border-color: #fdba74; }
.tag[data-cat*="親子"] { background: #fdf2f8; color: #be185d; border-color: #f9a8d4; }
.tag[data-cat*="展覽"], .tag[data-cat*="講座"] { background: #eff6ff; color: #1d4ed8; border-color: #93c5fd; }
.tag[data-cat*="表演"], .tag[data-cat*="音樂"], .tag[data-cat*="節慶"] { background: #faf5ff; color: #7e22ce; border-color: #d8b4fe; }
.tag[data-cat*="運動"], .tag[data-cat*="戶外"] { background: #f0f9ff; color: #0369a1; border-color: #7dd3fc; }
.tag[data-cat*="體驗"] { background: #ecfdf5; color: #047857; border-color: #6ee7b7; }

.req-badge { font-size: 11px; padding: 1px 6px; border-radius: 4px; margin-left: 6px; vertical-align: middle; display: inline-block; font-weight: normal; }
.req-badge.reg { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.req-badge.fee { background: #ffedd5; color: #9a3412; border: 1px solid #fdba74; }

.new-badge { font-size: 14px; margin-right: 6px; vertical-align: middle; animation: pulse-red 2s infinite; text-shadow: 0 0 5px rgba(244, 63, 94, 0.5); }
@keyframes pulse-red { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }

/* --- 狀態 Badge --- */
.badge-price { font-size:11px; background:#f3f4f6; color:#4b5563; padding:1px 6px; border-radius:4px; border:1px solid #d1d5db; vertical-align:middle; margin-right:6px; }
.badge-running { font-size:11px; background:#fee2e2; color:#b91c1c; padding:1px 4px; border-radius:4px; margin-right:6px; vertical-align:middle; }
.badge-soon { font-size:11px; background:#dbeafe; color:#1d4ed8; border:1px solid #93c5fd; padding:1px 4px; border-radius:4px; margin-right:6px; vertical-align:middle; }
.badge-today { font-size:11px; background:#dcfce7; color:#15803d; border:1px solid #86efac; padding:1px 4px; border-radius:4px; margin-right:6px; vertical-align:middle; }

/* --- 雙擊愛心動畫 --- */
.double-click-heart {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0);
  font-size: 4rem; pointer-events: none; animation: heart-pop 0.8s ease-out forwards; z-index: 10; text-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
@keyframes heart-pop {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  15% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
  30% { transform: translate(-50%, -50%) scale(0.9); opacity: 1; }
  100% { transform: translate(-50%, -150%) scale(1.5); opacity: 0; }
}

/* --- Grid & Card --- */
.grid { display: flex; flex-wrap: wrap; gap: 14px; }
.card { flex: 1 1 520px; min-width: 280px; background: var(--panel); border: 1px solid #e5e7eb; border-radius: 16px; padding: 16px; box-shadow: var(--shadow); display: flex; gap: 16px; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); position: relative; overflow: hidden; }
.card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12); border-color: var(--brand); }
.card.hidden { display: none; }
.card.expired-hidden { display: none !important; }

/* 卡片 - 今天活動高亮 */
.card.is-today { background: #fffff0; border: 1px solid #fcd34d; box-shadow: 0 10px 25px rgba(251, 191, 36, 0.15); }
.card.is-today::before { content: '★ TODAY'; position: absolute; top: 0; right: 0; background: #fcd34d; color: #78350f; font-size: 10px; font-weight: 800; padding: 2px 8px; border-bottom-left-radius: 8px; opacity: 0.8; z-index: 2;}

/* 卡片 - 今日公休狀態 */
.card.is-closed { background: #f8fafc; opacity: 0.75; filter: grayscale(0.6); border-style: dashed; }
.card.is-closed:hover { filter: grayscale(0); opacity: 1; }

@keyframes slideUpFade { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.card:not(.skeleton-card) { opacity: 0; animation: slideUpFade 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards; }

.card-date-col { flex-shrink: 0; width: 56px; display: flex; flex-direction: column; align-items: center; }
.card-content-col { flex: 1; min-width: 0; }

/* 左側方塊 */
.date-box { width: 100%; height: 56px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; text-align: center; box-shadow: 0 2px 4px rgba(0,0,0,0.03); }
.date-month { background: #ef4444; color: white; font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 2px 0; letter-spacing: 0.5px; }
.date-day { font-size: 22px; font-weight: 800; color: #334155; flex: 1; display: flex; align-items: center; justify-content: center; line-height: 1; }

.rating-box { background: #fffbeb !important; border-color: #fcd34d !important; color: #b45309; display:flex; flex-direction:column; justify-content:center; align-items:center; }
.rating-star { font-size: 14px; color: #f59e0b; }
.rating-score { font-size: 18px; font-weight: 800; }

.spot-box { background: #eff6ff !important; border-color: #bfdbfe !important; display:flex; justify-content:center; align-items:center;}
.spot-icon { font-size: 28px; }

.card-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.action-btn, .tabs label, .filter-toggle-btn { position: relative; overflow: hidden; }
.action-btn { background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; border-radius: 6px; padding: 4px 10px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all .2s; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; line-height: normal; }
.action-btn:hover { background: #f1f5f9; color: var(--ink); border-color: #cbd5e1; }

.btn-fb { background: #1877f2; color: #fff; border-color: #1877f2; }
.btn-fb:hover { background: #166fe5; color: #fff; opacity: 0.9; }
.btn-ig { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); color: #fff; border: none; }
.btn-ig:hover { opacity: 0.9; color: #fff; }
.btn-form { background: #10b981; color: #fff; border-color: #10b981; }
.btn-form:hover { background: #059669; color: #fff; }
.btn-line { background: #06c755; color: #fff; border-color: #06c755; }
.btn-line:hover { background: #05b34c; color: #fff; }
.btn-phone { background: #f59e0b; color: #fff; border-color: #d97706; }
.btn-phone:hover { background: #d97706; color: #fff; }

.tabs-container { margin: 12px 0; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs label { -webkit-user-select: none; user-select: none; cursor: pointer; font-size: 13px; color: #065f46; border: 1px solid #d1fae5; background: #ecfdf5; padding: 6px 12px; border-radius: 99px; transition: all .2s; text-align: center; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.tabs-input { position: absolute; opacity: 0; }
.tabs-input:checked+label { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3); }
.count-badge { font-size: 10px; background: rgba(0,0,0,0.1); color: inherit; padding: 1px 6px; border-radius: 99px; font-weight: 600; }
.tabs-input:checked+label .count-badge { background: rgba(255,255,255,0.3); color: #fff; }

.promo-card { display: flex; align-items: center; justify-content: center; gap: 14px; text-decoration: none; background-image: linear-gradient(#00000080, #00000080), url(https://i.meee.com.tw/6cI1hr0.jpg); background-size: cover; background-position: center; border-radius: 14px; padding: 16px; margin-top: 10px; border: 1px solid #e5e7eb; box-shadow: 0 4px 12px #0206170d; transition: transform .2s ease, box-shadow .2s ease; }
.promo-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px #02061714; }
.promo-avatar { width: 60px; height: 60px; border-radius: 999px; object-fit: cover; border: 2px solid rgba(255, 255, 255, .8); flex-shrink: 0; }
.promo-text { font-size: 16px; font-weight: 600; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.promo-text small { display: block; font-size: 13px; font-weight: 400; color: #ffffffe6; }

/* ★ 重要修正：浮動按鈕上移 */
.reset { 
    position: fixed; 
    right: 16px; 
    bottom: 100px; /* 從 100px 上移，避免被導覽列遮住 */
    z-index: 9998; /* 確保層級 */
}
#reset-filters-label { background: var(--brand); color: #fff; border: none; border-radius: 999px; padding: 10px 12px; font-size: 13px; cursor: pointer; box-shadow: 0 10px 24px #14b8a647; }

/* 表單與評論 */
.form-section { background: var(--panel); border: 1px solid #e5e7eb; border-radius: 14px; padding: 20px 24px; margin-top: 20px; box-shadow: var(--shadow); }
.form-section h2 { margin: 0 0 12px; color: var(--brand); font-size: 20px; text-align: center; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.form-group input { width: 100%; padding: 10px 12px; font-size: 15px; border: 1px solid #d1d5db; border-radius: 8px; box-sizing: border-box; }
.form-group input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.submit-btn { background: var(--brand); color: #fff; border: none; border-radius: 999px; padding: 10px 18px; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: 0 10px 24px #14b8a647; transition: all .2s; display: block; margin: 0 auto; }
.submit-btn:disabled, .submit-btn.cooldown { background: var(--muted); cursor: not-allowed; box-shadow: none; }
#form-status { font-size: 13px; margin-top: 10px; text-align: center; }

/* 評論區樣式 */
.review-panel { margin-top: 12px; padding: 12px; background: #f8fafc; border-radius: 10px; border: 1px solid #e2e8f0; animation: slideUpFade 0.3s ease; }
.review-list { max-height: 300px; overflow-y: auto; margin-bottom: 12px; }
.review-item { border-bottom: 1px solid #e2e8f0; padding: 8px 0; }
.review-item:last-child { border-bottom: none; }
.r-head { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 4px; color: #64748b; }
.r-name { font-weight: 700; color: #334155; }
.r-date { font-size: 11px; margin-left: auto; }
.r-content { font-size: 14px; color: #475569; line-height: 1.5; white-space: pre-wrap; }
.review-summary { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-weight: 700; color: #334155; border-bottom: 2px solid #e2e8f0; padding-bottom: 8px; }
.big-score { font-size: 24px; color: #f59e0b; }
.del-review-btn { background: none; border: none; font-size: 12px; cursor: pointer; opacity: 0.5; }
.del-review-btn:hover { opacity: 1; }

.review-form { border-top: 1px dashed #cbd5e1; padding-top: 10px; }
.rf-title { font-size: 13px; font-weight: 700; margin-bottom: 8px; color: var(--brand); }
.rf-row { display: flex; gap: 8px; margin-bottom: 8px; }
.review-form input, .review-form select, .review-form textarea { padding: 8px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13px; box-sizing: border-box; width: 100%; }
.review-form textarea { resize: vertical; margin-bottom: 8px; }
.rf-btn { width: 100%; background: #334155; color: #fff; border: none; padding: 8px; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; }
.rf-btn:hover { background: #1e293b; }

/* 主題切換 */
.theme-switcher { position: absolute; top: 18px; right: 12px; display: flex; align-items: center; z-index: 10; }
.theme-label { font-size: 12px; margin-right: 4px; color: var(--ink); -webkit-user-select: none; user-select: none; }
.theme-select { font-size: 12px; padding: 2px 4px; border-radius: 6px; border: 1px solid #d1d5db; background: var(--panel); color: var(--ink); cursor: pointer; }
.theme-select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }

/* 頂部固定搜尋列 */
.sticky-header { position: -webkit-sticky; position: sticky; top: 0; z-index: 100; background: rgba(248, 250, 252, 0.95); backdrop-filter: blur(8px); padding: 10px 0; margin: 0 -12px; padding-left: 12px; padding-right: 12px; border-bottom: 1px solid #e2e8f0; transition: all 0.3s ease; }
.search-row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
#search-input { flex: 1; padding: 12px 16px; font-size: 16px; border: 2px solid #cbd5e1; border-radius: 10px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); transition: border-color 0.2s, box-shadow 0.2s; }
#search-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.filter-toggle-btn { padding: 12px 16px; font-size: 16px; background: #f1f5f9; color: #475569; border: 2px solid #cbd5e1; border-radius: 10px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.filter-toggle-btn:hover { background: #e2e8f0; }

/* --- 跑馬燈公告列 (新版) --- */
#system-notice-bar {
  background: #fffbeb;
  color: #92400e;
  border-bottom: 1px solid #fcd34d;
  height: 40px; 
  display: flex;
  align-items: center;
  overflow: hidden; 
  white-space: nowrap;
  position: relative;
  font-size: 14px;
}

#system-notice-bar.notice-hidden {
  display: none;
}

.notice-icon {
  position: absolute;
  left: 0;
  z-index: 2;
  background: #fffbeb; 
  padding: 0 10px;
  height: 100%;
  display: flex;
  align-items: center;
  font-weight: bold;
  box-shadow: 2px 0 5px rgba(0,0,0,0.05);
}

#notice-content {
  display: inline-block;
  padding-left: 100%; 
  animation: marquee 15s linear infinite; 
  font-weight: 600;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.fav-btn { background: transparent; border: none; font-size: 20px; cursor: pointer; color: #cbd5e1; transition: transform 0.2s, color 0.2s; padding: 0; line-height: 1; display: flex; align-items: center; margin-left: auto; position: relative; overflow: hidden; }
.fav-btn:hover { transform: scale(1.2); }
.fav-btn.active { color: #db2777; text-shadow: 0 2px 8px rgba(219, 39, 119, 0.3); }

.highlight { background-color: #fef08a; color: #854d0e; border-radius: 2px; padding: 0 2px; }
.highlight-pulse { animation: highlight-pulse 2s ease-out; }
@keyframes highlight-pulse { 0% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(20, 184, 166, 0); } 100% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0); } }

/* 空狀態 */
#empty-state, .empty-state-large { display: none; padding: 40px 20px; border: 2px dashed #cbd5e1; border-radius: 16px; background: #fff; color: #64748b; text-align: center; }
.empty-icon { font-size: 40px; display: block; margin-bottom: 10px; opacity: 0.8; }
.empty-msg { font-size: 16px; font-weight: 700; color: #334155; margin-bottom: 6px; }
.empty-sub { font-size: 14px; color: #94a3b8; }

.skeleton-card { min-height: 160px; pointer-events: none; display: block; }
.skeleton-line { height: 16px; background: #e2e8f0; border-radius: 4px; margin-bottom: 10px; width: 100%; animation: shimmer 1.5s infinite linear; background-image: linear-gradient(to right, #e2e8f0 0%, #f1f5f9 20%, #e2e8f0 40%, #e2e8f0 100%); background-size: 1000px 100%; }
.skeleton-line.short { width: 40%; }
.skeleton-line.title { height: 24px; width: 70%; margin-top: 10px; margin-bottom: 15px; }
@keyframes shimmer { 0% { background-position: -1000px 0; } 100% { background-position: 1000px 0; } }

.site-footer { background: #1e293b; color: #94a3b8; padding: 40px 20px; margin-top: auto; }
.footer-content { max-width: 800px; margin: 0 auto; text-align: center; }
.footer-logo { font-size: 18px; font-weight: 700; color: #f8fafc; margin-bottom: 8px; letter-spacing: 0.5px; }
.footer-links { margin: 20px 0; }
.footer-links a { color: #cbd5e1; text-decoration: none; margin: 0 8px; font-size: 14px; transition: color 0.2s; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.copyright { font-size: 12px; color: #64748b; margin-top: 20px; }

/* 彈窗與浮動元件 */
.modal-hidden { display: none; }
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 2000; backdrop-filter: blur(2px); }
.modal-content { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #fff; width: 90%; max-width: 400px; padding: 24px; border-radius: 16px; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); z-index: 2001; animation: slideUp 0.3s ease-out; }
@keyframes slideUp { from { transform: translate(-50%, -40%); opacity: 0; } to { transform: translate(-50%, -50%); opacity: 1; } }
.close-btn { position: absolute; top: 12px; right: 12px; background: none; border: none; font-size: 24px; color: #94a3b8; cursor: pointer; }
.close-btn:hover { color: #334155; }
.step-block { margin-bottom: 16px; background: #f8fafc; padding: 12px; border-radius: 8px; border: 1px solid #e2e8f0; }
.step-block h3 { margin: 0 0 8px; font-size: 15px; color: #334155; display: flex; align-items: center; gap: 6px; }
.step-block ol { margin: 0; padding-left: 20px; font-size: 13px; color: #475569; }
.step-block li { margin-bottom: 4px; }
.ripple { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.5); transform: scale(0); animation: ripple 0.6s linear; pointer-events: none; }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }
.toast { background: rgba(15, 23, 42, 0.9); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); animation: fadeInOut 3s forwards; display: flex; align-items: center; gap: 8px; max-width: 80%; margin: 0 auto; backdrop-filter: blur(4px); }
@keyframes fadeInOut { 0% { opacity: 0; transform: translateY(20px); } 10% { opacity: 1; transform: translateY(0); } 90% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-10px); } }

.filter-panel { margin-top: 12px; background: var(--panel); border-radius: 16px; border: 1px solid #e2e8f0; padding: 12px; box-shadow: var(--shadow); overflow: hidden; max-height: 999px; transition: max-height .25s ease, opacity .2s ease, transform .2s ease, padding .2s ease, margin .2s ease, border .2s ease; }
.filter-panel.collapsed { max-height: 0; opacity: 0; transform: translateY(-4px); padding-top: 0; padding-bottom: 0; margin-top: 0; border-width: 0; box-shadow: none; pointer-events: none; }

/* ★ 重要修正：底部導航完全重寫 */
.bottom-nav { 
    position: fixed; 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    height: 60px; /* 固定高度 */
    background: rgba(255, 255, 255, 0.98); 
    backdrop-filter: blur(10px); 
    border-top: 1px solid #e2e8f0; 
    display: flex; 
    justify-content: space-around; 
    align-items: center; 
    padding-bottom: env(safe-area-inset-bottom); /* 適配 iPhone 瀏海屏底部 */
    z-index: 10000; 
    box-shadow: 0 -4px 12px rgba(0,0,0,0.03); 
}

.bottom-nav-btn { 
    background: none; 
    border: none; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; /* 垂直置中 */
    gap: 2px; /* 圖示與文字間距 */
    color: #94a3b8; 
    font-size: 11px; 
    font-weight: 500; 
    cursor: pointer; 
    flex: 1; /* 均分寬度 */
    height: 100%;
    padding: 0;
    transition: all 0.2s; 
}

.bottom-nav-btn .nav-icon { 
    font-size: 24px; /* 放大圖示 */
    filter: grayscale(1); 
    transition: all 0.2s; 
    margin-bottom: 0;
}

.bottom-nav-btn.active { color: var(--brand); }
.bottom-nav-btn.active .nav-icon { filter: grayscale(0); transform: scale(1.1); }
.bottom-nav-btn:active { transform: scale(0.95); }

/* ★ 重要修正：幫我不踩雷浮動按鈕上移 */
.fab-random { 
    position: fixed; 
    bottom: 100px; /* 加大數值，確保在導航列上方 */
    right: 16px; 
    background: var(--brand); 
    color: white; 
    border: none; 
    border-radius: 999px; 
    padding: 10px 16px; 
    font-size: 14px; 
    font-weight: 600; 
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.4); 
    z-index: 9998; /* 層級低於導航列但高於內容 */
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    transition: transform 0.2s; 
    animation: float 3s ease-in-out infinite; 
}
.fab-random:hover { transform: translateY(-2px); }
.fab-random:active { transform: scale(0.95); }
@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-5px); } 100% { transform: translateY(0px); } }

/* 推薦視窗 */
.site-promo-float { position: fixed; z-index: 99999; left: 16px; bottom: 150px; width: min(360px, 32vw); max-width: 60vw; background: var(--panel); border-radius: 18px; border: 1px solid rgba(15, 23, 42, 0.08); box-shadow: var(--shadow); padding: 12px 8px 8px; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.site-promo-link { display: block; width: 100%; }
.site-promo-img { display: block; width: 100%; height: auto; border-radius: 14px; }
.site-promo-close { position: absolute; top: -8px; right: -8px; border: none; border-radius: 999px; width: 24px; height: 24px; font-size: 16px; line-height: 24px; cursor: pointer; background: rgba(15, 23, 42, 0.85); color: #f9fafb; box-shadow: 0 4px 10px rgba(15, 23, 42, 0.35); display: flex; align-items: center; justify-content: center; z-index: 10; }
@media (max-width: 800px) { .site-promo-float { left: 12px; bottom: 140px; right: auto; transform: none; width: min(240px, 70vw); } }

/* Dark Mode 調整 */
html[data-theme="dark"] { --brand-50: #134e4a; --ink: #e2e8f0; --muted: #94a3b8; --panel: #0f172a; --panel-card: #1e293b; --ring: #0f766e; --shadow: 0 10px 30px rgba(0, 0, 0, .25); --link-bg: #1e3a8a; --link-border: #1e40af; --link-color: #93c5fd; }
html[data-theme="dark"] body, html[data-theme="dark"] { background: var(--panel); color: var(--ink); }
html[data-theme="dark"] .card, html[data-theme="dark"] .form-section { background: var(--panel-card); border-color: #334155; }
html[data-theme="dark"] .card.is-today { background: #451a03; border-color: #b45309; }
html[data-theme="dark"] .card.is-today::before { background: #b45309; color: #fffbeb; }
/* Dark Mode: 今日公休 */
html[data-theme="dark"] .card.is-closed { background: #1e293b; filter: grayscale(0.8); border-color: #475569; opacity: 0.6; }
html[data-theme="dark"] .card.is-closed:hover { opacity: 1; filter: grayscale(0); }

/* Dark Mode: 評論區 */
html[data-theme="dark"] .review-panel { background: #1e293b; border-color: #334155; }
html[data-theme="dark"] .review-item { border-color: #334155; }
html[data-theme="dark"] .review-summary { border-color: #334155; color: #e2e8f0; }
html[data-theme="dark"] .r-name { color: #e2e8f0; }
html[data-theme="dark"] .r-content { color: #94a3b8; }
html[data-theme="dark"] .review-form { border-color: #475569; }
html[data-theme="dark"] .review-form input, html[data-theme="dark"] .review-form select, html[data-theme="dark"] .review-form textarea { background: #0f172a; color: #e2e8f0; border-color: #334155; }
html[data-theme="dark"] .rf-btn { background: #475569; }
html[data-theme="dark"] .rf-btn:hover { background: #64748b; }

html[data-theme="dark"] .promo-card { border-color: #334155; }
html[data-theme="dark"] .pill { background: #164e63; color: #67e8f9; border-color: #083344; }
html[data-theme="dark"] .tag { background: #064e3b; color: #a7f3d0; border-color: #052e16; }
html[data-theme="dark"] .tabs label { color: #67e8f9; border-color: var(--ring); background: var(--brand-50); }
html[data-theme="dark"] .tabs-input:checked+label { background: var(--brand); color: #fff; border-color: var(--brand); }
html[data-theme="dark"] [style*="background:rgba(255,255,255,.90)"] { background: rgba(30, 41, 59, .9) !important; border-color: var(--ring) !important; }
html[data-theme="dark"] .form-group input { background: #334155; color: var(--ink); border-color: #475569; }
html[data-theme="dark"] .theme-label { color: var(--ink); }
html[data-theme="dark"] .theme-select { background: var(--panel-card); color: var(--ink); border-color: #334155; }
html[data-theme="dark"] .meta-region { color: #e2e8f0; } 
html[data-theme="dark"] .meta-time { color: #94a3b8; }
html[data-theme="dark"] .sticky-header { background: rgba(15, 23, 42, 0.95); border-color: #334155; }

/* Dark Mode: 跑馬燈公告列 */
html[data-theme="dark"] #system-notice-bar { background: #451a03; color: #fcd34d; border-color: #78350f; }
html[data-theme="dark"] .notice-icon { background: #451a03; }

html[data-theme="dark"] .highlight { background-color: #854d0e; color: #fef08a; }
html[data-theme="dark"] .skeleton-line { background: #334155; background-image: linear-gradient(to right, #334155 0%, #475569 20%, #334155 40%, #334155 100%); }
html[data-theme="dark"] .date-box { background: #334155; border-color: #475569; }
html[data-theme="dark"] .date-day { color: #f1f5f9; }
html[data-theme="dark"] .action-btn { background: #334155; color: #cbd5e1; border-color: #475569; }
html[data-theme="dark"] .action-btn:hover { background: #475569; color: #fff; }
html[data-theme="dark"] .modal-content { background: #1e293b; color: #f1f5f9; }
html[data-theme="dark"] .step-block { background: #0f172a; border-color: #334155; }
html[data-theme="dark"] .step-block h3 { color: #e2e8f0; }
html[data-theme="dark"] .step-block ol { color: #94a3b8; }
html[data-theme="dark"] .btn-line { background: #06c755; border-color: #06c755; color: #fff; }
html[data-theme="dark"] .btn-line:hover { background: #05b34c; }
html[data-theme="dark"] .meta-region::after { background: #cbd5e1; color: #0f172a; }
html[data-theme="dark"] .filter-toggle-btn { background: #134e4a; color: #a7f3d0; border-color: #0f766e; }
html[data-theme="dark"] .filter-toggle-btn:hover { background: #0f766e; color: #fff; }
html[data-theme="dark"] .toast { background: rgba(255,255,255,0.9); color: #0f172a; }
html[data-theme="dark"] .req-badge.reg { background: #1e3a8a; color: #93c5fd; border-color: #1d4ed8; }
html[data-theme="dark"] .req-badge.fee { background: #431407; color: #fdba74; border-color: #9a3412; }
html[data-theme="dark"] #empty-state { background: #1e293b; border-color: #334155; }
html[data-theme="dark"] .empty-msg { color: #f1f5f9; }
html[data-theme="dark"] .bottom-nav { background: rgba(15, 23, 42, 0.96); border-top-color: #334155; }
html[data-theme="dark"] .rating-box { background: #451a03 !important; border-color: #b45309 !important; color: #fcd34d; }
html[data-theme="dark"] .badge-price { background:#374151; color:#d1d5db; border-color:#4b5563; }
html[data-theme="dark"] .site-promo-float { background: var(--panel); border-color: #334155; }
html[data-theme="dark"] .site-promo-close { background: #e2e8f0; color: #0f172a; }


/* === 首頁「這週／這週末」精選區塊 UI 強化 === */
.highlight-section {
  margin: 10px 0 14px;
  padding: 10px 10px 12px;
  border-radius: 16px;
  background: #f0f9ff;
  border: 1px solid var(--link-border);
}

.highlight-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.highlight-title-main {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.highlight-sub {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.highlight-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding-top: 6px;
}

.highlight-list::-webkit-scrollbar {
  height: 5px;
}

.highlight-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #cbd5f5;
}

.highlight-pill {
  min-width: 180px;
  max-width: 260px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #ffffff;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
  text-align: left;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.highlight-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.hp-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.hp-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.hp-date,
.hp-region {
  white-space: nowrap;
}

.hp-tag {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid #e0f2fe;
  background: #eff6ff;
}

.hp-badge-today {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
  background: #f97316;
  color: #ffffff;
}

/* 卡片被點選精選後的跳動高亮效果 */
#events-grid .card.card-highlight-pulse {
  animation: cardHighlightPulse 1.4s ease-out;
  box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.35);
}

@keyframes cardHighlightPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.35);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(20, 184, 166, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(20, 184, 166, 0);
  }
}

@media (max-width: 640px) {
  .highlight-section {
    padding: 8px 8px 10px;
  }
  .highlight-sub {
    display: none; /* 手機上減少一行字，保留重點標題即可 */
  }
  .highlight-pill {
    min-width: 160px;
    max-width: 220px;
  }
}
