/* ══════════════════════════════════════════════════════════════
   polish.css — 全站美化層（2026-11 前端美化）
   - 只做視覺：不改版面尺寸、不改任何功能。導覽列的高度／斷點／展開邏輯一律不碰
     （那些歸 CLS-NAV-STABILITY-SPEC 管）。
   - 必須排在頁面自己的 <style> 之後載入（同權重靠順序蓋過去）。
   - 顏色只用 theme.css 的 token；金／玫瑰的半透明寫 rgba(var(--gold-rgb), …)。
   - 三層：①最上面「通用」沒有圈選，載入就生效，只放絕對安全的（反白色、捲軸色）。
     ②body.pl ＝一般內頁的卡片質感／光暈／輸入框光環。
     ③body.pl-hero ＝首頁與六個地區頁共用的 hero 版型（羅盤、漸層金字、滿版導覽底）。
     沒加 class 的頁面不會被②③波及。
   - ②的卡片規則用 :where() 把權重壓到跟頁面自己的 .xxx 一樣低，所以頁面寫的
     .xxx:hover／.xxx.active 等狀態照樣贏，不會被這層蓋掉。
   - 搭配 js/shared/polish.js（進場動態、卡片游標光點；純裝飾，壞了頁面照常）。
   ══════════════════════════════════════════════════════════════ */

/* ── 通用 ─────────────────────────────────────────────── */
::selection { background: rgba(var(--gold-rgb), 0.30); color: var(--text-primary); }
html { scrollbar-color: rgba(var(--gold-rgb), 0.35) transparent; }
h1, h2, h3 { text-wrap: balance; }

/* 進場動態：polish.js 只會把「載入當下還在畫面下方」的區塊加上 .rv，
   所以沒有 JS 或 JS 壞掉時內容照常顯示。動完 JS 會把 class 拿掉，不影響原本的 hover。 */
.rv {
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) !important;
  transition-delay: var(--rv-d, 0ms) !important;
}
.rv.rv-in { opacity: 1; transform: none; }


/* ── 一般內頁（body.pl）──────────────────────────────── */

/* 背景光暈略提亮、並改成跟著 token 走（各頁原本 0.18～0.3 寫死）；內頁的光暈色塊較濃，倍率不能大 */
.pl .bg-patch, .pl .bp { opacity: calc(var(--fx-glow-opacity) * 1.4); }

/* 卡片：頂緣高光＋由上往下的微亮＋落影。:where() 讓權重＝頁面自己的 .xxx，狀態規則照樣贏 */
.pl :where(.auth-card, .ev-card, .ev-panel, .content-card, .tip-card, .region-card, .post-card,
           .form-card, .interest-card, .signup-card, .post-detail, .guide-section, .gate-card,
           .card, .action-item, .game-card, .drawer, .modal-box) {
  background-image: linear-gradient(180deg, var(--fx-sheen) 0%, transparent 42%);
  box-shadow: inset 0 1px 0 var(--fx-hairline), var(--shadow-rest);
}
/* 可以點的卡片：hover 金框＋浮起的落影＋游標光點（不加位移，避免跟各頁自己的 transform 打架） */
.pl :is(.ev-card, .post-card, .content-card, .tip-card, .region-card, .drawer, a.card):hover {
  border-color: rgba(var(--gold-rgb), 0.45);
  box-shadow: inset 0 1px 0 var(--fx-hairline), var(--shadow-lift), 0 12px 44px -14px rgba(var(--gold-rgb), 0.22);
  background-image:
    radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgba(var(--gold-rgb), 0.10), transparent 62%),
    linear-gradient(180deg, var(--fx-sheen) 0%, transparent 42%);
}
/* 廠商牆是 1px 格線拼起來的整片，不加落影，只加游標光點 */
.pl .vendor-card:hover {
  background-image: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgba(var(--gold-rgb), 0.12), transparent 62%);
}
/* 乾爹專區（sponsors.css 的選擇器權重較高，另外點名） */
.pl.sponsors-area .official-shop,
.pl.sponsors-area .campaign {
  background-image: linear-gradient(180deg, var(--fx-sheen) 0%, transparent 42%);
  box-shadow: inset 0 1px 0 var(--fx-hairline), var(--shadow-rest);
}

