/* 入口三頁（登入頁、首頁、遊戲廳）與遊戲頁的新外殼（2026-10-12 過夜任務）。
   全部收在 body.v2 底下：公會內部的頁面沒有這個 class，長相完全不變。
   三種設計：.look-a 羅盤、.look-b 平台、.look-c 海報（web/look.js，網址帶 ?look= 切換）。
   長相的差別盡量收在最上面的色票與字型變數裡，版面只在主視覺那一段分開寫。 */

@font-face { font-family: "JU Serif"; src: url("/static/fonts/entry-serif.woff2") format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "JU Sans"; src: url("/static/fonts/entry-sans.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JU Poster"; src: url("/static/fonts/entry-poster.woff2") format("woff2"); font-weight: 700; font-display: swap; }

body.v2 {
  /* 手機瀏覽器的 100vh 比看得到的高（工具列），高度一律寫 calc(N * var(--vh))，見 CLAUDE.md 卡牌對戰的「行動裝置」 */
  --vh: 1vh;
  --v2-ground: #0b0d11;
  --v2-surface: rgba(22, 26, 33, 0.72);
  --v2-surface-solid: #161a21;
  --v2-line: rgba(255, 255, 255, 0.09);
  --v2-line-2: rgba(255, 255, 255, 0.16);
  --v2-ink: #f1f3f6;
  --v2-ink-2: #a3acb7;
  --v2-ink-3: #6c7682;
  --v2-accent: #ff7a2f;
  --v2-accent-ink: #1a0f06;
  --v2-accent-2: #ffb36b;
  --v2-glow: rgba(255, 122, 47, 0.35);
  --v2-radius: 14px;
  --v2-display: "JU Sans", var(--font);
  --v2-display-weight: 900;
  --v2-gutter: 28px;
  --v2-max: 1240px;
  background: var(--v2-ground);
  color: var(--v2-ink);
  touch-action: manipulation;
  overflow-x: clip;      /* 海報版的卡片牆是滿版的，伸出去的部分不能讓整頁可以左右捲 */
}
@supports (height: 1svh) { body.v2 { --vh: 1svh; } }

/* 羅盤：古地圖與黃銅，沿用首頁的背景圖（製作人用 Midjourney 生的羅盤） */
body.v2.look-a {
  --v2-ground: #0a0b0d;
  --v2-surface: rgba(18, 17, 15, 0.66);
  --v2-surface-solid: #17150f;
  --v2-line: rgba(226, 166, 90, 0.16);
  --v2-line-2: rgba(226, 166, 90, 0.34);
  --v2-ink-2: #b9ad9b;
  --v2-ink-3: #7d7363;
  --v2-accent: #e2a65a;
  --v2-accent-ink: #1b1206;
  --v2-accent-2: #ffd79a;
  --v2-glow: rgba(226, 166, 90, 0.32);
  --v2-display: "JU Serif", "Noto Serif TC", "PMingLiU", serif;
  --v2-radius: 10px;
}
/* 平台：遊戲平台式的展示，冷色的深底、圓角大、亮色漸層的按鈕 */
body.v2.look-b {
  --v2-ground: #090b12;
  --v2-surface: rgba(20, 24, 36, 0.78);
  --v2-surface-solid: #141826;
  --v2-line: rgba(140, 160, 255, 0.10);
  --v2-line-2: rgba(140, 160, 255, 0.22);
  --v2-ink-2: #a6aec4;
  --v2-ink-3: #6b738c;
  --v2-accent: #ff8a3d;
  --v2-accent-2: #7a6bff;
  --v2-glow: rgba(122, 107, 255, 0.35);
  --v2-radius: 18px;
}
/* 海報：滿版的卡片牆、粗體的招牌字、洋紅到橘的漸層 */
body.v2.look-c {
  --v2-ground: #0f0812;
  --v2-surface: rgba(30, 16, 34, 0.78);
  --v2-surface-solid: #1e1022;
  --v2-line: rgba(255, 120, 170, 0.12);
  --v2-line-2: rgba(255, 120, 170, 0.28);
  --v2-ink-2: #c8adc3;
  --v2-ink-3: #8a6f86;
  --v2-accent: #ff4f7b;
  --v2-accent-ink: #fff;
  --v2-accent-2: #ffb547;
  --v2-glow: rgba(255, 79, 123, 0.4);
  --v2-display: "JU Poster", "JU Sans", var(--font);
  --v2-display-weight: 700;
  --v2-radius: 20px;
}

body.v2 a:hover { text-decoration: none; }
body.v2 main { max-width: var(--v2-max); padding: 28px var(--v2-gutter) 96px; }

/* ---------------------------------------------------------------- 版頭 */

body.v2 .top {
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 10px 22px;
  min-height: 60px;
  padding: 10px var(--v2-gutter);
  background: color-mix(in srgb, var(--v2-ground) 78%, transparent);
  border-bottom: 1px solid var(--v2-line);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
}
body.v2 .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15.5px;
  letter-spacing: 0.08em;
  color: var(--v2-ink);
}
body.v2 .brand svg { flex: none; color: var(--v2-accent); }
body.v2 .nav { gap: 6px 10px; font-size: 14.5px; flex-wrap: nowrap; }
body.v2 .nav a, body.v2 .nav .tokens, body.v2 .nav .gear {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--v2-ink-2);
  transition: background 0.15s ease, color 0.15s ease;
}
body.v2 .nav a:hover, body.v2 .nav .gear:hover { color: var(--v2-ink); background: rgba(255, 255, 255, 0.06); }
body.v2 .nav .who { padding-left: 4px; min-width: 0; }
body.v2 .nav .who img { width: 30px; height: 30px; box-shadow: 0 0 0 2px var(--v2-line-2); }
/* 沒有 Discord 頭像：名字的第一個字 */
.v2-ava { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; font-size: 14px; font-weight: 700; color: var(--v2-accent-ink); background: var(--v2-accent); border-radius: 50%; box-shadow: 0 0 0 2px var(--v2-line-2); }
body.v2 .nav .tokens { background: rgba(255, 255, 255, 0.05); border: 1px solid var(--v2-line); padding: 0 14px 0 10px; }
body.v2 .nav .tokens svg { color: var(--v2-accent); }
body.v2 .nav .gear { width: 38px; padding: 0; justify-content: center; }
body.v2 .nav .out { color: var(--v2-ink-3); }
body.v2 .nav .v2-login {
  color: var(--v2-accent-ink);
  background: var(--v2-accent);
  font-weight: 700;
  padding: 0 20px;
}
body.v2 .nav .v2-login:hover { color: var(--v2-accent-ink); background: var(--v2-accent-2); }

