
/* 瀏覽器導覽列背景指定色 */
html, body {
  margin: 0;
  padding: 0;
  background-color: #6db76d;
  transition: background-color 0.4s ease;
}

section {
  min-height: 100dvh;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

/* 通用css清除預設樣式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

button {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: 'Noto Sans TC', Arial, sans-serif;
  line-height: 1.5;
  background-color: #fff;
  color: #333;
}

/* iOS Safari overscroll/底部露出色：讓 html 背景為深綠，頁面本體仍維持白底 */
html { background-color: #6db76d; }

li {
  list-style: none;
}

a {
  text-decoration: none;
}

.clearfix:before,.clearfix:after {
  content: "";
  display: table;
}

.clearfix:after {
  clear: both;
}

@font-face {
  font-family: 'craftmincho';
  src: url('./fonts/craftmincho.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Regular (400) */
@font-face {
  font-family: 'NaikaiFont';
  src: local('NaikaiFont Regular'), local('NaikaiFont-Regular'),
       url('./fonts/NaikaiFont-Regular.woff2') format('woff2'),
       url('./fonts/NaikaiFont-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* SemiBold (600) */
@font-face {
  font-family: 'NaikaiFont';
  src: local('NaikaiFont SemiBold'), local('NaikaiFont-SemiBold'),
       url('./fonts/NaikaiFont-SemiBold.woff2') format('woff2'),
       url('./fonts/NaikaiFont-SemiBold.woff') format('woff');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}


/* sidebar 預設 */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 200px;
  height: 100vh;   /* fallback */
  height: 100svh;  /* iOS small viewport (excludes UI) */
  height: 100dvh;  /* dynamic viewport */
  padding: 100px 30px;
  box-sizing: border-box;
  overflow-y: auto;
  z-index: 9999; /* 顯示在所有內容之上 */
  pointer-events: none; /* 不接收滑鼠事件 */
}

.sidebar-logo {
  margin-bottom: 20px;
}

.sidebar img {
  max-width: 120px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar li {
  margin: 15px 0;
}

.sidebar a {
  pointer-events: auto;
  text-decoration: none;
  color: #333;
  font-size: 1rem;
  /* 桌機導覽淡入淡出顏色 */
  transition: color 240ms ease, text-shadow 240ms ease;
}

/* 目前區塊對應的導覽：加粗並維持高亮色 */
.sidebar a.active {
  font-weight: 700;
}

.sidebar a:hover {
  color: #6db76d;
}

.sidebar.scrolled {
  background: rgba(255, 255, 255, 0);
  backdrop-filter: none;
}

/* 桌機：依背景區塊切換導覽顏色（加強對比） */
@media (min-width: 769px) {
  .sidebar.on-dark a {
    color: #ffffff;
  }
  .sidebar.on-dark a:hover {
    color: #fffac8;
  }
  .sidebar.on-dark a.active {
    color: #fffac8;
  }
}

/* 亮色背景時，active 使用品牌綠 */
.sidebar.on-light a.active {
  color: #6db76d;
}

/* top header (mobile only) */
.top-header {
  display: none; /* 預設不顯示 */
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: #c1e486;
  height: 60px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1100;
  transition: all 0.3s ease;
  box-sizing: border-box;
  /* iOS Safari 固定定位修正 */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.top-header .logo img {
  max-height: 40px;
}

/* Ensure logo image is vertically centered inside the header (mobile) */
.top-header .logo {
  display: flex;
  align-items: center;
  height: 100%;
}
.top-header .logo img {
  display: block;
  margin: 0;
}

.hamburger {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.hamburger .menu-icon {
  width: auto;
  height: 40px;
  transition: transform 0.6s ease;
}

.hamburger .menu-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 8px;
  color: #333;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.hamburger .menu-text::after {
  content: "close";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
}

/* Active state - when menu is open */
.hamburger.active .menu-icon {
  transform: rotate(360deg);
}

.hamburger.active .menu-text {
  color: transparent;
}

.hamburger.active .menu-text::after {
  opacity: 1;
  color: #333;
}

/* Old mobile-nav styles removed - using mobile-menu instead */

.top-header.scrolled {
  background: rgba(255, 255, 255, 0); /* 捲動後變透明 */
  position: fixed;                       /* ← 重申固定定位 */
  top: 0;                               /* ← 重申頂部對齊 */
  left: 0;                              /* ← 重申左邊對齊 */
  right: 0;                             /* ← 重申右邊對齊 */
  width: 100%;                          /* ← 重申滿寬 */
  z-index: 1100;                        /* ← 重申層級 */
  /* iOS Safari 固定定位修正 */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* RWD 調整 */
@media (max-width: 768px) {
  .sidebar {
    display: none; /* 手機關閉 sidebar */
  }

  .top-header {
    display: flex; /* 顯示手機 header */
  }
}

/* 導航列 - 浮空設計 */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: none;
  transition: all 0.3s ease;
}

/* 桌面版導航 */
.desktop-nav {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
  height: 80px;
  max-width: 1200px;
  margin: 0 auto;
}

/* 移動端導航 */
.mobile-nav {
  display: none;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
  max-width: 1200px;
  margin: 0 auto;
}

.mobile-logo img {
  height: 50px;
  width: auto;
}

/* 漢堡選單按鈕 */
.hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.hamburger-btn span {
  width: 100%;
  height: 3px;
  background: #333;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.hamburger-btn.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* 移動端選單 */
.mobile-menu {
  position: fixed;
  top: -30px;
  left: 0;
  width: 100%;
  background: rgb(193, 228, 134, 0.95);
  backdrop-filter: blur(10px);
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  z-index: 1050;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border-radius: 0 0 15px 15px;
  /* iOS Safari 固定定位修正 */
  -webkit-transform: translateY(-100%) translateZ(0);
  transform: translateY(-100%) translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.mobile-menu.active {
  -webkit-transform: translateY(0) translateZ(0);
  transform: translateY(0) translateZ(0);
}

.mobile-nav-links {
  list-style: none;
  padding: 7rem 0 2rem 0;
  margin: 0;
}

.mobile-nav-links li {
  margin: 0;
}

.mobile-nav-links a {
  display: block;
  padding: 1rem 2rem;
  color: #333;
  text-decoration: none;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 500;
/*   border-bottom: 1px solid rgba(0, 0, 0, 0.05); */
  transition: all 0.3s ease;
}

/* 手機選單當前區塊高亮 */
.mobile-nav-links a.active {
  color: #6db76d;
  font-weight: 700;
}

/* 使用 active 類別而非 hover，避免手機觸控後狀態黏住 */
.mobile-nav-links a:active {
  background: rgba(0, 123, 255, 0.1);
  color: #6db76d;
}

/* 桌機版才使用 hover 效果 */
@media (min-width: 769px) {
  .mobile-nav-links a:hover {
    background: rgba(0, 123, 255, 0.1);
    color: #6db76d;
    padding-left: 2.5rem;
  }
}

.nav_text a {
  color: #333;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav_text a:hover {
  color: #6db76d;
}


/* 預設 desktop 顯示，mobile 隱藏 */
.main-img.mobile,
.window3-img.mobile,
.window4-img.mobile {
  display: none;
}
  
/* 賞鳥互動區 */

#birdWatching {
  height: 100dvh;
  position: relative;
  background-color: #6db76d;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden; /* 防止子元素位移造成水平白邊/捲動 */

  background-image: url('#');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* 鳥類統計顯示 */
.bird-counter {
  position: absolute;
  bottom: 30px;
  left: 30px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 12px 20px;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 100;
  font-family: 'craftmincho', 'Noto Sans TC', sans-serif;
  transition: all 0.3s ease;
}

.bird-counter:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.counter-icon {
  font-size: 24px;
  line-height: 1;
  animation: birdBounce 2s ease-in-out infinite;
}

@keyframes birdBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.counter-text {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
}

#birdCount {
  color: #6db76d;
  font-size: 20px;
  font-weight: bold;
  transition: color 0.3s ease;
}

/* 當數字變化時的動畫效果 */
#birdCount.updated {
  animation: countUpdate 0.5s ease;
}

@keyframes countUpdate {
  0% {
    transform: scale(1);
    color: #6db76d;
  }
  50% {
    transform: scale(1.3);
    color: #ff6b6b;
  }
  100% {
    transform: scale(1);
    color: #6db76d;
  }
}

.main_window {
  width: 80vw;
  height: 90vh;  /* fallback */
  height: 90svh; /* iOS small viewport */
  height: 90dvh; /* dynamic viewport */
  display: flex;
  justify-content: right;
  align-items: center;
  position: relative;
  box-sizing: border-box;
}

.main_window img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* window2 圖片定位 */
.window2 img {
  position: absolute;
  top: calc(50% - 8vw);    /* 向上偏移 main_window 寬度的約 1/3 */
  left: calc(50% + 30vw);  /* 向右偏移 main_window 寬度的約 3/8 */
  width: 30vw;             /* 寬度隨瀏覽器縮放 */
  max-width: 350px;        /* 最大寬度限制，可依需求調整 */
  transform: translate(-50%, -50%);
  display: none;
}

/* windows-row 容器（定位與大小） */
.windows-row {
  position: absolute;
  top: calc(50% + 8vw);
  left: calc(50% - 30vw);
  display: flex;
  gap: 1vw;
  transform: translate(-50%, -50%);
  flex-direction: column;
  width: 30vw;         /* 讓子元素寬度響應瀏覽器 */
  max-width: 350px;    /* 可依需求調整 */
}

/* window3 / window4 圖片 */
.window3 img, .window4 img {
  width: 30vw;        /* 填滿父容器 */
  max-width: 350px;    /* 不超出父容器 */
  height: auto;
  display: block;
}

/* main title（置中相關） */
.main_title{
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;           /* 跟隨 window3 寬度 */
  max-width: 350px;       /* 不超出 window3 */
  transform: translate(-50%, -50%);
  font-family: 'craftmincho', sans-serif; /* 套用字體名稱 */
  font-size: clamp(20px, 4vw, 50px);  /* 設定「最小值、理想值、最大值」 */
  text-align: center;
}

/* window4 基本與背景 */
.window4 {
  width: 100%;
  height: auto;
  position: relative; /* 明確標示，與上方 .window3/.window4 保持一致 */
}
.window4-bg {
  width: 100%;
  height: auto;
  display: block;
}

/* parallax helpers / 兩個窗格共同屬性 */
.window3,
.window4 {
  position: relative;    /* 讓內部絕對定位以此為參考 */
  flex: 1 1 46%;         /* 兩欄，各佔約一半 */
  min-width: 280px;      /* 小於此會換行 */
  margin-bottom: 20px;   /* 保留垂直間距，避免位移時互撞 */
  z-index: 1;
}

/* 預設可用的微調（視覺上較柔和） */
.window3[data-speed],
.window4[data-speed] {
  transition: transform 0.08s linear;
}

/* hotspot/mask 相對定位參考 */
.window4 .treepie-mask,
.window4 .bird-hotspot {
  position: absolute;
}

/* mask / image 行為 */
.window4 img.treepie-mask,
.window4 .treepie-mask {
  pointer-events: none;
  user-select: none;
}

/* parallax 內層（只變換這一層，避免干擾外層尺寸與排版） */
.parallax-inner {
  will-change: transform;
  transform-origin: center;
  position: relative;
}

/* 平板/手機只顯示三個區塊，切換圖片 */
@media (max-width: 768px) {
  /* 手機版統計區域調整 */
  .bird-counter {
    bottom: 20px;
    left: 20px;
    padding: 10px 16px;
    font-size: 14px;
  }
  
  .counter-icon {
    font-size: 20px;
  }
  
  .counter-text {
    font-size: 14px;
  }
  
  #birdCount {
    font-size: 18px;
  }
  
  /* 手機版 main-window 調整 */
  .main_window {
    padding: 0;
    width: 90vw; /* 稍微加大 */
    position: relative; /* 讓內部絕對定位以此為參考 */
    z-index: 1; /* main-window 層次最低，感應區 canvas 也在此層 */
  }

  /* 讓 windows-row 疊在 main_window 上方，覆蓋整個主視窗範圍 */
  .windows-row {
    position: absolute;
    inset: 0;          /* top:0; right:0; bottom:0; left:0; */
    width: 100%;
    height: 100%;
    pointer-events: none;  /* 容器不攔截事件，由子項目接收 */
    z-index: 150;      /* 高於 main-window 的感應區 canvas */
    display: block;    /* 確保存在 */
  }

  .window3,
  .window4 {
    position: absolute;   /* 以 .windows-row（=main_window）為定位基準 */
    pointer-events: auto; /* 子元素可互動 */
    z-index: 200;         /* 顯示在主感應區之上，但低於導覽列 */
    flex: none;
    margin-bottom: 0;
  }
  /* window3：貼左上角（接近 main-window 左上） */
  .window3 { 
    top: 220px; 
    left: 150px; 
    width: 30vw;
    min-width: 200px;
  }
  /* window4：貼齊瀏覽器右側（仍以 .windows-row 為定位，但用 viewport 差值對齊） */
  .window4 { 
    /* 將容器與視窗寬度的差值一分為二，往外推，讓右邊緣貼齊視窗右側 */
    right: calc((100vw - 100%) / -2 + var(--w4-right, -210px));
    bottom: -65%; 
    width: 30vw;
    min-width: 210px;
  }

  /* 只顯示 mobile 圖片，隱藏 desktop 圖片 */
  .main-img.desktop,
  .window2-img.desktop,
  .window3-img.desktop,
  .window4-img.desktop,
  h1.main_title {
    display: none;
  }
  .main-img.mobile,
  .window2-img.mobile,
  .window3-img.mobile,
  .window4-img.mobile {
    display: block;
    width: 100%;
    height: auto;
  }
  
  /* 調整手機版 z-index 層次 */
  .sidebar,
  .top-header {
    z-index: 9999 !important; /* navigation 最高，使用 !important 確保優先級 */
  }
}


/* bird watching callout */
.bird-callout{
  position: absolute;
  top: 10%;
  left: 55%;
  transform: translateX(-50%);
  max-width: 360px;
  background: rgba(255,255,255,0.95);
  color: #1a1a1a;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  z-index: 10020;
  text-align: center;
  font-size: 14px;
  line-height: 1.2;
}
.bird-callout strong{ display:block; font-size:16px; margin-bottom:6px; }
.bird-callout p{ margin:0; opacity:0.9; }
.bird-callout::after{
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -8px;
  border-width: 8px 8px 0 8px;
  border-style: solid;
  border-color: rgba(255,255,255,0.95) transparent transparent transparent;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.06));
}
.bird-callout-close{
  position: absolute;
  top:6px;
  right:8px;
  background:transparent;
  border:0;
  font-size:14px;
  cursor:pointer;
  color:#666;
  padding:2px;
}

.bird-callout::after{
  bottom: -8px;               /* 箭頭尖端距元素底部 */
  border-width: 8px 8px 0 8px;
}

/* 行動版：讓 bird-callout 被 top-header 與 mobile-menu 蓋住 */
@media (max-width: 768px) {
  .bird-callout { z-index: 900 !important; }
}

/* 行動版：可控位置（右上為預設，可用 CSS 變數與修飾類切換） */
@media (max-width: 768px) {
  /* 預設：右上，位於導覽列下方一點 */
  .bird-callout {
    top: var(--callout-top, calc(env(safe-area-inset-top, 0px) + 120px));
    right: var(--callout-right, 12px);
    left: auto;
    transform: none; /* 取消 desktop 的 translateX(-50%) */
    max-width: var(--callout-max-width, min(86vw, 200px));
  }

  /* 置左 */
  .bird-callout.is-left { left: var(--callout-left, 12px); right: auto; }

  /* 置中（水平） */
  .bird-callout.is-center { left: 50%; right: auto; transform: translateX(-50%); }

  /* 貼底（可搭配 is-left / is-center / 預設右） */
  .bird-callout.is-bottom { top: auto; bottom: var(--callout-bottom, calc(env(safe-area-inset-bottom, 0px) + 16px)); }

  /* 貼底時，箭頭方向改為向下（由元素頂部長出） */
  .bird-callout.is-bottom::after {
    top: -8px;
    bottom: auto;
    border-width: 0 8px 8px 8px;
    border-color: transparent transparent rgba(255,255,255,0.95) transparent;
  }
}

/* subtle sway animation for small windows */
@keyframes smallSway {
  0%   { transform: translateY(0) rotate(0deg); }
  4%   { transform: translateY(-3px) rotate(-0.6deg); }  /* 1 */
  8%   { transform: translateY(0)  rotate(0deg); }
  12%  { transform: translateY(-3px) rotate(-0.6deg); }  /* 2 */
  16%  { transform: translateY(0)  rotate(0deg); }
  20%  { transform: translateY(-3px) rotate(-0.6deg); }  /* 3 */
  24%  { transform: translateY(0)  rotate(0deg); }       /* end of shakes */
  100% { transform: translateY(0)  rotate(0deg); }       /* pause until cycle restarts */
}

/* apply to elements you want to sway (add class "sway") */
.sway {
  transform-origin: 50% calc(100% + 8px);
  transform-box: border-box;   
  will-change: transform;
  animation: smallSway 2.6s ease-in-out infinite;
  pointer-events: auto;
}

/* small responsive tweak */
@media (max-width:768px){
    .sway {
    animation-duration: 3.2s;
  }
}

@media (max-width: 480px) {
    #birdWatching {
    min-height: 105dvh;
  }
}


/* 提示框 */
.bird-hint-container{
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  z-index: 99999;
}

.bird-hint {
  background: #fffffff2;
  color: #222;
  padding: 8px 12px;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  font-size: 14px;
  opacity: 0;
  transform: translateY(6px);  
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
}

/* 顯示樣式 */
.bird-hint.show {
  opacity: 1;
  transform: translateY(0);
  animation: hintPop 0.2s ease-out;
}

@keyframes hintPop {
  from { opacity: 0; transform: translateY(10px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 感應圖：完全重疊、不顯示、不推版 */
.treepie-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  z-index: 50;        /* 🔹比 window4-img 高 */
  opacity: 0;         /* 🔹透明 */
  pointer-events: auto; /* 🔹仍可點擊 */
  cursor: pointer;    /* 🔹方便除錯用，正式可拿掉 */
}

/* 鳥鳥圖鑑區 */

/* 🕊️ 桌機版（≥769px） */
#birdguide {
  height: calc(var(--vh, 1vh) * 100);
  width: 100%;
  min-height: 100dvh;
  position: relative;
  overflow: visible; /* 改為 visible 讓內部可以滾動 */
  background-color: #f4d874;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  padding: 50px;
  /* max-height: 500px; */ /* 移除高度限制 */
}

.birdguide-header {
  text-align: center;
  color: rgb(0, 0, 0, 0.8);
  margin-bottom: 2vh;
}
.h2-title {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-family: 'NaikaiFont', sans-serif; /* 套用字體名稱 */
  font-weight: 600;
  line-height: 2em;
}
.birdguide-subtitle {
  font-size: clamp(1rem, 2vw, 1rem);
  opacity: 0.85;
}


/* 🧩 卡牌群容器 */
.birdcard-library {
  width: 90%;
  height: auto;
  display: flex;
  grid-template-columns: repeat(12, 1fr);
  grid-column-gap: 30px;
  margin: 0 auto;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible; /* 確保不會阻擋滾動 */
}

.arrow {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  cursor: pointer;
}
.arrow.left {
  grid-column: 1 / 2;
  position: relative;
  z-index: 1101;
}
.arrow.right {
  grid-column: 12 / 13;
  position: relative;
  z-index: 1101;
}

/* 桌機：箭頭 hover 微放大（比照 primary-btn） */
@media (min-width: 769px) {
  .arrow img {
    transition: transform 0.3s ease;
  }
  .arrow:hover img {
    transform: scale(1.1);
  }
}

.birdcard-container {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding:  0;
  justify-content: flex-start;
  overflow-y: hidden;
  -ms-overflow-style: none; /* IE/Edge */
  scrollbar-width: none;    /* Firefox */
  cursor: grab; /* 添加抓取游標提示可以拖曳 */
}

.birdcard-container:active {
  cursor: grabbing; /* 拖曳時顯示抓取中游標 */
}

.birdcard-container::-webkit-scrollbar {
  display: none; /* Chrome/Safari/Opera */
}

/* 桌機版顯示滾動條以便用戶知道可以滾動 */
@media (min-width: 769px) {
  .birdcard-container {
    -ms-overflow-style: auto; /* IE/Edge */
    scrollbar-width: thin;    /* Firefox */
    overscroll-behavior-x: none; /* 完全禁用橫向 overscroll/橡皮筋 */
  }
  
  .birdcard-container::-webkit-scrollbar {
    display: block;
    height: 8px;
  }
  
  .birdcard-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
  }
  
  .birdcard-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
  }
  
  .birdcard-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
  }
}

.birdcard {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto; 
  box-sizing: border-box;
  width: 250px;
  background-color: #f4ecdc;
  border: #c6bca7 solid 3px;
  padding: 10px 10px;
  justify-content: center;
  border-radius: 16px;
  gap: 12px;
  position: relative; /* 讓 NEW 標籤可以定位 */
}

/* 未發現狀態：卡片背景變淺灰、邊框淡化 */
.birdcard.unfound {
  background-color: #eeeeee;
  border-color: #d2d2d2;
}

/* NEW 標籤樣式 */
.new-badge {
  position: absolute;
  top: 10px;
  right: 15px;
  background: linear-gradient(135deg, #fa8042 0%, #fa8042 100%);
  color: white;
  font-size: 12px;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 12px;
  box-shadow: 0 2px 8px #fa804266;
  z-index: 10;
  animation: newBadgePulse 2s ease-in-out infinite;
  letter-spacing: 0.5px;
}

@keyframes newBadgePulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 2px 8px #fa804266;
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 4px 12px #fa804266;
  }
}

