/* 爆爆英雄 — 玩家問卷活動入口 ＋ 問卷介面（v7.05）
   為什麼獨立成檔：
     · 這份樣式一萬多字元，寫進 index.html 會整份算進「合併全文」2,600,000 預算
     · 放在 ui/ 底下才會被 tools/sync-public.js 同步到公開目錄（漏了線上就破版）
   ⚠ 載入順序：一定要排在 index.html 的 <style> 與 ui/home/home.css 之後，
     同特異度時靠「後載入」勝出。

   美術來源說明：盾犀動畫**直接用既有的 spr/pet-anim-guard-idle.webp**（12 幀精靈圖），
   沒有重新生成、沒有程式自繪角色。搖晃／浮動／金光／星光全部是 CSS 圖層。 */

/* ============================================================
   一、首頁活動卡
   ============================================================ */
/* ── v7.05.1（製作人）：首頁入口從「橫式寬卡」改成「小直式徽章」 ────────
   規格：
     · 只留標題「填問卷！送隨從！」，副標退成 aria-label／title（視覺隱藏，資訊不丟）
     · 一顆金底框 + 犀牛從框頂探出來 —— 跟新手教學兔頭同一個道理：圖比框高，
       頭部凸出框外，看起來才「活的」而且比純文字更顯眼
     · fixed 貼左邊緣、疊在滿版主視覺上（不佔文流，不會把「繼續冒險」往下推）
     · 位置由 js/questui.js 量 .tutfab 的實際 rect 算出來 → 三種裝置都落在兔子正上方
       （製作人給的三張配置圖都是這個關係，所以不需要為每個裝置寫死座標）
     · 只在首頁顯示；進遊戲／開面板／開問卷一律收起（跟 .tutfab 同一套 body 狀態）
   ⚠ 這裡的 display 由 CSS 控制（不是 inline style）：show(EL.card, true) 是清掉 inline，
     所以 body 狀態一變就會跟著收合，不必再寫 JS。 */
#questCard {
  position: fixed; z-index: 9;
  left: 8px; top: 180px;
  /* max-content：標題用 max-content 撐開，字型 fallback（系統字 → 思源）讓字變寬時
     不會被容器裁掉。實測 PC 上「填問卷！送隨從！」最後一個「！」會被切一半。 */
  width: max-content; max-width: calc(100vw - 12px);
  display: none; flex-direction: column; align-items: center;
  /* v7.05.1（製作人）：犀牛會凸出框頂約 13px —— 那一段也算卡片的高度，
     否則 getBoundingClientRect() 的 top 是「框頂」而不是「犀牛角」，
     排位置時犀牛角就會壓到上面的版本膠囊／排行榜卡（實測三種裝置都壓 5px）。 */
  gap: 3px; padding: 14px 0 0; margin: 0; border: 0; background: none;
  color: #fff; text-align: center; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
body.on-home:not(.in-game):not(.hs-open) #questCard { display: flex; }
#questCard:hover .qcBox, #questCard:focus-visible .qcBox { filter: brightness(1.06); }
#questCard:active { transform: translateY(1px); }
#questCard:focus-visible { outline: 3px solid #ffe188; outline-offset: 3px; border-radius: 16px; }

/* 柔光：放在框後面，呼吸但不閃（原本的 58% 寬大光暈在這個尺寸會糊成一團） */
#questCard .qcGlow {
  position: absolute; z-index: 0; pointer-events: none;
  left: 50%; top: 10px; width: 76px; height: 66px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 206, 92, .48), rgba(255, 190, 60, .13) 58%, transparent 74%);
  filter: blur(5px);
  animation: qcGlow 3.8s ease-in-out infinite;
}
@keyframes qcGlow {
  0%, 100% { opacity: .45; transform: translateX(-50%) scale(.94); }
  50%      { opacity: .95; transform: translateX(-50%) scale(1.06); }
}

/* 底框：跟兔頭框同一套語言（白邊＋金底＋外圈金環），只大一點點 ——
   裡面要放的是「橫向」的犀牛，跟直立的兔頭不同 */
