@charset "UTF-8";
/* ═══════════════════════════════════════════════════════════════
   精進花園 (Zen Practice Garden) - 核心樣式表
   設計理念：
   1. 登入/註冊門檻護持（未登入前僅見登入卡）
   2. 2D 精進花園（無預繪花朵，依打卡數量動態注入蓮花＋太陽花）
   3. 木牌老和尚法語（中台月刊）
   4. 精簡修持打卡：靜坐 ＋ 每日誦經（金剛經、藥師經、普門品或自填，無卷數無持咒）
   5. 蓮池海會同修參觀（嚴格隱私：僅公開班級與法名，姓名學號絕對隱藏）
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg-rice: #f7f5f0;
  --bg-card: #ffffff;
  --bg-card-sub: #fbf9f5;
  --ink-deep: #1e1b18;
  --ink-base: #34302c;
  --ink-muted: #6e6860;
  --ink-faint: #a69f95;

  --pine-green: #2d4c42;
  --pine-soft: #3f695b;
  --pine-light: #eef4f1;

  --gold-bronze: #8f6f3a;
  --gold-light: #f6efe2;
  --gold-vibrant: #c49a45;

  --vermilion: #8e382d;
  --vermilion-soft: #ad4b3e;
  --vermilion-pale: #faedea;

  --border-light: rgba(52, 48, 44, 0.08);
  --border-focus: rgba(45, 76, 66, 0.4);

  --shadow-soft: 0 4px 20px rgba(30, 27, 24, 0.05);
  --shadow-card: 0 8px 32px rgba(30, 27, 24, 0.08);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --radius-full: 9999px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Serif TC', 'PingFang TC', 'Microsoft JhengHei', serif;
  background-color: var(--bg-rice);
  color: var(--ink-base);
  line-height: 1.9;
  font-weight: 400;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* 頂部裝飾三色頂線 (松柏綠、古銅金、朱砂紅) */
body::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--pine-green) 0%, var(--gold-bronze) 50%, var(--vermilion) 100%);
  width: 100%;
}

/* ════════════════════════════════
   1. 登入 / 註冊入口門檻 (Login / Register Gate)
   ════════════════════════════════ */
/* ════════════════════════════════
   1. 登入門檻全螢幕介面 (嚴格參照參考圖二之深紫壇金頂幅 ＋ 白卡 ＋ 圓角按鈕樣式)
   ════════════════════════════════ */
.login-gate-screen {
  position: fixed;
  inset: 0;
  background-color: #faf8f5;
  background-image: 
    radial-gradient(#e2d5c3 0.75px, transparent 0.75px),
    radial-gradient(#e2d5c3 0.75px, #faf8f5 0.75px);
  background-size: 30px 30px;
  background-position: 0 0, 15px 15px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* 頂部深紫壇木黑金橫幅 (參照圖二頂部：普宜精舍/活動報名) */
.gate-top-header {
  background: #2b101c;
  background: linear-gradient(180deg, #260f1b 0%, #341423 100%);
  color: #ffffff;
  padding: 1.2rem 1.5rem 1.4rem;
  box-shadow: 0 4px 18px rgba(35, 12, 22, 0.28);
  border-bottom: 2px solid #b89650;
  flex-shrink: 0;
}

.gate-top-sub {
  font-size: 0.95rem;
  color: #dfcfbc;
  letter-spacing: 0.08em;
  font-weight: 500;
  margin-bottom: 0.25rem;
  opacity: 0.92;
}

.gate-top-title {
  font-size: 1.7rem;
  font-weight: 700;
  color: #dfb36c;
  letter-spacing: 0.06em;
  line-height: 1.2;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

/* 主體卡片容器 (彈性置中，手機平順滾動) */
.gate-body-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.8rem 1rem 2.5rem;
  width: 100%;
  box-sizing: border-box;
}

.login-gate-card {
  background: #ffffff;
  border-radius: 20px;
  max-width: 480px;
  width: 100%;
  padding: 2rem 2.2rem;
  margin: auto;
  box-shadow: 0 12px 38px rgba(43, 16, 28, 0.09), 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1.5px solid #ebd9c2;
  text-align: center;
  box-sizing: border-box;
}

/* 頂部圓形徽章 (蓮花聖徽) */
.gate-badge-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 0.8rem;
}

.gate-badge-circle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #2b101c;
  border: 2px solid #dfb36c;
  color: #f7f5f0;
  font-size: 1.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(43, 16, 28, 0.2);
}

.gate-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2b101c;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.gate-card-subtitle {
  font-size: 0.88rem;
  color: #8c7653;
  margin-top: 0;
  margin-bottom: 1.2rem;
  letter-spacing: 0.04em;
}

/* 登入切換頁籤 (學員 ｜ 法師) */
.gate-tab-switcher {
  display: flex;
  background: #f1ebd8;
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 1.2rem;
  gap: 4px;
  box-sizing: border-box;
}

.gate-tab-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 11px;
  border: none;
  background: transparent;
  color: #78644e;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.gate-tab-btn:hover {
  color: #2b101c;
}

.gate-tab-btn.active {
  background: #ffffff;
  color: #2b101c;
  box-shadow: 0 2px 8px rgba(43, 16, 28, 0.12);
  border: 1px solid rgba(184, 150, 80, 0.3);
}

/* 表單橫向雙欄 (比例平衡修復，min-width: 0 徹底杜絕溢出) */
.gate-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.85rem;
  width: 100%;
  box-sizing: border-box;
}