.bird-img,
.bird-habit {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;

}

.bird-img {
  border-radius: 12px;
  border: #d6ccb7 solid 3px;
}

.bird-content {
  font-size: 14px;
  height: 4em;
}

/* 桌機版 (≥768px)：隱藏大標題與小標題 */
/* @media (min-width: 768px) {
  #birdguide .birdguide-header {
    display: none;
  }
} */

/* 📱 平板版（≤768px） */
@media (max-width: 768px) {
  #birdguide {
    min-height: calc(var(--vh, 1vh) * 100);
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: visible;
    padding: 4vh 0;
  }

  .birdguide-header {
    margin-bottom: 3vh;
  }

  .birdcard-library {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: auto;
    overflow: visible;
  }

  .birdcard-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    width: 100%;
    height: auto;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    justify-content: flex-start; /* 讓內容從左側開始排列，避免居中導致滑到尾端卡住 */
    align-items: flex-start;
    padding: 0 5vw;
    /* 讓第一張/最後一張也能以中心停靠到可視範圍 */
    scroll-padding: 0 5vw;
  }

  .birdcard {
    flex: 0 0 70%;
    height: auto;
    max-height: calc(100dvh - 16vh); /* 避免超出可視範圍 */
    border-radius: 16px;
    padding: 3vh 4vw;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    box-sizing: border-box;
    overflow-y: auto;
  }

  .bird-title {
    font-size: 1.3rem;
  }

  .bird-subtitle {
    font-size: 1.1rem;
  }

  .bird-img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  .bird-habit {
    max-height: 30vh;
    object-fit: contain;
  }

  .bird-content {
    font-size: 0.95rem;
    line-height: 1.45;
    text-align: center;
    padding: 0 1vw;
  }

  .arrow {
    display: none;
  }
}