#questCard .qcBox {
  position: relative; z-index: 1;
  width: 60px; height: 50px; border-radius: 15px;
  background: radial-gradient(circle at 50% 26%, #fffdf6, #ffd98a 62%, #f0a63c);
  border: 2px solid #fffdf4;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .42), 0 0 0 2px rgba(255, 196, 70, .78),
              0 0 13px rgba(255, 180, 50, .5);
  overflow: visible;                  /* 犀牛要凸出框頂 */
  animation: qcBob 2.8s ease-in-out infinite;
}
@keyframes qcBob {
  0%, 100% { transform: translateY(0) rotate(-1.6deg); }
  50%      { transform: translateY(-2px) rotate(1.6deg); }
}
/* v7.05.1：金色脈動光環 —— 製作人要求「特別設計過、更顯眼」。
   小尺寸徽章要靠「動」而不是靠「大」：一圈金光每 2.4 秒往外擴散一次，
   視線會自己被抓過去，而且它不佔任何版面（absolute + 不影響排版）。 */
#questCard .qcBox::after {
  content: ''; position: absolute; inset: -4px; z-index: -1;
  border-radius: 18px; border: 2px solid rgba(255, 206, 92, .9);
  pointer-events: none;
  animation: qcRing 2.4s cubic-bezier(.22, .61, .36, 1) infinite;
}
@keyframes qcRing {
  0%   { opacity: .85; transform: scale(.94); }
  70%  { opacity: 0;    transform: scale(1.24); }
  100% { opacity: 0;    transform: scale(1.24); }
}

/* 盾犀：12 幀精靈圖（1872×153）＋ 走路 ＋ 上下浮 ＋ 左右搖
   background-size:1200% → 圖片寬 = 元素寬 ×12
   第 n 幀的左緣 = -nW → background-position-x 的百分比 P 滿足 -11W·P = -nW → P = n/11
   所以 12 個位置是 0%, 9.0909%, 18.1818% … 100%（不是 n/12）。
   尺寸：寬 64、高 64×153/156 ≈ 62.8，框只有 50 高、bottom 0 →
   角與背甲凸出框頂約 12.8px（兔子耳朵凸 7px，犀牛體型大所以凸多一點才看得出來）。
   動物本身比框寬 2px ×2，視覺上「站滿」框面，不會像貼紙。 */
#questCard .qcPet {
  position: absolute; z-index: 1; left: 50%; bottom: 0;
  /* v7.05.1：精靈圖每幀 156×153，但犀牛本體只有 131×138（上留白 12、下留白 3）。
     所以元素要放到 70 寬，本體的角才會凸出框頂 13px；用 64 時看起來只凸 2px。 */
  width: 70px; height: calc(70px * 153 / 156);
  transform: translateX(-50%);
  transform-origin: 50% 88%;
  background-image: url("../../spr/pet-anim-guard-idle.webp");
  background-repeat: no-repeat;
  background-size: 1200% 100%;
  background-position: 0 50%;
  animation: qcWalk 1.5s step-end infinite,
             qcFloat 2.7s ease-in-out infinite,
             qcSway 4.6s ease-in-out infinite;
  /* 犀牛本身是深灰金屬色，在藍天與金框上容易「糊掉」→ 提亮 + 加飽和 + 兩層暖光 */
  filter: brightness(1.15) contrast(1.04) saturate(1.12)
          drop-shadow(0 3px 5px rgba(50, 25, 0, .5))
          drop-shadow(0 0 7px rgba(255, 196, 80, .55));
  pointer-events: none;
}
@keyframes qcWalk {
  0%       { background-position-x: 0%; }
  8.3333%  { background-position-x: 9.0909%; }
  16.6667% { background-position-x: 18.1818%; }
  25%      { background-position-x: 27.2727%; }
  33.3333% { background-position-x: 36.3636%; }
  41.6667% { background-position-x: 45.4545%; }
  50%      { background-position-x: 54.5455%; }
  58.3333% { background-position-x: 63.6364%; }
  66.6667% { background-position-x: 72.7273%; }
  75%      { background-position-x: 81.8182%; }
  83.3333% { background-position-x: 90.9091%; }
  91.6667% { background-position-x: 100%; }
  100%     { background-position-x: 0%; }
}
@keyframes qcFloat {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -2.5px; }
}
/* 搖晃故意放慢（4.6s 一輪、只有 ±2.4 度）——「輕微」不是「晃到眼花」 */
@keyframes qcSway {
  0%, 100% { rotate: -1.6deg; }
  50%      { rotate: 1.6deg; }
}