/* 輸入框聚焦光環（頁面自己有寫 focus 陰影的照樣贏） */
.pl :where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]), textarea, select):focus-visible {
  box-shadow: 0 0 0 3px rgba(var(--gold-rgb), 0.14);
}

/* 分隔線兩端淡出（結構：線・圖示・線） */
.pl .section-divider .divider-line:first-child { background: linear-gradient(90deg, transparent, var(--accent-gold)); }
.pl .section-divider .divider-line:last-child  { background: linear-gradient(90deg, var(--accent-gold), transparent); }

/* 引言塊、資料表：一點厚度 */
.pl .highlight-block { background-image: linear-gradient(90deg, rgba(var(--gold-rgb), 0.07), transparent 70%); }
.pl .store-table { box-shadow: var(--shadow-rest); }

/* ── hero 版型：首頁＋六個地區頁（body.pl-hero）──────────── */

/* 背景光暈：原本幾乎看不到，提亮；淺色主題跟著 --fx-glow-opacity 自動變淡 */
.pl-hero .bg-patch { opacity: calc(var(--fx-glow-opacity) * 2.6); }

/* 導覽列底色鋪滿整個視窗寬（原本只有中間 1280px 那塊有底，寬螢幕像貼了一張貼紙）。
   只換底色的畫法，navbar 本身的尺寸、內距、斷點都沒動。 */
.pl-hero .navbar { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom-color: transparent; }
.pl-hero .navbar::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw;
  transform: translateX(-50%); z-index: -1; pointer-events: none;
  background: var(--fx-nav-bg); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
  border-bottom: 1px solid var(--border-subtle);
}

/* Hero：文字進場 */
@keyframes plHeroIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.pl-hero .hero-content > * { animation: plHeroIn 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.pl-hero .hero-content > :nth-child(2) { animation-delay: 0.08s; }
.pl-hero .hero-content > :nth-child(3) { animation-delay: 0.18s; }
.pl-hero .hero-content > :nth-child(4) { animation-delay: 0.28s; }
.pl-hero .hero-content > :nth-child(5) { animation-delay: 0.38s; }
.pl-hero .hero-visual { animation: plHeroIn 1.2s 0.2s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

/* Hero：標題金字改金→玫瑰漸層，數字改上亮下沉的金屬漸層 */
.pl-hero .hero h1 em {
  background: linear-gradient(100deg, var(--accent-gold-light) 0%, var(--accent-gold) 45%, var(--accent-rose) 115%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: 0.08em; /* 斜體字尾不被裁掉 */
}
.pl-hero .stat-number,
.pl-hero .metric-value {
  background: linear-gradient(180deg, var(--accent-gold-light) 0%, var(--accent-gold) 55%, rgba(var(--gold-rgb), 0.6) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pl-hero .stat-item:not(:last-child)::after {
  background: linear-gradient(180deg, transparent, rgba(var(--gold-rgb), 0.35), transparent);
}

/* 光暈比羅盤外框大，手機上會把整頁撐寬（others 實測 390→415）→ hero 水平方向裁掉溢出 */
.pl-hero .hero { overflow-x: clip; }
/* Hero：羅盤後方的呼吸光暈＋繞行的一道金光 */
@keyframes plSpin { to { transform: rotate(360deg); } }
@keyframes plHalo { 0%, 100% { opacity: 0.75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }
.pl-hero .hero-emblem-wrapper::before {
  content: ''; position: absolute; inset: -38%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(var(--gold-rgb), 0.20) 0%, rgba(var(--rose-rgb), 0.08) 38%, transparent 68%);
  animation: plHalo 7s ease-in-out infinite;
}
.pl-hero .hero-emblem-wrapper::after {
  content: ''; position: absolute; inset: -7%; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 74%, rgba(var(--gold-rgb), 0.75) 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1.5px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1.5px));
  animation: plSpin 9s linear infinite;
}
/* 未激活狀態原本暗到幾乎看不見：仍比已激活暗一階，但看得出是羅盤 */
.pl-hero .emblem-locked .hero-emblem { border-color: rgba(var(--gold-rgb), 0.55); }
.pl-hero .emblem-locked .cuisine-ring   { border-color: rgba(var(--gold-rgb), 0.24); }
.pl-hero .emblem-locked .cuisine-ring-2 { border-color: rgba(var(--rose-rgb), 0.20); }
.pl-hero .emblem-locked .cuisine-ring-3 { border-color: rgba(var(--gold-rgb), 0.28); }
.pl-hero .emblem-locked .food-icon { opacity: 0.6; }
.pl-hero .emblem-locked .emblem-center-icon { opacity: 0.6; }

/* 按鈕：金色主按鈕改漸層＋hover 掃光；箭頭 hover 往前滑 */
.pl-hero .btn-primary,
.pl-hero .btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-gold-light) 0%, var(--accent-gold) 55%, color-mix(in srgb, var(--accent-gold) 78%, var(--accent-rose)) 100%);
}
.pl-hero .btn-primary::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.38) 50%, transparent 65%);
  transform: translateX(-120%); transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.pl-hero .btn-primary:hover::after { transform: translateX(120%); }