/* 📞 手機版（≤480px） */
@media (max-width: 480px) {
  #birdguide {
    min-height: 105dvh;
    padding: 3vh 0;
  }

  .birdguide-header {
    margin-bottom: 2vh;
  }

  .birdguide-subtitle {
    padding: 0 5%;
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .birdcard-container {
    padding: 0 4vw;
    gap: 20px;
  }

  .birdcard {
    height: auto;
    max-height: calc(100dvh - 18vh);
    padding: 1vh 2vw;
    border-radius: 12px;
    gap: 6px;
  }

  .bird-title {
    font-size: 1.3rem;
  }

  .bird-subtitle {
    font-size: 1rem;
  }

  .bird-img {
    width: 100%;
  }

  .bird-habit {
    width: 100%;
  }

  .bird-content {
    font-size: 0.9rem;
    line-height: 1.2;
    text-align: left;
    overflow-y: auto;
  }

  .h2-title {
  font-size: 1.8rem;
}
}

/* 店鋪介紹區 */

#store-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;    /* 垂直方向置中所有子元素 */
  align-items: center; /* 水平居中所有子元素 */
  gap: 30px;           /* 區塊間距，可依需求調整 */
  background-color: #c1e486;
  height: calc(var(--vh, 1vh) * 100);
  padding: 50px 0; /* 文字區與卡片區距離 */
  box-sizing: border-box;

  background-image: url('./images/store-intro_bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.title-bg {
  background-image: url("./images/title-highlight-bg.png");
  background-size: contain;    /* contain -> 完整在框內顯示不裁切 */
  background-position: center;
  background-repeat: no-repeat;
  background-color: transparent;
}