/* 星光：三顆、錯開延遲；整組 12 秒一輪，後 3 秒淡出 → 間歇（不是一直閃）
   座標改成相對「框」（百分比跟著框的 60×50 走，不會因為標題換行而跑位） */
#questCard .qcStar {
  position: absolute; z-index: 2; pointer-events: none;
  width: 6px; height: 6px;
  background: radial-gradient(circle, #fffbe8 0%, rgba(255, 226, 140, .95) 42%, rgba(255, 200, 80, 0) 70%);
  border-radius: 50%;
  opacity: 0;
  animation: qcStar 12s linear infinite;
}
#questCard .qcStar.s1 { left: 82%; top: -8%; animation-delay: 0s; }
#questCard .qcStar.s2 { left: 94%; top: 42%; width: 5px; height: 5px; animation-delay: 1.4s; }
#questCard .qcStar.s3 { left: -4%; top: 16%; width: 4px; height: 4px; animation-delay: 2.6s; }
@keyframes qcStar {
  0%      { opacity: 0; transform: scale(.4); }
  6%      { opacity: 1; transform: scale(1.15); }
  12%     { opacity: .15; transform: scale(.7); }
  18%     { opacity: .95; transform: scale(1); }
  26%     { opacity: 0; transform: scale(.4); }
  74%     { opacity: 0; transform: scale(.4); }   /* 74%~100% 休息 → 間歇 */
  100%    { opacity: 0; transform: scale(.4); }
}

/* 標題：橙底白字小藥丸（跟「新手教學」那顆同尺寸語彙）。
   原本的金色漸層文字在這個尺寸 + 橙底上會糊掉，改成實心白字。 */
#questCard .qcT {
  position: relative; z-index: 1;
  /* 圓角用 7px 而不是 999：膠囊的半徑等於高度一半（約 9px），會蓋到左右內距，
     字的頭尾看起來像被切掉（實測「填」的左豎與「！」的尾端都缺一角，
     scrollWidth 其實沒有溢出 → 是圓弧的視覺效果，不是真的裁切）。
     製作人配置圖上的標籤也是圓角矩形，不是膠囊。 */
  display: block; padding: 2px 8px; border-radius: 7px;
  background: linear-gradient(180deg, #ff9a2e, #d9540c);
  border: 1px solid rgba(255, 232, 178, .85);
  /* 10.5px 是「390 寬還能讀」與「不佔版面」的折衷。
     不要加 text-shadow：10px 的中文字加上陰影會把小字糊成一團（實測「填」看起來像「埴」）。
     深橙底 + 純白字 + 無陰影，筆畫最乾淨。 */
  color: #fff; font: 900 10.5px/1.2 system-ui, 'Noto Sans TC', sans-serif;
  letter-spacing: 0; white-space: nowrap;
  text-shadow: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .45);
}
/* 副標：視覺隱藏，但螢幕閱讀器與 title 仍讀得到（獎勵條件不能只有圖示） */
#questCard .qcS {
  position: absolute; z-index: -1;
  width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
#questCard .qcGo { display: none; }

/* 領完獎：動畫全部停、整顆降飽和，但**留著**當永久意見回饋入口（標題改「給我們建議」） */
#questCard.qcDone .qcBox {
  background: radial-gradient(circle at 50% 30%, #f2f7ff, #c8d8ec 66%, #93a9c4);
  border-color: #eaf3ff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .38), 0 0 0 2px rgba(150, 190, 240, .5);
  animation: none;
}
#questCard.qcDone .qcPet { animation: none; filter: grayscale(.7) opacity(.62); }
#questCard.qcDone .qcGlow,
#questCard.qcDone .qcStar { display: none; animation: none; }
#questCard.qcDone .qcT {
  background: linear-gradient(180deg, #4a6b92, #2b3f57);
  border-color: rgba(150, 190, 240, .7);
}

/* 窄螢幕：整顆再收一點（不讓它比兔子的視覺重量高出太多） */
@media (max-width: 430px) {
  #questCard .qcBox { width: 56px; height: 46px; }
  #questCard .qcPet { width: 65px; height: calc(65px * 153 / 156); }
  #questCard .qcT { font-size: 10px; padding: 2px 8px; }
}
/* 手機矮橫屏（844×390 這類）：左側 UI 柱 + 底部「強制更新」之間只剩 140px，
   徽章與兔頭加起來 136px —— 幾乎沒有餘裕。這裡把徽章壓到 60px 高，
   讓整串（徽章 → 兔頭 → 新手教學）不會壓到「強制更新」。 */
