/* ==========================================================================
   ⚡ Encore FAQ Pro - Official Prototype & IP Mascot Design System
   Source: 常見問題.html + IP Mascot Fusion
   Width: 1680px Max-Width + Q Badge Outside Yellow Box + Extreme Mobile Polish
   ========================================================================== */

.encore-faq-root {
  --bg:      #fafafa;
  --surface: #ffffff;
  --fg:      #1f2937;
  --muted:   #6b7280;
  --border:  #e5e7eb;
  --accent:  #b00000;
  --accent-soft: rgba(176, 0, 0, 0.08);
  --fg-soft:     rgba(31, 41, 55, 0.05);

  --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", Roboto, sans-serif;
  --font-body:    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", Roboto, sans-serif;
  --font-mono:    ui-monospace, "SF Mono", Menlo, Consolas, "Noto Sans TC", "Microsoft JhengHei", monospace;

  --gap-xs: 8px;
  --gap-sm: 12px;
  --gap-md: 20px;
  --gap-lg: 32px;
  --gap-xl: 56px;
  --radius: 10px;
  --radius-lg: 16px;
  --nav-h: 66px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 12px 30px -10px rgba(0, 0, 0, 0.08);

  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 10px 24px 60px;
  color: var(--fg);
  font-family: var(--font-body);
  box-sizing: border-box;
}

.encore-faq-root *,
.encore-faq-root *::before,
.encore-faq-root *::after {
  box-sizing: border-box;
}

.encore-faq-root .section {
  padding-block: clamp(44px, 5.5vw, 88px) !important;
}

.encore-faq-root .eyebrow {
  margin: 0 0 10px !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  color: #b00000 !important;
  line-height: 1 !important;
}

.encore-faq-root .eyebrow::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 2px;
  background: #b00000;
  vertical-align: middle;
  margin-right: 9px;
}

.encore-faq-root h1,
.encore-faq-root h2,
.encore-faq-root h3 {
  color: var(--fg);
  margin: 0;
  font-weight: 800;
  line-height: 1.25;
}

.encore-faq-root p {
  line-height: 1.65;
}

/* ─── 1. 原型 FAQ Hero 搜尋卡片 ──────────────────────────────────── */
.encore-faq-root .faq-hero {
  padding-top: 10px;
}

.encore-faq-root .faq-hero-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: clamp(24px, 4vw, 44px);
}

.encore-faq-root .faq-hero-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 100% at 88% -22%, rgba(176, 0, 0, 0.06), transparent 60%);
  pointer-events: none;
}

.encore-faq-root .faq-hero-card > * {
  position: relative;
  z-index: 1;
}

.encore-faq-root .faq-hero-card h1 {
  font-size: clamp(26px, 3.2vw, 38px);
  margin: 4px 0 0;
}

.encore-faq-root .faq-hero-card .lead {
  margin: 12px 0 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: clamp(14.5px, 1.6vw, 16.5px);
}

.encore-faq-root .faq-search {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  max-width: 640px;
  padding: 0 18px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.encore-faq-root .faq-search:focus-within {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.encore-faq-root .faq-search .efaq-ic {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--muted);
}

.encore-faq-root .faq-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  padding: 14px 0;
  font-family: inherit;
  font-size: 15.5px;
  color: var(--fg);
  outline: none;
}

.encore-faq-root .faq-search input::placeholder {
  color: var(--muted);
}

.encore-faq-root .faq-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.encore-faq-root .faq-quick a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.encore-faq-root .faq-quick a:hover {
  color: var(--fg);
  border-color: var(--fg);
}

.encore-faq-root .faq-quick a .efaq-ic {
  width: 15px;
  height: 15px;
}

.encore-faq-root .faq-stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 4vw, 48px);
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.encore-faq-root .faq-stat .num {
  display: block;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", Roboto, sans-serif;
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--fg);
}

.encore-faq-root .faq-stat em {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  font-style: normal;
  color: var(--muted);
}

/* ─── 2. 原型 FAQ 主體雙欄排版 (1680px 寬版) ─────────────────────── */
.encore-faq-root .faq-layout {
  display: grid;
  grid-template-columns: clamp(240px, 18vw, 290px) minmax(0, 1fr);
  gap: clamp(24px, 3.5vw, 56px);
  align-items: start;
  min-width: 0;
  max-width: 100%;
}

