/* GAMEZH 流動頁籤：桌機左側直列、手機底部橫列 */
.flow-nav {
  --fn-line: rgba(232, 214, 170, .22);
  --fn-icon: rgba(241, 238, 230, .62);
  --fn-active: #f6e3a6;
  position: fixed; z-index: 60;
  display: flex;
  -webkit-user-select: none; user-select: none;
}
.flow-nav a {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 3px;
  color: var(--fn-icon); text-decoration: none;
  transition: color .35s, transform .35s, filter .35s;
}
.flow-nav a svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.flow-nav a:hover { color: #fff; }
.flow-nav a.on { color: var(--fn-active); filter: drop-shadow(0 0 10px rgba(246, 227, 166, .55)); }
.flow-nav a.on svg { fill: rgba(246, 227, 166, .18); }
.flow-nav a:focus-visible { outline: 1px solid var(--fn-active); outline-offset: 4px; }
.flow-nav .fn-short { display: none; }
.flow-nav .fn-label { font-size: 11px; letter-spacing: .06em; line-height: 1.2; white-space: nowrap; }
.flow-nav .fn-glow { position: absolute; z-index: 1; pointer-events: none; overflow: visible; }
.flow-nav .fn-glow path { fill: none; stroke-linecap: round; }
.flow-nav .fn-spark { position: absolute; z-index: 1; width: 3px; height: 3px; border-radius: 50%; background: #fff6d8; box-shadow: 0 0 6px 1px rgba(255, 236, 180, .8); pointer-events: none; opacity: 0; animation: fn-twinkle 2.6s ease-in-out infinite; }
.flow-nav .fn-spark:nth-of-type(2) { animation-delay: .7s; width: 2px; height: 2px; }
.flow-nav .fn-spark:nth-of-type(3) { animation-delay: 1.4s; }
.flow-nav .fn-spark:nth-of-type(4) { animation-delay: 2s; width: 2px; height: 2px; }
.flow-nav .fn-glow.fn-flash { animation: fn-flash .38s cubic-bezier(.2,.9,.3,1); }
@keyframes fn-flash { 0% { opacity: 0; transform: scaleX(.35); filter: brightness(2.2); } 55% { opacity: 1; filter: brightness(1.6); } 100% { opacity: 1; transform: none; filter: none; } }
@keyframes fn-twinkle { 0%, 100% { opacity: 0; transform: translateY(4px) scale(.6); } 45% { opacity: 1; transform: translateY(-4px) scale(1); } }

/* 桌機：放在上方標題列中間 */
@media (min-width: 1100px) {
  .flow-nav {
    top: env(safe-area-inset-top); left: 50%; transform: translateX(-50%);
    height: 64px; flex-direction: row; align-items: stretch; gap: 4px; padding: 0 8px;
  }
  .flow-nav::before { /* 標題列底部的線 */
    content: ""; position: absolute; left: -60px; right: -60px; bottom: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--fn-line) 18%, var(--fn-line) 82%, transparent);
  }
  .flow-nav a { flex-direction: row; gap: 8px; padding: 0 16px; }
  .flow-nav a svg { width: 18px; height: 18px; }
  .flow-nav .fn-label { font-size: 14px; letter-spacing: .04em; }
  .flow-nav .fn-glow { left: 0; top: calc(100% - 36px); width: 100%; height: 72px; }
  body.has-flow-nav .hd .nav { display: none !important; }
  body.has-flow-nav .hd .wrap > .btn:last-child { margin-left: auto; }
}

/* 手機／平板：底部橫列 */
@media (max-width: 1099.98px) {
  .flow-nav {
    left: 0; right: 0; bottom: 0;
    padding: 6px max(6px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
    background: linear-gradient(to top, rgba(8, 10, 18, .97), rgba(11, 14, 23, .88));
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  }
  .flow-nav::before { /* 橫線 */
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--fn-line) 15%, var(--fn-line) 85%, transparent);
  }
  .flow-nav a { flex: 1; min-height: 52px; min-width: 0; }
  .flow-nav a svg { width: 22px; height: 22px; }
  .flow-nav .fn-full { display: none; }
  .flow-nav .fn-short { display: inline; }
  .flow-nav .fn-glow { left: 0; top: -36px; width: 100%; height: 72px; }
  body.has-flow-nav { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  body.has-flow-nav .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .flow-nav .fn-spark { animation: none; opacity: .7; }
  .flow-nav a { transition: none; }
}