.intro-text {
  width: 80vw;
  max-width: 800px; /* 避免桌機太寬 */
  margin: 0 auto;
  
}

.intro-title {
  text-align: center;
}

/* 特點圖片列點區 */
.intro-content {
  display:flex;
  width: 80vw;
  gap: 20px;
  max-width: 800px;  

  margin: 0 auto;
  justify-content: center;
}

.intro-content > div {
  flex: 1 1 200px; /* 等比縮小，最小 200px */
  min-width: 200px;
  text-align: center;
}

.intro-content img {
  width: 100%;
  max-width: 150px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.intro-content img,
.intro-content h3 {
  font-family: 'NaikaiFont', sans-serif; /* 套用字體名稱 */
  font-weight: 600;
  font-size: 1.5rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
  text-align: center; /* h3 文字置中 */
}

.element-text {
  font-size: 14px;
  text-align: left;
  margin-bottom: 20px;
}

/* 隨機秀相簿區 */
.card-background {
  width: 100%;  
  position: relative;     /* 作為 photo-card 的定位參考 */
  align-items: center;  
}

.photo-container {
  display: flex;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin-left: calc(-50vw + 50%);
}

/* 單張卡片 */
.photo-card {
  flex: 0 0 calc(100vw / 7); /* 七張平均滿版 */
/*   border-radius: 12px;
  border: #222 solid 3px; */
  overflow: hidden;
  transform: rotate(var(--angle));
}

.photo-card img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: 12px;
  border: #ffffff solid 3px;
}