/* ---------------------------------------------------------------- 按鈕 */

.v2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 26px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--v2-ink);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--v2-line-2);
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.2s ease, border-color 0.15s ease;
}
.v2-btn:hover { color: var(--v2-ink); background: rgba(255, 255, 255, 0.1); transform: translateY(-1px); }
.v2-btn:focus-visible { outline: 2px solid var(--v2-accent); outline-offset: 3px; }
.v2-btn-main { color: var(--v2-accent-ink); background: var(--v2-accent); border-color: transparent; box-shadow: 0 8px 28px var(--v2-glow); }
.v2-btn-main:hover { color: var(--v2-accent-ink); background: var(--v2-accent-2); }
.look-b .v2-btn-main { color: #fff; background: linear-gradient(100deg, var(--v2-accent), #ff5f8a 55%, var(--v2-accent-2)); }
.look-b .v2-btn-main:hover { color: #fff; filter: brightness(1.08); background: linear-gradient(100deg, var(--v2-accent), #ff5f8a 55%, var(--v2-accent-2)); }
.look-c .v2-btn-main { color: #fff; background: linear-gradient(100deg, var(--v2-accent), var(--v2-accent-2)); }
.look-c .v2-btn-main:hover { color: #fff; filter: brightness(1.08); background: linear-gradient(100deg, var(--v2-accent), var(--v2-accent-2)); }

/* 加入 Discord 遊戲廳頻道：Discord 的品牌色 */
.v2-invite { color: #fff; }
.v2-btn.v2-invite { background: #5865f2; border-color: transparent; box-shadow: 0 8px 26px rgba(88, 101, 242, 0.32); }
.v2-btn.v2-invite:hover { color: #fff; background: #6a75f5; }
.v2-btn-ghost.v2-invite { min-height: 42px; padding: 0 18px; font-size: 14.5px; box-shadow: none; }
.v2-invite svg { flex: none; }

.v2-chip {
  display: inline-block;
  padding: 3px 11px;
  font-style: normal;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--v2-accent-ink);
  background: var(--v2-accent);
  border-radius: 999px;
}
.look-c .v2-chip { color: #fff; background: linear-gradient(100deg, var(--v2-accent), var(--v2-accent-2)); }

/* 「N 人遊玩中」 */
.v2-online { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--v2-ink-2); }
.v2-online[hidden] { display: none; }
.v2-online i { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.6); animation: v2-ping 2.2s ease-out infinite; }
.v2-online b { font-family: var(--f-num); font-size: 16px; color: var(--v2-ink); font-variant-numeric: tabular-nums; }
@keyframes v2-ping { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(61, 220, 132, 0); } }

/* ---------------------------------------------------------------- 整頁的背景 */

.v2-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--v2-ground); }
.look-a .v2-bg {
  background:
    radial-gradient(ellipse at 70% 10%, rgba(226, 166, 90, 0.10), transparent 55%),
    linear-gradient(180deg, rgba(10, 11, 13, 0.55) 0%, rgba(10, 11, 13, 0.82) 45%, #0a0b0d 85%),
    url("/static/home-bg.webp") 65% 0 / cover no-repeat,
    var(--v2-ground);
}
.look-b .v2-bg {
  background:
    radial-gradient(60% 50% at 15% 0%, rgba(122, 107, 255, 0.20), transparent 70%),
    radial-gradient(50% 45% at 95% 10%, rgba(255, 138, 61, 0.14), transparent 70%),
    var(--v2-ground);
}
.look-c .v2-bg {
  background:
    radial-gradient(70% 60% at 50% -10%, rgba(255, 79, 123, 0.25), transparent 70%),
    radial-gradient(40% 40% at 100% 60%, rgba(255, 181, 71, 0.10), transparent 70%),
    var(--v2-ground);
}

/* ---------------------------------------------------------------- 標題字 */

.v2-eyebrow {
  margin: 0 0 10px;
  font-family: var(--f-label);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--v2-accent);
}
.v2-title {
  margin: 0;
  font-family: var(--v2-display);
  font-weight: var(--v2-display-weight);
  font-size: clamp(64px, 10vw, 128px);
  line-height: 1;
  letter-spacing: 0.04em;
}
.look-a .v2-title {
  background: linear-gradient(180deg, #fff6e6 10%, #f1c98b 55%, #b9773a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 24px rgba(0, 0, 0, 0.6));
}
.look-b .v2-title { letter-spacing: 0.01em; }
.look-c .v2-title {
  background: linear-gradient(100deg, #fff 0%, #ffd6e2 30%, var(--v2-accent-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 8px 30px rgba(255, 79, 123, 0.45));
  letter-spacing: 0.02em;
}
.v2-tag { margin: 18px 0 0; font-size: 18px; color: var(--v2-ink-2); }
.v2-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.v2-hero-copy .v2-online { margin-top: 22px; }
.v2-h1, .v2-h2, .v2-shelf h2 { font-family: var(--v2-display); font-weight: var(--v2-display-weight); letter-spacing: 0.04em; }
.v2-h2 { margin: 0 0 18px; font-size: 26px; }

/* ---------------------------------------------------------------- 登入頁的主視覺 */

.v2-guest main { padding-top: 0; }
.v2-hero { position: relative; display: grid; align-items: center; min-height: min(640px, calc(78 * var(--vh))); padding: 40px 0 56px; }

/* 羅盤：左邊字、右邊三張卡片扇形疊起來 */
.v2-hero-a { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; }
.v2-fan { position: relative; height: min(500px, calc(62 * var(--vh))); }
.v2-fan img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  height: 82%;
  aspect-ratio: 720 / 926;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(226, 166, 90, 0.35);
  transform: translate(calc(-50% + (var(--i) - 1) * 46%), -50%) rotate(calc((var(--i) - 1) * 9deg)) translateY(calc((var(--i) - 1) * (var(--i) - 1) * 6%));
  animation: v2-float 7s ease-in-out infinite;
  animation-delay: calc(var(--i) * -2.3s);
}
.v2-fan img:nth-child(2) { z-index: 2; height: 92%; }
@keyframes v2-float { 50% { translate: 0 -10px; } }

/* 平台：左邊字、右邊輪播 */
.v2-hero-b { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); gap: 36px; }

/* 海報：滿版的卡片牆在後面，字置中 */
.v2-hero-c { justify-items: center; text-align: center; min-height: min(700px, calc(84 * var(--vh))); margin: 0 calc(50% - 50vw); padding: 60px var(--v2-gutter) 72px; overflow: hidden; isolation: isolate; }
.v2-hero-c .v2-actions { justify-content: center; }
.v2-hero-c .v2-hero-copy { position: relative; z-index: 1; }
.v2-hero-c .v2-tag { color: #f3dbe9; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8); }
.v2-hero-c .v2-eyebrow { text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9); }
.v2-marquee {
  position: absolute;
  inset: -10% -20%;
  z-index: -1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  transform: rotate(-9deg);
  opacity: 0.9;
}
.v2-marquee::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 40% 42% at 50% 52%, rgba(15, 8, 18, 0.97), rgba(15, 8, 18, 0.9) 45%, rgba(15, 8, 18, 0.5) 75%, rgba(15, 8, 18, 0.32) 100%),
    linear-gradient(180deg, var(--v2-ground) 0%, transparent 18%, transparent 80%, var(--v2-ground) 100%);
}
.v2-mq-row { overflow: hidden; }
.v2-mq-row > div { display: flex; gap: 18px; width: max-content; animation: v2-mq 90s linear infinite; }
.v2-mq-row.rev > div { animation-direction: reverse; animation-duration: 110s; }
.v2-mq-row img { width: 170px; height: auto; aspect-ratio: 720 / 926; border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
@keyframes v2-mq { to { transform: translateX(-50%); } }

/* ---------------------------------------------------------------- 英豪傳的大橫幅 */

.v2-section { margin-top: 36px; }
.v2-hero + .v2-section { margin-top: 0; }
.v2-feature {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  min-height: 300px;
  padding: 32px 44px;
  overflow: hidden;
  color: #fff;
  border-radius: var(--v2-radius);
  isolation: isolate;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55), inset 0 0 0 1px var(--v2-line-2);
}
.v2-feature-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 9, 12, 0.92) 0%, rgba(8, 9, 12, 0.55) 45%, rgba(8, 9, 12, 0.05) 100%),
    url("/static/games/tcg/ui/bg-menu.webp") 70% 40% / cover no-repeat;
  transition: transform 0.8s ease;
}
.v2-feature:hover .v2-feature-bg { transform: scale(1.04); }
.v2-feature-card {
  width: 170px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.18);
  transform: rotate(-4deg);
  transition: transform 0.35s ease;
}
.v2-feature:hover .v2-feature-card { transform: rotate(-2deg) translateY(-6px) scale(1.03); }
.v2-feature-text { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; min-width: 0; }
.v2-feature-text strong, .v2-slide-text strong { text-wrap: balance; }
.v2-feature-text strong {
  font-family: var(--v2-display);
  font-weight: var(--v2-display-weight);
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.1;
  letter-spacing: 0.05em;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.7);
}
.v2-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 15px;
  font-weight: 700;
  color: var(--v2-accent-ink);
  background: var(--v2-accent);
  border-radius: 999px;
  box-shadow: 0 8px 24px var(--v2-glow);
  transition: background 0.15s ease;
}
.v2-feature:hover .v2-cta, .v2-slide:hover .v2-cta { background: var(--v2-accent-2); }
.look-b .v2-cta, .look-c .v2-cta { color: #fff; background: linear-gradient(100deg, var(--v2-accent), var(--v2-accent-2)); }
.v2-feature .gm-live, .v2-slide .gm-live { top: 16px; right: 16px; }
.v2-feature:focus-visible, .v2-slide:focus-visible { outline: 2px solid var(--v2-accent); outline-offset: 3px; }

/* 羅盤：橫幅四角的黃銅角飾 */
.look-a .v2-feature::before {
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  border: 1px solid rgba(226, 166, 90, 0.28);
  border-radius: 6px;
  -webkit-mask: linear-gradient(#000 0 0) top left / 40px 40px no-repeat, linear-gradient(#000 0 0) top right / 40px 40px no-repeat,
                linear-gradient(#000 0 0) bottom left / 40px 40px no-repeat, linear-gradient(#000 0 0) bottom right / 40px 40px no-repeat;
  mask: linear-gradient(#000 0 0) top left / 40px 40px no-repeat, linear-gradient(#000 0 0) top right / 40px 40px no-repeat,
        linear-gradient(#000 0 0) bottom left / 40px 40px no-repeat, linear-gradient(#000 0 0) bottom right / 40px 40px no-repeat;
}

/* ---------------------------------------------------------------- 平台版的輪播 */

.v2-spotlight {
  position: relative;
  min-height: 360px;
  aspect-ratio: 16 / 8;
  overflow: hidden;
  border-radius: var(--v2-radius);
  background: var(--v2-surface-solid);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55), inset 0 0 0 1px var(--v2-line-2);
  isolation: isolate;
}
.v2-pagehead + .v2-spotlight { aspect-ratio: 16 / 6; }
.v2-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 36px 48px 64px;
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0s linear 0.7s;
}
.v2-slide.on { opacity: 1; visibility: visible; transition: opacity 0.7s ease; z-index: 1; }
.v2-slide-bg {
  position: absolute;
  inset: -40px;
  z-index: -1;
  background: var(--art) center 30% / cover no-repeat;
  filter: blur(26px) saturate(1.35) brightness(0.6);
  transform: scale(1.1);
}
/* 英豪傳有一張橫的主畫面背景（城堡），直接用、不模糊 */
.v2-slide-wide .v2-slide-bg { inset: 0; background-position: 70% 40%; filter: none; transform: none; }
.v2-slide-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(9, 11, 18, 0.85), rgba(9, 11, 18, 0.25) 65%, rgba(9, 11, 18, 0.1)); }
.v2-slide-text { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; min-width: 0; }
.v2-slide-text strong { font-family: var(--v2-display); font-weight: 900; font-size: clamp(30px, 3.3vw, 52px); line-height: 1.1; letter-spacing: 0.03em; text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6); }
.v2-slide-card { align-self: center; height: auto; width: min(250px, 21vw); aspect-ratio: 720 / 926; border-radius: 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); transform: translateY(14px) rotate(3deg); transition: transform 0.9s cubic-bezier(.2, .8, .2, 1); }
.v2-slide.on .v2-slide-card { transform: none; }
.v2-pagehead + .v2-spotlight .v2-slide-card { width: min(200px, 16vw); }
.v2-dots { position: absolute; left: 48px; bottom: 22px; z-index: 2; display: flex; gap: 8px; }
.v2-dots button { width: 26px; height: 6px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.28); cursor: pointer; transition: width 0.3s ease, background 0.3s ease; }
.v2-dots button.on { width: 44px; background: #fff; }

/* ---------------------------------------------------------------- 卡片牆 */

body.v2 .gm-games { gap: 20px; }
body.v2 .gm-gamecard { border-radius: var(--v2-radius); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--v2-line); }
body.v2 .gm-gamecard:hover, body.v2 .gm-gamecard:focus-visible { box-shadow: 0 0 0 2px var(--v2-accent), 0 20px 44px rgba(0, 0, 0, 0.6), 0 0 34px var(--v2-glow); }
.look-a .gm-gamecard { box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(226, 166, 90, 0.22); }
.v2-shelf { margin-top: 40px; }
.v2-shelf h2 { margin: 0 0 16px; font-size: 22px; }
.look-c .gm-gamecard { transform: rotate(0); }
.look-c .gm-gamecard:hover, .look-c .gm-gamecard:focus-visible { transform: translateY(-8px) rotate(-1.2deg); }