.gate-compact-group {
  margin-bottom: 0.9rem !important;
  text-align: left;
  min-width: 0;
  box-sizing: border-box;
}

.gate-compact-group .form-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #2c2523;
  margin-bottom: 0.35rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.gate-label-split {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.gate-privacy-tag {
  font-size: 0.72rem;
  font-weight: normal;
  border-radius: 999px;
  padding: 1px 6px;
  white-space: nowrap;
}

.gate-privacy-tag.lock {
  color: #c62828;
  background: #ffebee;
}

.gate-privacy-tag.flower {
  color: #ad1457;
  background: #fce4ec;
}

/* 參照圖二圓角風格之輸入框與選單 (防溢出 + 支援手機 48px 觸控友善) */
.gate-styled-input {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  height: 48px !important;
  border-radius: 14px !important;
  border: 1.5px solid #d4c5a9 !important;
  background-color: #ffffff !important;
  padding: 0 1rem !important;
  font-size: 0.95rem !important;
  color: #2c2523 !important;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}

.gate-styled-input:focus {
  border-color: #b89650 !important;
  box-shadow: 0 0 0 3.5px rgba(184, 150, 80, 0.18) !important;
  outline: none !important;
}

/* 主要登入按鈕 (參照圖二大圓角藥丸風格，深紫壇黑配金字) */
.gate-btn-submit {
  width: 100%;
  height: 52px;
  background: #2b101c;
  background: linear-gradient(180deg, #381525 0%, #230d17 100%);
  color: #dfb36c;
  border: 1.5px solid #dfb36c;
  border-radius: 18px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.6rem;
  box-shadow: 0 6px 18px rgba(43, 16, 28, 0.25);
  transition: transform 0.18s, box-shadow 0.18s, filter 0.18s;
  box-sizing: border-box;
}

.gate-btn-submit:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 8px 24px rgba(43, 16, 28, 0.35);
  filter: brightness(1.06);
}

.gate-btn-submit:active {
  transform: translateY(0);
}

/* 次要法師管理入口 (參照圖二之白底金色邊框圓角按鈕風格) */
.gate-admin-action-wrap {
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px dashed #dcd3c4;
}

.gate-btn-admin {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  height: 44px;
  background: #ffffff;
  color: #8c7653;
  border: 1.5px solid #d4c5a9;
  border-radius: 16px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  box-sizing: border-box;
}

.gate-btn-admin:hover {
  border-color: #b89650;
  color: #2b101c;
  background: #fbf9f5;
}

/* 手機版響應式極致優化 (<= 600px 屏幕全螢幕自適應、絕不橫向溢出) */
@media (max-width: 600px) {
  .gate-top-header {
    padding: 1rem 1.2rem;
  }
  .gate-top-title {
    font-size: 1.45rem;
  }
  .gate-body-container {
    padding: 1.2rem 0.8rem 2rem;
  }
  .login-gate-card {
    padding: 1.5rem 1.1rem;
    border-radius: 18px;
  }
  .gate-form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .gate-styled-input {
    height: 46px !important;
    font-size: 0.95rem !important;
  }
  .gate-btn-submit {
    height: 48px;
    font-size: 1rem;
    border-radius: 16px;
  }
}

/* ════════════════════════════════
   2. 頂部導覽列 (已登入狀態)
   ════════════════════════════════ */
.app-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.app-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: inherit;
}

.brand-icon-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--pine-green);
  color: #fff;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-name-group h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink-deep);
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.brand-name-group span {
  font-size: 0.76rem;
  color: var(--gold-bronze);
  letter-spacing: 0.15em;
}

.app-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.badge-class {
  background: var(--pine-light);
  color: var(--pine-green);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

/* ════════════════════════════════
   3. 主畫面佈局 (花園畫布 ＋ 每日修持打卡面板)
   ════════════════════════════════ */
.practice-stats-strip {
  max-width: 1280px;
  margin: 1.2rem auto 0.2rem;
  padding: 0 1.2rem;
}

.stats-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 0.85rem;
}

.stats-grid-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
}