/* 未顯示左側分類欄時，改為單欄滿版，避免問答被擠到窄欄 */
.encore-faq-root .faq-layout.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.encore-faq-root .faq-body,
.encore-faq-root .faq-group,
.encore-faq-root .faq-list,
.encore-faq-root .faq-item,
.encore-faq-root .faq-a,
.encore-faq-root .faq-a-inner,
.encore-faq-root .faq-ip-box,
.encore-faq-root .faq-ip-text {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.encore-faq-root .faq-side {
  position: sticky;
  top: 90px;
  display: grid;
  gap: 20px;
  min-width: 0;
}

.encore-faq-root .faq-side-h {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: 0.04em;
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--muted);
}

.encore-faq-root .faq-fnav {
  display: grid;
  gap: 4px;
}

.encore-faq-root .faq-fbtn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: none;
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: color 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

.encore-faq-root .faq-fbtn:hover {
  color: var(--fg);
  background: rgba(31, 41, 55, 0.05);
}

.encore-faq-root .faq-fbtn[aria-pressed="true"] {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(176, 0, 0, 0.18);
  font-weight: 700;
}

.encore-faq-root .faq-fbtn .n {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.encore-faq-root .faq-fbtn[aria-pressed="true"] .n {
  color: var(--accent);
}

.encore-faq-root .faq-side-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 20px 18px;
  display: grid;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}

.encore-faq-root .faq-side-card .efaq-ic {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.encore-faq-root .faq-side-card h3 {
  font-size: 15.5px;
  margin: 4px 0 0;
}

.encore-faq-root .faq-side-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.encore-faq-root .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.16s ease;
  border: 1px solid transparent;
}

.encore-faq-root .btn-primary {
  background: var(--accent);
  color: #ffffff !important;
}

.encore-faq-root .btn-primary:hover {
  background: #900000;
  box-shadow: 0 4px 12px rgba(176, 0, 0, 0.25);
}

.encore-faq-root .faq-side-card .btn {
  width: 100%;
  margin-top: 6px;
}

/* ─── 3. 右側問答清單 ────────────────────────────────────────────── */
.encore-faq-root .faq-group {
  margin-bottom: clamp(28px, 3.5vw, 42px);
}

.encore-faq-root .faq-group:last-of-type {
  margin-bottom: 0;
}

.encore-faq-root .faq-group-h {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--fg);
}

.encore-faq-root .faq-group-h .efaq-ic {
  width: 17px;
  height: 17px;
  color: var(--accent);
}

.encore-faq-root .faq-list {
  border-top: 1px solid var(--border);
}

.encore-faq-root .faq-item {
  border-bottom: 1px solid var(--border);
}

.encore-faq-root .faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-md);
  padding: 18px 2px;
  background: none;
  border: 0;
  text-align: left;
  font-family: inherit;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--fg);
  cursor: pointer;
  outline: none;
  transition: color 0.15s ease;
}

.encore-faq-root .faq-q:hover {
  color: var(--accent);
}

.encore-faq-root .faq-q .efaq-chev {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--accent);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s ease;
}

.encore-faq-root .faq-q[aria-expanded="true"] .efaq-chev {
  transform: rotate(180deg);
}

/* ─── 4. 回答展開區 (Q 位於黃底外側 + 暖底 IP 卡片高度耦合) ───────── */
.encore-faq-root .faq-a {
  padding: 0 0 22px;
}

.encore-faq-root .faq-a[hidden] {
  display: none;
}

.encore-faq-root .faq-a-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

/* 左側獨立 Q 氣泡 (在黃底外側，帶光芒與朝向右側黃底的尖尾) */
.encore-faq-root .faq-ip-q-outside {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 50px;
}

.encore-faq-root .faq-ip-q-svg {
  width: 50px;
  height: 38px;
  display: block;
  flex-shrink: 0;
}

.encore-faq-root .faq-ip-q-img {
  width: 50px;
  height: 38px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

/* 右側黃色回答卡片 (文字與 IP 吉祥物高度緊密耦合) */
.encore-faq-root .faq-ip-box {
  flex: 1 1 auto;
  min-width: 0;
  background: #fff4e8;
  border: 1px solid rgba(251, 146, 60, 0.12);
  border-radius: 34px;
  padding: 16px 26px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 3px 10px rgba(249, 115, 22, 0.04);
}

.encore-faq-root .faq-ip-text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14.8px;
  line-height: 1.76;
  color: #334155;
  overflow-wrap: break-word;
  word-break: break-word;
}