/* 卡片旋轉角度 */
.photo-card:nth-child(1) { --angle: -8deg; }
.photo-card:nth-child(2) { --angle: 3deg; }
.photo-card:nth-child(3) { --angle: -4deg; }
.photo-card:nth-child(4) { --angle: 6deg; }
.photo-card:nth-child(5) { --angle: 0deg; }
.photo-card:nth-child(6) { --angle: -3deg; }
.photo-card:nth-child(7) { --angle: 2deg; }


/* 手機響應式 */
@media (max-width: 768px) {
  #store-intro {
    height: auto;
  }

  .card-background {
    width: 100vw;  
    overflow: visible !important;
    display: flex;
    justify-content: center;
  }

  .intro-text {
    width: 90%;
    font-size: 14px;
  }

  .intro-content {
    width: 90%;
    gap: 10px;
    flex-wrap: wrap;
    flex-direction: column;
    align-items: center;
  }

  .intro-content img {
    max-width: 100px; /* 自動縮小 */
  }

  .intro-content > div {
    min-width: 0;
  }

  .photo-container {
    width: 120vw; /* 超出一點，產生裁切效果 */
    justify-content: center;
    align-items: center;
    overflow: hidden;
    flex-wrap: nowrap;
  }

  .photo-card {
    flex: 0 0 30%;
    scroll-snap-align: center;
    scroll-snap-align: none;
    transform: rotate(var(--angle)); /* 回復旋轉 */
    flex-shrink: 0;
    margin-top: 10px;
    margin-bottom: 10px;
  }

  .photo-card img {
    width: 100%;
    height: auto;
  }
}