/* ---------------------------------------------------------------- 遊戲廳大廳的標題列 */

.v2-pagehead { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 8px 0 22px; }
.v2-h1 { margin: 0; font-size: clamp(34px, 4.4vw, 48px); line-height: 1.1; }
.look-a .v2-h1 { color: #f6e3c4; }
.v2-spacer { flex: 1; }

/* ---------------------------------------------------------------- 首頁（登入後） */

.v2-home {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  grid-template-rows: 1fr 1fr auto;
  gap: 18px;
  min-height: calc(100 * var(--vh) - 200px);
  max-height: 720px;
  padding-top: 16px;
}
.v2-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  min-height: 170px;
  margin: 0;
  padding: 26px 28px;
  overflow: hidden;
  color: var(--v2-ink);
  background: var(--v2-surface);
  border: 1px solid var(--v2-line-2);
  border-radius: var(--v2-radius);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  backdrop-filter: blur(12px) saturate(1.15);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
  isolation: isolate;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
a.v2-tile:hover, a.v2-tile:focus-visible { color: var(--v2-ink); transform: translateY(-3px); border-color: var(--v2-accent); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5), 0 0 30px var(--v2-glow); outline: none; }
.v2-tile > i { display: block; width: 46px; height: 46px; color: var(--v2-accent); }
.v2-tile > i svg { width: 100%; height: 100%; }
.v2-tile h2 { margin: 0; font-family: var(--v2-display); font-weight: var(--v2-display-weight); font-size: 34px; line-height: 1.15; letter-spacing: 0.08em; }
.v2-go {
  position: absolute;
  top: 22px;
  right: 22px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--v2-ink-2);
  border: 1px solid var(--v2-line-2);
  border-radius: 50%;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