.encore-faq-root .faq-ip-text p {
  margin: 0 0 5px;
}

.encore-faq-root .faq-ip-text p:last-child {
  margin-bottom: 0;
}

/* 富文字樣式支援 */
.encore-faq-root .faq-ip-text strong,
.encore-faq-root .faq-ip-text b {
  font-weight: 800 !important;
  color: #000000 !important;
  letter-spacing: -0.01em;
}

.encore-faq-root .faq-ip-text a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.15s ease;
}

.encore-faq-root .faq-ip-text a:hover {
  opacity: 0.8;
}

.encore-faq-root .faq-ip-text mark,
.encore-faq-root .faq-ip-text .highlight {
  background: rgba(254, 240, 138, 0.55);
  color: #854d0e;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
}

.encore-faq-root .faq-ip-text ul,
.encore-faq-root .faq-ip-text ol {
  margin: 6px 0 6px 18px;
  padding: 0;
}

.encore-faq-root .faq-ip-text li {
  margin-bottom: 3px;
}

/* 右側吉祥物與對話框 */
.encore-faq-root .faq-ip-mascot-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.encore-faq-root .faq-ip-bubble {
  position: relative;
  background: #ffffff;
  border: 1.5px solid #991b1b;
  color: #991b1b;
  font-size: 14px;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 18px;
  white-space: nowrap;
  margin-bottom: 2px;
  box-shadow: 0 2px 6px rgba(153, 27, 27, 0.06);
}

.encore-faq-root .faq-ip-bubble-tail {
  position: absolute;
  bottom: -5px;
  right: 14px;
  width: 9px;
  height: 6px;
  display: block;
}

.encore-faq-root .faq-ip-figure {
  width: 230px;
  height: 134px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.encore-faq-root .faq-ip-svg {
  width: 100%;
  height: 100%;
}

.encore-faq-root .faq-ip-custom-img {
  max-height: 126px;
  max-width: 216px;
  object-fit: contain;
}

/* ─── 5. 搜尋無結果 ──────────────────────────────────────────────── */
.encore-faq-root .faq-empty {
  display: none;
  padding: 48px 6px;
  text-align: center;
  color: var(--muted);
}

.encore-faq-root .faq-empty.on {
  display: block;
}

.encore-faq-root .faq-empty .efaq-ic {
  width: 32px;
  height: 32px;
  color: var(--muted);
  margin: 0 auto;
}

.encore-faq-root .faq-empty p {
  margin: 10px 0 0;
  font-size: 14.5px;
}

.encore-faq-root .faq-empty b {
  color: var(--fg);
}

/* ─── 6. 底部 4 宮格客服卡片 ─────────────────────────────────────── */
.encore-faq-root .sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--gap-lg);
  flex-wrap: wrap;
  margin-bottom: 44px !important;
}

.encore-faq-root .sec-head h2 {
  font-size: clamp(26px, 3.2vw, 36px) !important;
  font-weight: 800 !important;
  color: #1a1715 !important;
  line-height: 1.25 !important;
  letter-spacing: -0.01em !important;
  margin: 0 !important;
}

.encore-faq-root .sec-note {
  margin: 0;
  max-width: 44ch;
  color: var(--muted);
  font-size: 13.5px;
}

.encore-faq-root .help-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap-md);
}

.encore-faq-root .help-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color 0.15s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.encore-faq-root .help-card:hover {
  border-color: var(--fg);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.encore-faq-root .help-card .efaq-ic {
  width: 36px;
  height: 36px;
  color: var(--accent);
}

.encore-faq-root .help-card h3 {
  font-size: 16px;
  margin: 6px 0 0;
}

.encore-faq-root .help-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
}

.encore-faq-root .help-card a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 14px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

.encore-faq-root .help-card a .efaq-ic {
  width: 14px;
  height: 14px;
  color: currentColor;
  transition: transform 0.15s ease;
}

.encore-faq-root .help-card a:hover .efaq-ic {
  transform: translateX(3px);
}