@media (max-width: 480px) {
    #store-intro {
    gap: 8px;
  }

  .card-background {
  position: relative;
  width: 100vw;          /* 滿版寬度 */
  height: auto;         /* 滿版高度 */
  overflow: hidden;
  margin-left: calc(-50vw + 50%); /* 清除容器padding造成的縫隙 */
}

  .intro-text {
    width: 95%;
    font-size: 14px;
  }

  .intro-content {
    width: 95%;
    gap: 8px;
    flex-wrap: wrap;
    flex-direction: column;
    align-items: center;
  }

  .element-text {
    margin-bottom: 0;
    padding: 0 15%;
    text-align: center;
  }

  .photo-card img {
    width: 100%;
    height: auto;
  }

}

/* ================== 🏝 島民小賣所 ================== */
#store {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2vh;
  background-color: #6db76d;
  min-height: calc(var(--vh, 1vh) * 100);
  padding: 4vh 0;
  overflow: visible;
  color: #fffac8;
}

.text-light {
  color: #fffac8;
}

/* -------------------- 商品橫列（桌機） -------------------- */
.product-overview {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 80vw;
  max-width: 1200px;
  overflow: hidden;
  margin: 0 auto;
  gap: 2vw;
}

.product-list {
  display: flex;
  flex-direction: column;
  gap: 6px;  
  flex: 0 0 calc(100% / 5 - 2vw);
  text-align: center;
  transition: transform 0.4s ease, opacity 0.4s ease;
  transform: scale(0.8);
  opacity: 0.7;
  z-index: 1;
  cursor: pointer; /* 添加指針游標 */
}

.product-list.active {
  transform: scale(1);
  opacity: 1;
  z-index: 2;
}

/* 透明占位商品（僅供排版置中用） */
.product-list.ghost {
  opacity: 0 !important;
  pointer-events: none !important;
  scroll-snap-align: none !important; /* 不作為吸附目標，避免置中 */
}
.product-list.ghost * {
  display: none !important;
}

/* 桌機版 hover 效果 */
@media (min-width: 769px) {
  .product-list:hover {
    transform: scale(1);
    opacity: 1;
    z-index: 2;
  }
}