/* 次要／上鎖按鈕的框線原本寫死白色半透明，淺色主題下整圈看不見 → 改成跟主題走的淡金框 */
.pl-hero .btn-secondary, .pl-hero .btn-locked, .pl-hero .nav-login { border-color: rgba(var(--gold-rgb), 0.32); }
.pl-hero .btn .fa-arrow-right { transition: transform 0.4s; }
.pl-hero .btn:hover .fa-arrow-right { transform: translateX(4px); }

/* 搜尋框：加厚度與聚焦光環 */
.pl-hero .oracle-input-wrap {
  box-shadow: inset 0 1px 0 var(--fx-hairline), var(--shadow-rest);
}
.pl-hero .oracle-input-wrap.focused {
  box-shadow: inset 0 1px 0 var(--fx-hairline), 0 0 0 4px rgba(var(--gold-rgb), 0.08), 0 0 50px -12px rgba(var(--gold-rgb), 0.40);
}

/* 區塊標題下的分隔線：兩端淡出 */
.pl-hero .section-divider { opacity: 0.8; }
.pl-hero .divider-line { width: 90px; background: linear-gradient(90deg, transparent, var(--accent-gold)); }
.pl-hero .divider-line:last-child { background: linear-gradient(90deg, var(--accent-gold), transparent); }

/* 區塊之間的橫線：中間金、兩端淡出 */
.pl-hero .oracle-section,
.pl-hero .guests-section,
.pl-hero .membership-teaser,
.pl-hero .footer {
  border-image: linear-gradient(90deg, transparent, rgba(var(--gold-rgb), 0.38), transparent) 1;
}

/* 六大區域卡：每張有自己的地區色（原本的 nth-child 因為卡片包在 <a> 裡，六張都吃到第一個顏色）、
   背景大數字浮水印、游標光點 */