/* 844×390 這種極矮橫屏：左側從「排行榜卡下緣」到「強制更新」只有 131px，
   塞「徽章 + 兔頭 + 兩個間距」需要 136px —— 差 5px，硬塞就是按鈕黏在一起。
   解法是整組等比收一級（框 44×30、犀牛 46、字 8.5），
   讓出 15px 給間距。1080×492 以上不受影響（那邊空間夠，維持正常尺寸）。 */
@media (max-height: 440px) and (min-aspect-ratio: 1/1) {
  #questCard { gap: 2px; padding-top: 12px; }
  #questCard .qcGlow { top: 8px; width: 60px; height: 52px; }
  #questCard .qcBox { width: 44px; height: 34px; border-radius: 11px; }
  #questCard .qcPet { width: 46px; height: calc(46px * 153 / 156); }
  #questCard .qcT { font-size: 9px; padding: 1px 6px; }
}
@media (prefers-reduced-motion: reduce) {
  #questCard .qcBox,
  #questCard .qcBox::after,
  #questCard .qcPet,
  #questCard .qcGlow,
  #questCard .qcStar { animation: none !important; }
  #questCard .qcStar { opacity: .45; }
}

/* ============================================================
   二、問卷覆蓋層
   ============================================================ */
#questWrap {
  position: fixed; inset: 0; z-index: 8600;
  display: none;
  /* 全站 canvas 有 background:#0a0f1c → 覆蓋層一定要自己指定底色，否則會透出黑塊 */
  background: radial-gradient(120% 90% at 50% 0%, #16283f 0%, #0a1220 55%, #060a12 100%);
  color: #e8f1ff;
  -webkit-user-select: none; user-select: none;
  overscroll-behavior: contain;
}
#questWrap.on { display: flex; flex-direction: column; }

#questWrap .qTop {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) clamp(12px, 3vw, 22px) 8px;
}
/* min-width:0 + 省略號：日／韓標題（アンケート／설문조사）比中文長，
   五顆語言鈕又佔掉 131px，不截斷就會把「第 N/M 步」與關閉鈕推出畫面。
   （窄螢幕讓一級字：見檔尾的 @media (max-width:430px)） */
#questWrap .qTitle { flex: 1 1 auto; min-width: 0; font-size: clamp(14px, 2vh, 17px); font-weight: 900; letter-spacing: .02em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* v7.06：步數不可以折行。韓文的「1 / 6 단계」在 390 寬會被拆成「1 / 6 단」＋「계」，
   兩行高把標題擠成省略號（實測截圖抓到）。nowrap + flex:0 0 auto 讓它保持一行。 */
#questWrap .qStep { flex: 0 0 auto; white-space: nowrap; font-size: clamp(11px, 1.5vh, 13px); color: #9fc0e6; font-variant-numeric: tabular-nums; }
#questWrap .qX {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(150, 200, 255, .4); background: rgba(12, 24, 40, .9);
  color: #cfe4ff; font-size: 15px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
#questWrap .qX:hover { background: #1b3350; }
#questWrap .qBar { flex: 0 0 auto; height: 5px; margin: 0 clamp(12px, 3vw, 22px) 6px; border-radius: 99px; background: rgba(120, 170, 230, .18); overflow: hidden; }
#questWrap .qBar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #ffd166, #ffb347); transition: width .28s ease; }

#questWrap .qScroll {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: 4px clamp(12px, 3vw, 22px) 16px;
}
#questWrap .qInner { width: min(760px, 100%); margin: 0 auto; }

#questWrap .qSec {
  font-size: clamp(11.5px, 1.6vh, 13px); font-weight: 800; letter-spacing: .08em;
  color: #ffd166; margin: 2px 0 10px;
}
#questWrap .qHelp {
  font-size: clamp(11px, 1.5vh, 12.5px); color: #93aecb; line-height: 1.5;
  margin: -4px 0 12px;
}