.product-img {
  width: 100%;
  aspect-ratio: 3 / 5;
  background-color: #c0bdeb;
  border-radius: 200px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.product-title {
  font-size: 1.3rem;
  margin: 0.5rem 0;
}

.product-price {
  font-family: Arial, sans-serif;
  font-weight: 600;
  font-size: 1.5rem;

}

/* -------------------- 按鈕與兩側花朵（桌機） -------------------- */
.container.product-deco {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 80vw;
  max-width: 1200px;
  margin: 0 auto;
  gap: 2vw;
}

.container.product-deco img {
  max-width: 20vw;
  object-fit: contain;
}

.primary-btn {
  display: inline-flex;
  padding: 14px 60px;
  border: 2px solid #464646;
  border-radius: 9999px;
  background-color: transparent;
  color: #232323;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;

  justify-content: center;
  align-items: center;
  gap: 0.6rem;           /* 文字與 icon 之間間距 (可微調) */
  line-height: 1;        /* 讓 height 與 font-size 對齊 */
  white-space: nowrap;   /* 避免文字與圖示之間的匿名空白節點影響寬度 */
}

/* 文字節點包一層，避免匿名 flex item 造成間距差異 */
.primary-btn .btn-text {
  display: inline-block;
}

.btn-icon {
  display: block;
  width: auto;        /* 依父寬度縮放 */
  height: 1em;       /* icon 高度跟隨文字大小，會隨 button font-size 縮放 */
  max-width: 100%;
  align-self: center;
  object-fit: contain;
  pointer-events: none;  /* 避免 icon 攔截按鈕點擊 */
  flex: 0 0 auto;        /* 視為固定寬度項，避免被擠壓 */
  margin: 0;             /* 移除可能的瀏覽器預設邊距 */
}

.light-btn {
  color: #464646;
  background-color: #FFF79E;
  border: 2px solid #FFF79E;
}

.primary-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(0,0,0,0.05);
}

/* -------------------- 📱 平板與手機 -------------------- */
@media (max-width: 768px) {
  #store {
    padding: 5vh 0;
    overflow: visible;
  }

  /* 商品橫列 */
  .product-overview {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    display: flex;
    gap: 0px;
    padding: 0 calc((100% - 60%) / 2); /* 讓首尾卡片可以滾到中央：(100% - 卡片寬度) / 2 */
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* iOS 原生流暢滾動 */
    scrollbar-width: none; /* 隱藏滾動條 Firefox */
    -ms-overflow-style: none; /* 隱藏滾動條 IE/Edge */
  }
  
  .product-overview::-webkit-scrollbar {
    display: none; /* 隱藏滾動條 Chrome/Safari */
  }

  .product-list {
    flex: 0 0 60%;
    max-width: 60%;
    scroll-snap-align: center;
    scroll-snap-stop: normal; /* 允許快速滾動跳過多張 */
    transform: scale(0.7) translateZ(0); /* 添加 GPU 加速 */
    opacity: 0.7;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity; /* 提示瀏覽器優化 */
    backface-visibility: hidden; /* 防止閃爍 */
  }

  .product-list.active {
    transform: scale(1) translateZ(0);
    opacity: 1;
    z-index: 2;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* 按鈕與兩側花朵 */
  .container.product-deco {
    flex-wrap: wrap;             /* 允許換行 */
    justify-content: center;
    align-items: center;
    gap: 10px;
  }

  /* 按鈕置於上方，單獨一行 */
  .container.product-deco .primary-btn {
    order: 0;
    margin-bottom: 10px;
  }

  /* 左右圖片排在下一行，同行 */
  .container.product-deco img:first-child {
    order: 1;
    flex-basis: 48%;
    max-width: 48%;
  }

  .container.product-deco img:last-child {
    order: 2;
    flex-basis: 48%;
    max-width: 48%;
  }
}

/* -------------------- 手機（≤480px） -------------------- */
@media (max-width: 480px) {

    .container.product-deco .primary-btn {
    width: 80%;
  }

    .product-overview {
    padding: 0 calc((100% - 80%) / 2); /* 讓首尾卡片可置中：卡片寬 80% 時左右保留 10% */
  }

  .product-list {
    flex: 0 0 80%;
    max-width: 80%;
  }

  .product-title {
    font-size: 1.1rem;
  }

  .product-price {
    font-size: 1rem;
  }

  .primary-btn {
    width: 70%;
    height: 50px;
    font-size: 1rem;
  }

  .container.product-deco img {
    width: 45vw;
  }
}

/* -------------------- swiper 特效 -------------------- */
.mySwiper .swiper-slide {
  transition: transform 0.4s ease, opacity 0.4s ease;
  transform: scale(0.85);
  opacity: 0.8;
}

.mySwiper .swiper-slide.is-center {
  transform: scale(1);
  opacity: 1;
  z-index: 2;
}


/* 關於鳥日子 */
#about {
  display: flex;
  position: relative;
  justify-content: center;  
  align-items: center;
  flex-direction: column;
  background-color: #6db76d;
  text-align: center;
  height: 120vh;

  background-image: url('./images/about-bg.png');
  background-size: 100% auto;
  background-position: bottom;
  background-repeat: no-repeat;
}

.wave-area {
  position: relative;
  top: -26vh;
  width: 100%;
  min-height: 120px;
/*   background: #9397d2; */
  overflow: visible;
}

.wave-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4vh;
  padding: 5vh 1vw;
  background: #fcf7e8;
}

.wave {
  width: 100%;
  height: 40px;
  display: block;
}

.wave-top {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  top: -30px;
}

.wave-bottom {
  position: absolute;
  bottom: -30px;
  transform: rotate(180deg);
}

.footer {
  position: absolute;
  bottom: 26vh; /* 👈 控制與底部距離，可改成 50px */
  display: flex;
  flex-direction: column;
  justify-content: center;  
  gap: clamp(12px, 2vh, 20px);
  width: 80vw;
  max-width: 1200px;
  margin: 0 auto;
  left: 50%;
  transform: translateX(-50%);
}