.pl-hero .features-grid { counter-reset: plfc; box-shadow: var(--shadow-rest); }
.pl-hero .feature-card { counter-increment: plfc; } /* 掛在卡片上：外層 <a> 是 display:contents，Chrome 不幫它計數 */
.pl-hero .features-grid > a:nth-child(1) .feature-card { --rg: 212,165,71; }
.pl-hero .features-grid > a:nth-child(2) .feature-card { --rg: 90,130,100; }
.pl-hero .features-grid > a:nth-child(3) .feature-card { --rg: 184,133,122; }
.pl-hero .features-grid > a:nth-child(4) .feature-card { --rg: 196,149,106; }
.pl-hero .features-grid > a:nth-child(5) .feature-card { --rg: 70,130,180; }
.pl-hero .features-grid > a:nth-child(6) .feature-card { --rg: 155,48,48; }
.pl-hero .feature-card > * { position: relative; z-index: 1; }
.pl-hero .feature-card::after {
  content: counter(plfc, decimal-leading-zero);
  position: absolute; right: 1.8rem; top: 0.6rem; z-index: 0; pointer-events: none;
  font: 300 6.5rem/1 'Cormorant Garamond', serif; letter-spacing: -3px;
  color: rgba(var(--rg), 0.09);
  transition: color var(--transition-smooth), transform var(--transition-smooth);
}
.pl-hero .feature-card:hover::after { color: rgba(var(--rg), 0.30); transform: translateY(6px); }
.pl-hero .feature-card:hover {
  border-left-color: rgb(var(--rg));
  background-image: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(var(--rg), 0.16), transparent 62%);
}
.pl-hero .feature-card::before { background: linear-gradient(90deg, transparent, rgb(var(--rg)), transparent); }
.pl-hero .feature-card:hover .feature-number i { opacity: 1; color: rgb(var(--rg)); }
.pl-hero .feature-card h3 { transition: letter-spacing var(--transition-smooth); }
.pl-hero .feature-card:hover h3 { letter-spacing: 1.5px; }

/* 卡片共通：頂緣高光＋落影，hover 浮起帶金光 */
.pl-hero .member-card,
.pl-hero .guest-card,
.pl-hero .showcase-visual,
.pl-hero .oracle-card {
  background-image: linear-gradient(180deg, var(--fx-sheen) 0%, transparent 42%);
  box-shadow: inset 0 1px 0 var(--fx-hairline), var(--shadow-rest);
}
.pl-hero .member-card:hover,
.pl-hero .guest-card:hover,
.pl-hero .showcase-visual:hover,
.pl-hero .oracle-card:hover {
  border-color: rgba(var(--gold-rgb), 0.45);
  box-shadow: inset 0 1px 0 var(--fx-hairline), var(--shadow-lift), 0 12px 44px -14px rgba(var(--gold-rgb), 0.22);
}
.pl-hero .member-card:hover {
  transform: translateY(-6px);
  background-image:
    radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgba(var(--gold-rgb), 0.12), transparent 62%),
    linear-gradient(180deg, var(--fx-sheen) 0%, transparent 42%);
}
.pl-hero .member-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
  opacity: 0; transition: opacity var(--transition-smooth);
}
.pl-hero .member-card:hover::before { opacity: 0.7; }
.pl-hero .member-card-icon {
  width: 58px; height: 58px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.35rem; opacity: 0.95; border-radius: 50%;
  border: 1px solid rgba(var(--gold-rgb), 0.32);
  background: radial-gradient(circle at 30% 25%, rgba(var(--gold-rgb), 0.20), transparent 72%);
  transition: border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}
.pl-hero .member-card:hover .member-card-icon {
  border-color: rgba(var(--gold-rgb), 0.7); box-shadow: 0 0 24px -4px rgba(var(--gold-rgb), 0.45);
}

/* 典藏館展示卡：圖示後方的點陣星圖 */
.pl-hero .showcase-visual::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(rgba(var(--gold-rgb), 0.22) 1px, transparent 1.5px) 0 0 / 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 32%, #000 0%, transparent 68%);
          mask-image: radial-gradient(ellipse at 50% 32%, #000 0%, transparent 68%);
}
.pl-hero .showcase-icon-large { opacity: 0.8; filter: drop-shadow(0 0 18px rgba(var(--gold-rgb), 0.35)); }

/* ── 省資源與無障礙 ───────────────────────────────────── */
@media (max-width: 768px) {
  /* 手機 GPU：與原頁的手機效能規則一致，新增的常駐動畫全部停掉 */
  .pl-hero .hero-emblem-wrapper::before,
  .pl-hero .hero-emblem-wrapper::after { animation: none; }
  .pl-hero .navbar::before { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
  .pl-hero .feature-card::after { font-size: 4.5rem; right: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .pl-hero .hero-content > *, .pl-hero .hero-visual,
  .pl-hero .hero-emblem-wrapper::before, .pl-hero .hero-emblem-wrapper::after { animation: none; }
  .rv { opacity: 1; transform: none; transition: none !important; }
}