/* ─── 7. 手機與平板全面深度優化 (Extreme RWD & IP Coupling System) ─── */
@media (max-width: 1024px) {
  .encore-faq-root {
    padding: 8px 16px 50px;
  }

  .encore-faq-root .faq-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .encore-faq-root .faq-side {
    position: static;
    gap: 14px;
  }

  /* 分類切換按鈕轉為滑動膠囊 */
  .encore-faq-root .faq-fnav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 6px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .encore-faq-root .faq-fnav::-webkit-scrollbar {
    display: none;
  }

  .encore-faq-root .faq-fbtn {
    width: auto;
    flex-shrink: 0;
    white-space: nowrap;
    border-color: var(--border);
    background: var(--surface);
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 14px;
  }

  .encore-faq-root .faq-fbtn[aria-pressed="true"] {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
  }

  .encore-faq-root .faq-fbtn[aria-pressed="true"] .n {
    color: rgba(255, 255, 255, 0.95);
  }

  .encore-faq-root .faq-side-card {
    display: none;
  }

  .encore-faq-root .help-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

@media (max-width: 820px) {
  .encore-faq-root .faq-hero-card {
    padding: 22px 18px;
  }

  .encore-faq-root .faq-hero-card h1 {
    font-size: 24px;
  }

  .encore-faq-root .faq-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 10px;
    margin-top: 18px;
    padding-top: 16px;
  }

  .encore-faq-root .faq-stat .num {
    font-size: 19px;
  }

  .encore-faq-root .faq-q {
    font-size: 15.5px;
    padding: 16px 0;
  }

  /* 回答展開區：平板/手機依然緊密水平耦合並排 */
  .encore-faq-root .faq-a {
    padding: 0 0 16px;
  }

  .encore-faq-root .faq-a-inner {
    align-items: center;
    gap: 8px;
  }

  .encore-faq-root .faq-ip-q-outside {
    width: 42px;
  }

  .encore-faq-root .faq-ip-q-svg {
    width: 42px;
    height: 32px;
  }

  .encore-faq-root .faq-ip-q-img {
    width: 42px;
    height: 32px;
  }

  .encore-faq-root .faq-ip-box {
    border-radius: 24px;
    padding: 14px 18px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
  }

  .encore-faq-root .faq-ip-text {
    font-size: 14px;
    line-height: 1.7;
  }

  .encore-faq-root .faq-ip-figure {
    width: 180px;
    height: 104px;
  }

  .encore-faq-root .faq-ip-custom-img {
    max-height: 96px;
    max-width: 170px;
  }

  .encore-faq-root .faq-ip-bubble {
    font-size: 13px;
    padding: 4px 12px;
    margin-bottom: 2px;
  }

  .encore-faq-root .faq-ip-bubble-tail {
    right: 12px;
    bottom: -5px;
    width: 8px;
    height: 5px;
  }
}

@media (max-width: 480px) {
  .encore-faq-root {
    padding: 6px 10px 36px;
  }

  .encore-faq-root .faq-hero-card {
    padding: 18px 14px;
  }

  .encore-faq-root .faq-search {
    padding: 0 14px;
    margin-top: 18px;
  }

  .encore-faq-root .faq-search input {
    font-size: 14.5px;
    padding: 12px 0;
  }

  .encore-faq-root .faq-quick {
    gap: 6px;
    margin-top: 14px;
  }

  .encore-faq-root .faq-quick a {
    padding: 5px 11px;
    font-size: 12px;
  }

  .encore-faq-root .faq-q {
    font-size: 15px;
  }

  .encore-faq-root .faq-a-inner {
    gap: 6px;
  }

  .encore-faq-root .faq-ip-q-outside {
    width: 34px;
  }

  .encore-faq-root .faq-ip-q-svg {
    width: 34px;
    height: 26px;
  }

  .encore-faq-root .faq-ip-q-img {
    width: 34px;
    height: 26px;
  }

  .encore-faq-root .faq-ip-box {
    padding: 12px 14px;
    border-radius: 18px;
    gap: 10px;
  }

  .encore-faq-root .faq-ip-text {
    font-size: 13.5px;
    line-height: 1.65;
  }

  .encore-faq-root .faq-ip-figure {
    width: 130px;
    height: 76px;
  }

  .encore-faq-root .faq-ip-custom-img {
    max-height: 68px;
    max-width: 118px;
  }

  .encore-faq-root .faq-ip-bubble {
    font-size: 12px;
    padding: 3px 10px;
    margin-bottom: 1px;
  }

  .encore-faq-root .faq-ip-bubble-tail {
    right: 9px;
    bottom: -4px;
    width: 7px;
    height: 4px;
  }

  .encore-faq-root .help-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .encore-faq-root .help-card {
    padding: 18px 15px;
  }
}