#questWrap .qQ {
  margin: 0 0 14px; padding: 12px clamp(10px, 2vw, 14px);
  border-radius: 14px;
  background: rgba(16, 30, 48, .78);
  border: 1px solid rgba(110, 160, 220, .18);
}
#questWrap .qQ.bad { border-color: rgba(255, 120, 120, .7); box-shadow: 0 0 0 2px rgba(255, 120, 120, .12); }
#questWrap .qQt {
  display: block; font-size: clamp(13.5px, 1.95vh, 16px); font-weight: 700; line-height: 1.45;
  margin-bottom: 9px;
}
#questWrap .qQt em { font-style: normal; color: #ff8f8f; margin-left: 3px; }
#questWrap .qQt i { font-style: normal; font-size: .82em; color: #8fa8c6; margin-left: 5px; font-weight: 500; }

/* 選項：整塊可點（手機熱區夠大），選中用金色邊 */
#questWrap .qOpts { display: flex; flex-direction: column; gap: 7px; }
#questWrap .qOpt {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px; border-radius: 11px;
  border: 1px solid rgba(120, 165, 215, .26);
  background: rgba(10, 20, 34, .72);
  color: #dbe9f8; font-size: clamp(12.5px, 1.8vh, 14.5px); line-height: 1.35;
  cursor: pointer; text-align: left; transition: border-color .12s, background .12s;
}
#questWrap .qOpt:hover { border-color: rgba(160, 205, 255, .55); background: rgba(18, 34, 54, .85); }
#questWrap .qOpt[aria-checked="true"] {
  border-color: #ffcf6a; background: linear-gradient(180deg, rgba(74, 56, 18, .92), rgba(42, 32, 12, .92));
  color: #fff2cf; box-shadow: inset 0 0 0 1px rgba(255, 214, 130, .35);
}
#questWrap .qOpt .qBx {
  flex: 0 0 auto; width: 17px; height: 17px; border-radius: 5px;
  border: 2px solid rgba(150, 190, 235, .55); display: flex; align-items: center; justify-content: center;
  font-size: 11px; line-height: 1; color: #201400; font-weight: 900;
}
#questWrap .qOpt.qRadio .qBx { border-radius: 50%; }
#questWrap .qOpt[aria-checked="true"] .qBx { background: #ffd166; border-color: #ffd166; }
#questWrap .qOpt.qDis { opacity: .45; cursor: not-allowed; }

/* 星等列：一列 6 顆（1~5 + 無法評價） */
#questWrap .qStars { display: flex; flex-wrap: wrap; gap: 6px; }
#questWrap .qStar {
  flex: 1 1 auto; min-width: 44px; padding: 8px 6px; border-radius: 10px;
  border: 1px solid rgba(120, 165, 215, .26); background: rgba(10, 20, 34, .72);
  color: #bcd2ea; font-size: clamp(12px, 1.7vh, 14px); font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 3px;
}
#questWrap .qStar:hover { border-color: rgba(160, 205, 255, .55); }
#questWrap .qStar[aria-checked="true"] { border-color: #ffcf6a; background: rgba(74, 56, 18, .9); color: #ffe6a8; }
#questWrap .qStar.qNa { flex: 1 1 100%; font-weight: 600; font-size: clamp(11.5px, 1.6vh, 13px); }

/* 自由文字 */
#questWrap .qTa {
  width: 100%; min-height: 84px; resize: vertical;
  padding: 10px 11px; border-radius: 11px;
  border: 1px solid rgba(120, 165, 215, .3); background: rgba(8, 16, 28, .85);
  color: #e8f1ff; font-size: clamp(12.5px, 1.8vh, 14.5px); line-height: 1.5;
  font-family: inherit; -webkit-user-select: text; user-select: text;
}
#questWrap .qTa:focus { outline: none; border-color: #ffcf6a; }
#questWrap .qCnt { text-align: right; font-size: 11px; color: #8aa3c0; margin-top: 4px; font-variant-numeric: tabular-nums; }