.stat-metric-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 0.8rem 1rem;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(30, 27, 24, 0.08);
}

.stat-metric-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.stat-metric-info {
  display: flex;
  flex-direction: column;
}

.stat-metric-num {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink-deep);
}

.stat-metric-label {
  font-size: 0.76rem;
  color: var(--ink-muted);
  margin-top: 2px;
}

.main-garden-layout {
  max-width: 1280px;
  margin: 1.2rem auto 3rem;
  padding: 0 1.2rem;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1.8rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .main-garden-layout {
    grid-template-columns: 1fr;
  }
}

/* ════════════════════════════════
   4. 2D 精進花園畫布 (The Living Garden)
   底圖無花朵，蓮花與太陽花完全依打卡數生長！
   ════════════════════════════════ */
.garden-canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 400px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 3px solid #ffffff;
  background-image: url('../assets/images/stage_1_seed.jpg');
  background-size: cover;
  background-position: center;
  user-select: none;
}

/* 累積打卡次數計數徽章 (花園左上) */
.garden-counter-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(22, 28, 25, 0.82);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 213, 79, 0.4);
  border-radius: 9999px;
  padding: 5px 14px;
  color: #ffd54f;
  font-size: 0.85rem;
  font-weight: 700;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* 木牌法語互動區 (對齊底圖木牌位置) */
.wooden-sign-hotspot {
  position: absolute;
  top: 38%;
  right: 28%;
  width: 90px;
  height: 95px;
  cursor: pointer;
  z-index: 15;
  transition: transform 0.25s ease;
}

.wooden-sign-hotspot:hover {
  transform: scale(1.08);
}

.sign-tooltip-preview {
  position: absolute;
  bottom: 80px;
  right: -20px;
  background: rgba(255, 252, 242, 0.95);
  border: 1px solid #c49a45;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 0.74rem;
  color: #5c441b;
  font-weight: 600;
  white-space: nowrap;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  pointer-events: none;
  animation: floatSign 3s infinite ease-in-out;
}

@keyframes floatSign {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* ════════════════════════════════
   A. 蓮池圖層 (Lotus Pond Area) - 位於左側澄澈水池中 (無泥土)
   ════════════════════════════════ */
.zen-pond-container {
  position: absolute;
  top: 44%;
  left: 9%;
  width: 23%;
  height: 32%;
  z-index: 8;
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.25s ease;
}

.zen-pond-container:hover {
  transform: scale(1.04);
}

.pond-surface-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.22));
}

.lotus-flower-bloom {
  transform-origin: bottom center;
  animation: swayFlower 4s infinite ease-in-out alternate;
}

@keyframes swayFlower {
  0% { transform: rotate(-2.5deg) translateY(0); }
  50% { transform: rotate(0deg) translateY(-2px); }
  100% { transform: rotate(2.5deg) translateY(0); }
}

/* ════════════════════════════════
   B. 太陽花草皮圖層 (Sunflowers in Grass Lawn) - 生長於綠茵草皮上 (無泥土)
   ════════════════════════════════ */
.sunflower-field-container {
  position: absolute;
  top: 42%;
  left: 39%;
  width: 27%;
  height: 28%;
  z-index: 9;
  pointer-events: auto;
  background: transparent !important;
}

.sunflower-item {
  position: absolute;
  transform-origin: bottom center;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.25));
  cursor: pointer;
  transition: transform 0.2s ease;
}

.sunflower-item:hover {
  transform: scale(1.15) !important;
}

.sunflower-bloom-anim {
  animation: sunSway 3.5s infinite ease-in-out alternate;
}

@keyframes sunSway {
  0% { transform: rotate(-3deg); }
  100% { transform: rotate(3deg); }
}

/* 花園生長階段標籤列 (頂部快速切換) */
.garden-stage-pills-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.garden-stage-pill {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 9999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.garden-stage-pill:hover {
  background: var(--bg-card-sub);
  color: var(--pine-green);
  border-color: var(--pine-soft);
}

.garden-stage-pill.active {
  background: var(--pine-green);
  color: #ffffff;
  border-color: var(--pine-green);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(45, 76, 66, 0.25);
}

/* 甘露水注入動畫 */
.nectar-stream-drop {
  position: absolute;
  font-size: 1.6rem;
  z-index: 30;
  pointer-events: none;
  animation: nectarRain 1.1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes nectarRain {
  0% { opacity: 0; transform: translateY(-50px) scale(0.6); }
  30% { opacity: 1; transform: translateY(60px) scale(1.2); }
  100% { opacity: 0; transform: translateY(220px) scale(1.6); }
}

/* ════════════════════════════════
   5. 每日修持打卡面板 (Check-in Form Card)
   精簡為：靜坐 ＋ 每日誦經（無卷數、無持咒）
   ════════════════════════════════ */
.checkin-panel-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.8rem 2rem;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
}

.panel-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.9rem;
  margin-bottom: 1.4rem;
}