a.v2-tile:hover .v2-go { color: var(--v2-accent-ink); background: var(--v2-accent); border-color: transparent; transform: translateX(3px); }
.v2-tile-games { grid-row: 1 / 3; justify-content: flex-end; }
.v2-tile-games .v2-online { position: relative; }
/* 遊戲廳那一格上面斜斜地排一列卡片圖 */
.v2-strip {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: -1;
  display: flex;
  gap: 14px;
  padding: 28px 0 0 28px;
  transform: rotate(-6deg) translateY(-18px);
  transform-origin: 0 0;
  -webkit-mask: linear-gradient(180deg, #000 70%, transparent 100%);
  mask: linear-gradient(180deg, #000 70%, transparent 100%);
  transition: transform 0.6s ease;
}
.v2-strip img { flex: none; width: clamp(110px, 12vw, 168px); height: auto; border-radius: 10px; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55); }
a.v2-tile-games:hover .v2-strip { transform: rotate(-6deg) translate(-26px, -18px); }
.v2-tile-bonus { justify-content: flex-end; }
.v2-tile-bonus .v2-btn { align-self: flex-start; min-height: 44px; padding: 0 30px; margin-top: 4px; }
.v2-got { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--v2-accent); }
.v2-got b { font-family: var(--f-num); font-size: 32px; line-height: 1; }
.v2-got svg { width: 22px; height: 22px; }
.v2-done { border-color: var(--v2-line); }
.v2-locked { opacity: 0.5; cursor: not-allowed; }
.v2-locked > i { color: var(--v2-ink-3); }
/* 首頁的加入頻道：橫跨兩欄的一條 */
.v2-tile.v2-tile-invite {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 64px;
  padding: 14px 24px;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(100deg, rgba(88, 101, 242, 0.92), rgba(88, 101, 242, 0.7));
  border-color: rgba(140, 150, 255, 0.5);
}
.v2-tile.v2-tile-invite:hover { color: #fff; border-color: #aab2ff; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(88, 101, 242, 0.5); }
.v2-tile-invite svg { width: 26px; height: 26px; }

/* 首頁三顆大按鈕的底圖（public/home/tile-*.webp，有才鋪）。
   2026-10-12 製作人要的：低調、低亮度、帶一點模糊 —— Niji 生的小物件（撲克牌、硬幣）細看不合理，不要讓人看清楚。
   圖放在 ::before（才能單獨模糊、壓暗，不影響字），上面再壓一層下暗上透的漸層讓字站得住。
   強弱在這三個變數：--tile-blur 模糊、--tile-dim 亮度、--tile-sat 飽和度；滑鼠移上去稍微亮一點。 */
.v2-tile.v2-has-art {
  --tile-blur: 0.5px;
  --tile-dim: 0.35;
  --tile-sat: 0.8;
  background: var(--v2-surface-solid);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.v2-tile.v2-has-art::before {
  content: "";
  position: absolute;
  inset: calc(-3 * var(--tile-blur));          /* 模糊的邊緣會透出底色，往外多鋪一點再被圓角裁掉 */
  z-index: -2;
  background: var(--tile-art) center / cover no-repeat;
  filter: blur(var(--tile-blur)) brightness(var(--tile-dim)) saturate(var(--tile-sat));
  transition: filter 0.35s ease, transform 0.6s ease;
}
.v2-tile.v2-has-art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(10, 11, 13, 0.1) 0%, rgba(10, 11, 13, 0.35) 50%, rgba(10, 11, 13, 0.82) 100%);
}
a.v2-tile.v2-has-art:hover::before { filter: blur(var(--tile-blur)) brightness(calc(var(--tile-dim) + 0.12)) saturate(var(--tile-sat)); transform: scale(1.03); }
.v2-tile.v2-has-art h2 { text-shadow: 0 2px 14px rgba(0, 0, 0, 0.75); }
.v2-tile.v2-has-art.v2-locked::before { filter: blur(var(--tile-blur)) brightness(0.3) saturate(0.2); }
@media (prefers-reduced-motion: reduce) { .v2-tile.v2-has-art::before { transition: none; } }

