/* ═══ 澎湖乞龜擲筊（夏季旅展限定）═══ */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  background: linear-gradient(180deg, #1a1035 0%, #2b1550 45%, #4a1d5e 100%);
  color: #fff5e6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── 漂浮燈籠 ── */
.lanterns { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.lantern {
  position: absolute;
  font-size: 2.2rem;
  opacity: .55;
  animation: floatLantern 6s ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(255, 140, 60, .6));
}
.l1 { left: 6%;  top: 12%; animation-delay: 0s; }
.l2 { left: 88%; top: 8%;  animation-delay: 1.2s; font-size: 1.7rem; }
.l3 { left: 12%; top: 62%; animation-delay: 2.4s; font-size: 1.5rem; }
.l4 { left: 90%; top: 55%; animation-delay: .8s; }
.l5 { left: 48%; top: 4%;  animation-delay: 1.8s; font-size: 1.4rem; }
@keyframes floatLantern {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%       { transform: translateY(-16px) rotate(3deg); }
}

/* ── Header / Footer ── */
.qg-header {
  position: relative; z-index: 2; padding: 18px 24px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}
.qg-logo { color: #ffd970; text-decoration: none; font-weight: 800; font-size: 1.05rem; }
.qg-header-line {
  display: inline-flex; align-items: center; gap: 7px;
  background: #06c755; color: #fff; text-decoration: none;
  font-weight: 800; font-size: .92rem;
  padding: 8px 18px; border-radius: 30px;
  box-shadow: 0 4px 14px rgba(6, 199, 85, .4);
  transition: transform .15s;
}
.qg-header-line:hover { transform: translateY(-1px); }
.qg-header-line i { font-size: 1.15rem; }
.qg-header-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.qgui-lang-switch {
  display: inline-flex; background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 217, 112, .3); border-radius: 30px;
  padding: 3px; gap: 2px;
}
.qgui-lang-btn {
  background: transparent; border: none; cursor: pointer;
  color: rgba(255, 245, 230, .7); font-family: inherit;
  font-size: .82rem; font-weight: 700;
  padding: 6px 13px; border-radius: 24px;
  transition: background .15s, color .15s;
}
.qgui-lang-btn:hover { color: #ffd970; }
.qgui-lang-btn.active { background: #ffd970; color: #3a1f00; }
.qg-footer {
  position: relative; z-index: 2;
  text-align: center; padding: 28px 16px 36px;
  font-size: .8rem; color: rgba(255, 245, 230, .55); line-height: 2;
}
.qg-footer a { color: #ffd970; text-decoration: none; }

/* ── 主要區塊 ── */
.qg-main { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; padding: 0 20px; }

.qg-hero { text-align: center; padding: 12px 0 26px; }
.qg-kicker {
  display: inline-block; background: rgba(255, 90, 60, .25);
  border: 1px solid rgba(255, 150, 90, .5); color: #ffb27a;
  padding: 4px 16px; border-radius: 20px; font-size: .85rem; font-weight: 700;
  letter-spacing: 2px;
}
.qg-hero h1 {
  font-size: clamp(2.6rem, 9vw, 3.6rem); font-weight: 900; letter-spacing: 12px;
  margin: 14px 0 10px; color: #ffd970;
  text-shadow: 0 0 30px rgba(255, 200, 80, .45);
}
.qg-sub { font-size: 1.05rem; line-height: 1.8; color: rgba(255, 245, 230, .85); }
.qg-sub strong { color: #ffd970; }

/* ── 遊戲區 ── */
.qg-game {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 217, 112, .25);
  border-radius: 24px; padding: 30px 22px 26px; text-align: center;
  backdrop-filter: blur(4px);
}

.qg-turtle-zone { margin-bottom: 8px; }
.qg-turtle {
  font-size: 4.2rem; display: inline-block;
  filter: drop-shadow(0 0 18px rgba(255, 215, 100, .55));
  transition: transform .4s;
}
.qg-turtle.happy { animation: turtleBounce .6s ease 2; }
@keyframes turtleBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-14px) scale(1.12); }
}

.qg-progress { display: flex; justify-content: center; gap: 14px; margin: 12px 0 4px; }
.qg-dot {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255, 217, 112, .4); color: rgba(255, 245, 230, .4);
  font-weight: 900; font-size: 1.05rem; transition: all .35s;
}
.qg-dot.lit {
  background: radial-gradient(circle at 35% 30%, #ffe9a8, #f0a832);
  color: #7a4a00; border-color: #ffd970;
  box-shadow: 0 0 18px rgba(255, 200, 80, .7);
  transform: scale(1.1);
}

/* ── 筊杯 ── */
.qg-blocks {
  display: flex; justify-content: center; gap: 34px;
  padding: 26px 0 10px; perspective: 500px; min-height: 128px;
}
.qg-jiao { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.qg-jiao-body {
  width: 96px; height: 46px; position: relative;
  background: linear-gradient(180deg, #d9452e 0%, #a32615 100%);
  border-radius: 48px 48px 10px 10px;          /* 凸面朝上（預設） */
  box-shadow: inset 0 6px 10px rgba(255, 255, 255, .28),
              inset 0 -4px 8px rgba(0, 0, 0, .35),
              0 8px 18px rgba(0, 0, 0, .45);
  transition: border-radius .2s, background .2s;
}
.qg-jiao-body.flat {
  border-radius: 10px 10px 48px 48px;          /* 平面朝上 */
  background: linear-gradient(180deg, #e8654e 0%, #c03a24 100%);
  box-shadow: inset 0 4px 6px rgba(255, 255, 255, .35),
              inset 0 -6px 10px rgba(0, 0, 0, .3),
              0 8px 18px rgba(0, 0, 0, .45);
}
.qg-jiao-body.spin { animation: jiaoSpin 1.1s cubic-bezier(.3, .6, .4, 1); }
@keyframes jiaoSpin {
  0%   { transform: translateY(0) rotateX(0) rotateZ(0); }
  30%  { transform: translateY(-90px) rotateX(360deg) rotateZ(140deg); }
  60%  { transform: translateY(-30px) rotateX(680deg) rotateZ(280deg); }
  80%  { transform: translateY(-8px) rotateX(700deg) rotateZ(350deg); }
  100% { transform: translateY(0) rotateX(720deg) rotateZ(360deg); }
}
.qg-jiao-label { font-size: .82rem; color: rgba(255, 245, 230, .75); min-height: 1.2em; font-weight: 700; }

/* ── 結果與按鈕 ── */
.qg-result {
  min-height: 2.6em; font-size: 1.08rem; font-weight: 700; line-height: 1.7;
  color: #ffd970; display: flex; align-items: center; justify-content: center;
  padding: 4px 8px;
}
.qg-result.fail  { color: #ff9d8a; }
.qg-result.holy  { color: #7dffb0; }

.qg-throw-row {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 14px; margin-top: 10px;
}
.qg-throw-btn {
  background: linear-gradient(135deg, #f5b942, #e8542f);
  color: #fff; border: none; cursor: pointer;
  font-size: 1.25rem; font-weight: 900; letter-spacing: 6px;
  padding: 15px 58px; border-radius: 40px;
  box-shadow: 0 6px 24px rgba(232, 84, 47, .5);
  transition: transform .15s, box-shadow .15s;
  font-family: inherit;
}
.qg-throw-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(232, 84, 47, .65); }
.qg-throw-btn:disabled { opacity: .45; cursor: not-allowed; }
.qg-throw-btn-auto {
  background: linear-gradient(135deg, #4fd1c5, #0b8cc4);
  font-size: 1.05rem; letter-spacing: 2px;
  padding: 15px 34px;
  box-shadow: 0 6px 24px rgba(11, 140, 196, .5);
}
.qg-throw-btn-auto:hover:not(:disabled) { box-shadow: 0 10px 30px rgba(11, 140, 196, .65); }
.qg-hint { margin-top: 12px; font-size: .8rem; color: rgba(255, 245, 230, .5); }

/* ── 中獎畫面 ── */
.qg-win { margin-top: 26px; }
.qg-win-card {
  background: linear-gradient(160deg, rgba(255, 217, 112, .18), rgba(255, 140, 60, .1));
  border: 2px solid #ffd970; border-radius: 24px;
  padding: 34px 24px; text-align: center;
  box-shadow: 0 0 44px rgba(255, 200, 80, .3);
  animation: winPop .5s ease;
}
@keyframes winPop { 0% { transform: scale(.85); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.qg-win-turtle { font-size: 4rem; margin-bottom: 8px; }
.qg-win-card h2 { color: #ffd970; font-size: 1.8rem; letter-spacing: 4px; margin-bottom: 10px; }
.qg-win-desc { line-height: 1.9; margin-bottom: 18px; }
.qg-win-desc strong { color: #ffd970; }
.qg-code-box {
  background: rgba(0, 0, 0, .35); border: 1px dashed rgba(255, 217, 112, .6);
  border-radius: 14px; padding: 12px 18px; margin: 0 auto 20px; max-width: 320px;
}
.qg-code-label { font-size: .78rem; color: rgba(255, 245, 230, .6); letter-spacing: 3px; }
.qg-code { font-family: "Consolas", monospace; font-size: 1.5rem; font-weight: 900; color: #ffd970; letter-spacing: 2px; margin-top: 4px; }
.qg-line-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: #06c755; color: #fff; text-decoration: none;
  font-size: 1.1rem; font-weight: 900;
  padding: 14px 34px; border-radius: 40px;
  box-shadow: 0 6px 22px rgba(6, 199, 85, .45);
  transition: transform .15s;
}
.qg-line-btn:hover { transform: translateY(-2px); }
.qg-line-btn i { font-size: 1.5rem; }
.qg-win-note { margin-top: 16px; font-size: .85rem; line-height: 1.9; color: rgba(255, 245, 230, .75); }
.qg-win-note strong { color: #ffd970; }

/* ── 文化介紹 ── */
.qg-culture {
  margin-top: 34px; background: rgba(255, 255, 255, .05);
  border-radius: 20px; padding: 26px 24px; line-height: 1.9;
}
.qg-culture h2 { color: #ffd970; font-size: 1.25rem; margin-bottom: 12px; }
.qg-culture p { color: rgba(255, 245, 230, .85); font-size: .95rem; }
.qg-culture strong { color: #ffb27a; }
.qg-jiao-guide { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
.qg-guide-item {
  display: flex; align-items: center; gap: 12px;
  background: rgba(0, 0, 0, .22); border-radius: 12px; padding: 10px 16px; font-size: .9rem;
}
.qg-guide-item strong { color: #ffd970; min-width: 3em; }
.qg-guide-icon { font-size: 1.3rem; }
.qg-cta-row { margin-top: 14px; }
.qg-link { color: #7dd6ff; font-weight: 800; text-decoration: none; }
.qg-link:hover { text-decoration: underline; }

/* ── 手機 ── */
@media (max-width: 480px) {
  .qg-hero h1 { letter-spacing: 8px; }
  .qg-blocks { gap: 22px; }
  .qg-jiao-body { width: 82px; height: 40px; }
  .qg-throw-btn { padding: 14px 44px; font-size: 1.15rem; }
  .qg-throw-row { flex-direction: column; gap: 10px; }
  .qg-throw-btn-auto { padding: 13px 34px; font-size: 1rem; }
  .qg-header { justify-content: center; text-align: center; }
  .qg-header-right { justify-content: center; width: 100%; }
  .qgui-lang-btn { padding: 6px 10px; font-size: .78rem; }
}