.footer-intro {
  text-align: center;
  font-size: clamp(0.85rem, 1.5vw, 1.1rem);
  line-height: 1.6;
  padding: 0 2vw;
}

.footer-end {
  width: 100%;
  height: auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: clamp(15px, 3vw, 30px);
}

/* 桌機版維持橫向排列 */
.footer-end > * {
  order: 0;
}

.footer-title {
  font-size: clamp(3rem, 8vw, 6rem); /* 更靈活的響應式大小 */
  font-family: 'craftmincho', sans-serif; /* 套用字體名稱 */
  line-height: 1;
  text-align: center;
  white-space: nowrap; /* 防止標題斷行 */
}

/* 行動版允許標題換行 */
@media (max-width: 768px) {
  .footer-title {
    white-space: normal; /* 允許換行 */
    word-break: keep-all; /* 保持單字完整 */
    line-height: 1.2;
  }
}

.social-icon {
  display: flex;
  gap: clamp(12px, 2vw, 20px);
  align-items: flex-end;
  justify-content: center;
}

.social-icon a img {
  width: clamp(40px, 5vw, 54px);
  height: auto;
}

.social-icon a img {
  display: block; /* ✅ 移除預設的 inline 間隙 */
}

/* 基底圖在需要被關閉時，快速淡出 */
.social-icon a img:not(.icon-hover) {
  transition: opacity 90ms ease;
}

/* Crossfade overlay for footer icons */
.social-icon a {
  position: relative;
  display: inline-block; /* 讓絕對定位的覆蓋圖以連結尺寸為基準 */
}

.social-icon a .icon-hover {
  position: absolute;
  inset: 0;              /* top:0; right:0; bottom:0; left:0; */
  width: 100%;
  height: 100%;
  object-fit: contain;   /* 與原圖比例一致 */
  opacity: 0;            /* 預設隱藏 */
  transition: opacity 240ms ease;
  pointer-events: none;  /* 不攔截滑鼠事件 */
}

.social-icon a:hover .icon-hover,
.social-icon a:focus .icon-hover {
  opacity: 1;            /* 滑過/聚焦時淡入覆蓋圖 */
}

/* =========================
   ✅ 平板版 (max-width: 768px)
========================= */
@media (max-width: 768px) {
  .footer {
    bottom: 8vh;
    width: 90vw;
    gap: clamp(20px, 3vh, 30px);
  }

  .wave-content {
    padding: 60px 40px;
    gap: 30px;
  }

  .footer-title {
    font-size: clamp(3.5rem, 10vw, 5rem);
    line-height: 1.1;
  }

  .footer-end {
    flex-direction: column;
    align-items: center;
    gap: clamp(20px, 3vh, 30px);
    text-align: center;
  }

  .footer-intro {
    font-size: clamp(0.9rem, 2vw, 1rem);
    padding: 0 4vw;
  }

  .social-icon {
    gap: clamp(15px, 3vw, 25px);
  }

  .social-icon a img {
    width: clamp(45px, 7vw, 60px);
  }

}

/* =========================
   ✅ 手機版 (max-width: 480px)
========================= */
@media (max-width: 480px) {

  .wave-content {
    padding: 30px 20px;
    gap: 20px;
  }

  .intro-title {
    font-size: 1.4rem;
  }

  .footer {
    gap: clamp(15px, 3vh, 25px);
    bottom: 12vh;
    width: 92vw;
  }

  .footer-title {
    font-size: clamp(2.5rem, 20vw, 5rem);
    line-height: 1.1;
  }

  .footer-end {
    flex-direction: column;
    align-items: center;
    gap: clamp(15px, 3vh, 25px);
  }

  .footer-intro {
    font-size: clamp(0.85rem, 3vw, 0.95rem);
    line-height: 1.5;
    padding: 0 5vw;
  }

  .social-icon {
    gap: clamp(12px, 4vw, 20px);
  }

  .social-icon a img {
    width: clamp(40px, 10vw, 54px);
  }
}

/* contact modal */
.modal { 
  display: none; 
}

.modal[aria-hidden="false"] {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 10050;
}

.modal-overlay {
  position: fixed; 
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 10050;
}

.modal-panel {
  position: fixed;
  left: 50%; 
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(640px, 92%);
  max-height: calc(100vh - 80px);  /* fallback */
  max-height: calc(100svh - 80px); /* iOS small viewport */
  max-height: calc(100dvh - 80px); /* dynamic viewport */
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  z-index: 10060;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.modal-close {
  position: absolute;
  top: 10px; 
  right: 10px;
  background: transparent; 
  border: 0; 
  font-size: 18px; 
  cursor: pointer;
}

.modal-panel h3 { margin-top: 0; margin-bottom: 12px; }
.modal-panel form { display: grid; gap: 10px; }
.modal-panel label { display: flex; flex-direction: column; font-size: 14px; color:#222; }
.modal-panel input,
.modal-panel textarea {
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  resize: vertical;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}

/* Prevent body scroll when modal open */
body.modal-open { 
  overflow: hidden; 
}

/* =========================
   版面分流：桌機/手機 顯示不同文案
========================= */
.only-desktop { display: block; }
.only-mobile  { display: none; }

@media (max-width: 768px) {
  .only-desktop { display: none !important; }
  .only-mobile  { display: block !important; }
}