/* 首頁的背景：羅盤版就是原本那張羅盤圖，壓暗得少一點 */
body.v2.look-a:has(.v2-home) .v2-bg {
  background:
    linear-gradient(180deg, rgba(10, 11, 13, 0.7) 0%, rgba(10, 11, 13, 0.25) 35%, rgba(10, 11, 13, 0.4) 70%, rgba(10, 11, 13, 0.9) 100%),
    url("/static/home-bg.webp") center / cover no-repeat, var(--v2-ground);
}

/* ---------------------------------------------------------------- 窄螢幕 */

@media (max-width: 1100px) {
  .v2-hero-b { grid-template-columns: 1fr; }
  .v2-hero-b .v2-spotlight { order: -1; }
}
@media (max-width: 900px) {
  .v2-hero-a { grid-template-columns: 1fr; gap: 8px; text-align: center; }
  .v2-hero-a .v2-actions { justify-content: center; }
  .v2-fan { order: -1; height: 260px; }
  .v2-hero { min-height: 0; padding: 24px 0 40px; }
  .v2-feature { gap: 22px; padding: 26px; min-height: 0; }
  .v2-feature-card { width: 120px; }
  .v2-home { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto auto; max-height: none; min-height: 0; }
  .v2-tile-games { grid-column: 1 / -1; grid-row: auto; min-height: 260px; }
}
@media (max-width: 620px) {
  body.v2 { --v2-gutter: 16px; }
  body.v2 main { padding: 16px var(--v2-gutter) 64px; }
  body.v2 .top { min-height: 54px; padding: 8px var(--v2-gutter); gap: 8px; flex-wrap: nowrap; }
  body.v2 .brand span { display: none; }
  body.v2 .nav { gap: 2px; margin-left: auto; min-width: 0; }
  body.v2 .nav a, body.v2 .nav .tokens, body.v2 .nav .gear { height: 36px; padding: 0 8px; }
  body.v2 .nav .who { font-size: 0; gap: 0; padding: 0 4px; }      /* 名字收起來，只留頭像 */
  body.v2 .nav .who .badge { display: none; }
  body.v2 .nav .tokens { padding: 0 10px 0 8px; }
  body.v2 .nav .tokens b { font-size: 15.5px; }
  .v2-title { font-size: clamp(56px, 19vw, 84px); }
  .v2-tag { font-size: 16px; margin-top: 12px; }
  .v2-actions { flex-direction: column; gap: 10px; margin-top: 24px; }
  .v2-actions .v2-btn { width: 100%; }
  .v2-fan { height: 210px; }
  .v2-hero-c { min-height: 0; padding: 48px var(--v2-gutter) 52px; }
  .v2-mq-row img { width: 110px; }
  .v2-feature { min-height: 180px; padding: 20px; }
  .v2-feature-card { width: 88px; }
  .v2-feature-text { gap: 10px; }
  .v2-feature-text strong { font-size: clamp(20px, 6.4vw, 26px); letter-spacing: 0.02em; }
  .v2-cta { padding: 8px 16px; font-size: 14px; }
  .v2-spotlight, .v2-pagehead + .v2-spotlight { aspect-ratio: auto; min-height: 250px; }
  .v2-slide { grid-template-columns: 1fr 104px; padding: 22px 20px 44px; gap: 14px; }
  .v2-slide-card, .v2-pagehead + .v2-spotlight .v2-slide-card { width: 104px; }
  .v2-slide-text strong { font-size: clamp(20px, 6.4vw, 26px); }
  .v2-dots { left: 20px; bottom: 16px; }
  .v2-section { margin-top: 24px; }
  .v2-h2 { font-size: 21px; margin-bottom: 14px; }
  .v2-shelf { margin-top: 28px; }
  .v2-shelf h2 { font-size: 19px; }
  body.v2 .gm-games { gap: 12px; }
  /* 平台版的分類在手機上是一排橫向捲動 */
  .look-b .v2-row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--v2-gutter); margin: 0 calc(-1 * var(--v2-gutter)); padding: 4px var(--v2-gutter) 14px; scrollbar-width: none; }
  .look-b .v2-row::-webkit-scrollbar { display: none; }
  .look-b .v2-row .gm-gamecard { flex: 0 0 42%; scroll-snap-align: start; }
  .v2-pagehead { margin: 4px 0 16px; }
  .v2-pagehead .v2-invite { width: 100%; order: 3; }
  .v2-home { grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 4px; }
  .v2-tile { min-height: 150px; padding: 18px; }
  .v2-tile-games { min-height: 250px; }
  .v2-tile h2 { font-size: 26px; }
  .v2-tile > i { width: 36px; height: 36px; }
  .v2-go { top: 14px; right: 14px; width: 32px; height: 32px; }
  .v2-strip img { width: 92px; }
  .v2-strip { padding: 20px 0 0 18px; gap: 10px; }
  .v2-tile-bonus .v2-btn { padding: 0 22px; }
  .v2-got b { font-size: 26px; }
}
@media (pointer: coarse) { body.v2 input, body.v2 select, body.v2 textarea { font-size: max(16px, 1em); } }

@media (prefers-reduced-motion: reduce) {
  .v2-fan img, .v2-mq-row > div, .v2-online i { animation: none; }
  .v2-slide, .v2-slide-card, .v2-feature-bg, .v2-feature-card, .v2-strip, .v2-tile { transition: none; }
}