.panel-header-row h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink-deep);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
}

.form-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-deep);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-control {
  font-family: inherit;
  font-size: 0.98rem;
  color: var(--ink-base);
  background: var(--bg-card-sub);
  border: 1px solid rgba(52, 48, 44, 0.15);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  outline: none;
  transition: all 0.2s ease;
}

.form-control:focus {
  background: #ffffff;
  border-color: var(--pine-green);
  box-shadow: 0 0 0 3px rgba(45, 76, 66, 0.12);
}

/* 補填歷史時間面板 */
.backdate-toggle-box {
  background: var(--gold-light);
  border: 1px dashed rgba(143, 111, 58, 0.35);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--pine-green) 0%, #1e3830 100%);
  color: #ffffff;
  border: none;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(45, 76, 66, 0.3);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45, 76, 66, 0.4);
}

.btn-secondary {
  background: #ffffff;
  color: var(--pine-green);
  border: 1px solid var(--pine-green);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-secondary:hover {
  background: var(--pine-light);
}

/* ════════════════════════════════
   6. 參觀他人花園頂部橫幅 (Visitor Banner)
   ════════════════════════════════ */
.visitor-banner-strip {
  background: linear-gradient(135deg, #1b332c 0%, #10211c 100%);
  border-bottom: 2px solid #ffd54f;
  color: #ffffff;
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.visitor-tag-pill {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 8px;
  border-radius: 9999px;
  color: #a7f3d0;
}

/* ════════════════════════════════
   7. 蓮池海會 · 同修名錄抽屜 (Friends Drawer)
   嚴格安全隱私：僅公開班級與法名，姓名學號絕對隱藏！
   ════════════════════════════════ */
.friends-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: flex-end;
}

.friends-drawer-content {
  background: #ffffff;
  width: 100%;
  max-width: 380px;
  height: 100%;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  animation: slideDrawer 0.3s ease-out;
}

@keyframes slideDrawer {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.drawer-top-banner {
  background: linear-gradient(135deg, var(--pine-green) 0%, #152923 100%);
  color: #ffffff;
  padding: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.friend-card-row {
  background: #fbfbfb;
  border: 1px solid #ebebeb;
  border-radius: 12px;
  padding: 0.9rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.friend-card-row:hover {
  background: #f0f7f4;
  border-color: #a3d4be;
  transform: translateX(-3px);
}

.friend-gem {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e8f5e9;
  color: #2e7d32;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* ════════════════════════════════
   8. 禪意法語彈窗 (Zen Quote Modal)
   ════════════════════════════════ */
.zen-quote-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 24, 21, 0.65);
  backdrop-filter: blur(6px);
  z-index: 600;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.zen-quote-dialog {
  background: #ffffff;
  border-radius: 18px;
  max-width: 520px;
  width: 100%;
  padding: 2rem 2.2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  border-left: 6px solid var(--gold-bronze);
  animation: popIn 0.25s ease-out;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* ════════════════════════════════
   9. 指導法師全圖庫預覽 (Admin Stage Gallery)
   ════════════════════════════════ */
.admin-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.2rem;
}

.admin-gallery-card {
  background: #ffffff;
  border: 1px solid rgba(45, 76, 66, 0.15);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.admin-gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(45, 76, 66, 0.15);
  border-color: var(--pine-green);
}

.admin-gallery-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #1a2924;
  overflow: hidden;
}

.admin-gallery-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.admin-gallery-card:hover .admin-gallery-img-wrap img {
  transform: scale(1.05);
}

.admin-gallery-stage-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(18, 33, 27, 0.85);
  backdrop-filter: blur(4px);
  color: #ffd54f;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 213, 79, 0.4);
}

.admin-gallery-body {
  padding: 1rem 1.1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.admin-gallery-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink-deep);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-gallery-rules {
  font-size: 0.82rem;
  color: var(--ink-muted);
  line-height: 1.6;
  margin-bottom: 0.8rem;
  background: var(--bg-card-sub);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
}

.admin-gallery-actions {
  display: flex;
  gap: 0.5rem;
}

/* 學員名錄生長階段 Badge */
.stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  white-space: nowrap;
}
.stage-badge-1 { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.stage-badge-2 { background: #e0f2f1; color: #00695c; border: 1px solid #b2dfdb; }
.stage-badge-3 { background: #fff8e1; color: #f57f17; border: 1px solid #ffe082; }
.stage-badge-4 { background: #ede7f6; color: #4527a0; border: 1px solid #d1c4e9; }
.stage-badge-season { background: #fff3e0; color: #e65100; border: 1px solid #ffcc80; }