/* 底部按鈕列 */
#questWrap .qFoot {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 9px;
  padding: 10px clamp(12px, 3vw, 22px) calc(env(safe-area-inset-bottom, 0px) + 12px);
  background: linear-gradient(180deg, rgba(6, 10, 18, 0), rgba(6, 10, 18, .92) 34%);
}
#questWrap .qBtn {
  flex: 1 1 auto; min-height: 46px; border-radius: 12px; cursor: pointer;
  font-size: clamp(13.5px, 1.9vh, 15.5px); font-weight: 800; letter-spacing: .02em;
  border: 1px solid rgba(120, 165, 215, .35); background: rgba(16, 30, 48, .9); color: #d8e8fb;
}
#questWrap .qBtn:hover { background: rgba(26, 46, 72, .95); }
#questWrap .qBtn.qPrimary {
  border-color: #ffcf6a; color: #241800;
  background: linear-gradient(180deg, #ffdf8a, #f5b942);
  box-shadow: 0 8px 18px rgba(240, 170, 50, .28);
}
#questWrap .qBtn.qPrimary:hover { filter: brightness(1.05); }
#questWrap .qBtn[disabled] { opacity: .45; cursor: not-allowed; }
#questWrap .qBtn.qBack { flex: 0 0 auto; width: 96px; }
#questWrap .qErr { flex: 1 1 auto; font-size: 12px; color: #ff9d9d; }

/* 領獎結果 */
#questWrap .qDone { text-align: center; padding: clamp(18px, 5vh, 44px) 8px; }
#questWrap .qDone .qPetBig {
  width: clamp(120px, 22vh, 180px); height: calc(clamp(120px, 22vh, 180px) * 153 / 156);
  margin: 0 auto 14px;
  background: url("../../spr/pet-anim-guard-idle.webp") no-repeat 0 50% / 1200% 100%;
  animation: qcWalk 1.15s step-end infinite, qcFloat 2.7s ease-in-out infinite;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .55)) drop-shadow(0 0 22px rgba(255, 200, 90, .55));
}
#questWrap .qDone h3 { margin: 0 0 8px; font-size: clamp(17px, 2.6vh, 22px); color: #ffdf8a; }
#questWrap .qDone p { margin: 0 0 6px; font-size: clamp(12.5px, 1.8vh, 14.5px); color: #c6d8ec; line-height: 1.6; }
#questWrap .qDone .qGold { font-size: clamp(22px, 3.4vh, 30px); font-weight: 900; color: #ffd166; }

/* 語言切換（繁中／英） */
/* v7.06：語言鈕從 2 顆變 5 顆（繁／简／EN／日／한）。
   頂列同時要放「標題＋第 N/M 步＋關閉」，390 寬的手機擠不下原來的
   padding:5px 8px（5 顆約 225px）→ 收成 4px 6px，五顆約 131px。
   標題則加上省略號：日／韓的標題本來就比中文長，寧可截斷也不要撐破。 */
#questWrap .qLang {
  flex: 0 0 auto; display: flex; gap: 2px; padding: 2px;
  border-radius: 9px; background: rgba(10, 20, 34, .8); border: 1px solid rgba(120, 165, 215, .25);
}
#questWrap .qLang button {
  border: 0; background: none; color: #8fa8c6; font-size: 11px; font-weight: 800;
  min-width: 26px; padding: 4px 6px; border-radius: 7px; cursor: pointer;
  line-height: 1.1; white-space: nowrap;
}
#questWrap .qLang button[aria-pressed="true"] { background: rgba(255, 209, 102, .18); color: #ffdf8a; }

@media (min-width: 720px) and (min-height: 560px) {
  #questWrap .qInner { padding: 0 8px; }
  #questWrap .qOpts { gap: 8px; }
}

/* v7.06：窄螢幕（390 這類）標題讓一級。
   預算＝366 − 關閉 34 − 語言鈕 131 − 步數 55 − 三個間距 30 ≈ 116px；
   英文「Player Survey」在 17px 要 105px（實測會截斷），14px 只要 88px。
   只動字級與內距，不動任何文案（已核准的原文一個字都不能改）。
   ⚠ 這一段一定要放在 .qTitle／.qLang button 的規則「後面」：
     選擇器權重相同時，後寫的贏 —— 放前面等於完全沒作用。 */
@media (max-width: 430px) {
  #questWrap .qTitle { font-size: 14px; }
  #questWrap .qLang button { padding: 4px 5px; min-width: 24px; }
}

/* 手機橫屏：高度很吃緊 → 收掉說明、壓縮間距，一頁仍看得到 5 題 */
@media (max-height: 480px) {
  #questWrap .qBar { height: 4px; margin-bottom: 2px; }
  #questWrap .qQ { margin-bottom: 9px; padding: 8px 10px; }
  #questWrap .qQt { margin-bottom: 6px; }
  #questWrap .qOpt { padding: 6px 9px; }
  #questWrap .qFoot { padding-top: 6px; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 6px); }
  #questWrap .qBtn { min-height: 38px; }
}
