/* family_game_box — shared shell theme + console product tokens */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;600;700&family=Fraunces:opsz,wght@9..144,600;9..144,700&display=swap");

:root {
  --ink: #e8f2ec;
  --muted: #8fa399;
  --accent: #3ecf8e;
  --accent-deep: #1a9f68;
  --panel: rgba(18, 32, 28, 0.88);
  --panel-solid: #121f1c;
  --line: rgba(232, 242, 236, 0.12);
  --warn: #e8a04a;
  --danger: #e07060;
  --gold: #d4a84b;
  --silver: #a8b4bc;
  --bronze: #c47a4a;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  --display: "Fraunces", "Songti SC", "Palatino Linotype", serif;
  --sans: "DM Sans", "PingFang SC", "Microsoft YaHei UI", sans-serif;
  --paper: #0c1411;
  --radius: 18px;
  /* Console product layer */
  --console-ink: #f2f7f4;
  --console-muted: #9aac9f;
  --console-surface: rgba(10, 18, 15, 0.92);
  --console-edge: rgba(62, 207, 142, 0.22);
  --console-glow: rgba(62, 207, 142, 0.35);
  --console-focus: 0 0 0 3px rgba(62, 207, 142, 0.55), 0 0 28px rgba(62, 207, 142, 0.25);
  --console-max: 1180px;
  --motion-fast: 0.16s ease;
  --motion-med: 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(900px 480px at 12% -8%, rgba(62, 207, 142, 0.16), transparent 55%),
    radial-gradient(700px 400px at 100% 0%, rgba(232, 160, 74, 0.07), transparent 50%),
    linear-gradient(165deg, #0a1210 0%, #0c1411 45%, #101a16 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(232, 242, 236, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 242, 236, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  z-index: 0;
}

.fgb-shell,
main.fgb-shell {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3.5rem;
}

a { color: var(--accent); }
a:hover { color: #6fe0ab; }

.fgb-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.fgb-brand {
  font-family: var(--display);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
  color: var(--ink);
  text-decoration: none;
}

.fgb-brand span,
.fgb-brand em {
  font-style: italic;
  color: var(--accent);
}

.fgb-page-kicker {
  display: block;
  margin-top: 0.25rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.fgb-nav {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  flex-wrap: wrap;
}

.fgb-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.fgb-chip strong { color: var(--accent); font-weight: 700; }

.fgb-btn,
.fgb-btn-ghost,
.fgb-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.fgb-btn {
  background: linear-gradient(160deg, var(--accent), var(--accent-deep));
  color: #062016;
  border: 0;
}

.fgb-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }

.fgb-btn-ghost,
.fgb-nav-link {
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent);
  border-color: var(--line);
}

.fgb-btn-ghost:hover,
.fgb-nav-link:hover {
  border-color: rgba(62, 207, 142, 0.45);
  background: rgba(62, 207, 142, 0.08);
}

.fgb-page-title {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 0.5rem;
}

.fgb-lead {
  margin: 0 0 1.75rem;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.55;
  max-width: 36rem;
}

.fgb-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.fgb-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  position: relative;
}

.fgb-card:hover {
  transform: translateY(-2px);
  border-color: rgba(62, 207, 142, 0.4);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.42);
}

.fgb-card h2 {
  margin: 0 0 0.45rem;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 700;
}

.fgb-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.fgb-card .meta,
.fgb-card-meta {
  margin-top: 0.85rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
}

.fgb-card.is-locked {
  opacity: 0.5;
  pointer-events: none;
  filter: grayscale(0.25);
}

.fgb-card-daily {
  background: linear-gradient(145deg, rgba(232, 160, 74, 0.22) 0%, rgba(18, 32, 28, 0.92) 55%);
  border: 1.5px solid rgba(232, 160, 74, 0.5);
  box-shadow: 0 18px 48px rgba(232, 160, 74, 0.12);
}

.fgb-card-daily::before {
  content: "今日";
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #1a1208;
  background: var(--warn);
  padding: 3px 9px;
  border-radius: 999px;
}

.fgb-card-daily h2 { color: #ffd59a; }
.fgb-card-daily p { color: #c9b089; }
.fgb-card-daily .meta,
.fgb-card-daily .fgb-card-meta { color: var(--warn); }

.fgb-card-yuwen {
  background: linear-gradient(145deg, rgba(62, 207, 142, 0.2) 0%, rgba(18, 32, 28, 0.92) 55%);
  border: 1.5px solid rgba(62, 207, 142, 0.45);
  box-shadow: 0 18px 48px rgba(62, 207, 142, 0.1);
}
.fgb-card-yuwen::before {
  content: "语文";
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #062016;
  background: var(--accent);
  padding: 3px 9px;
  border-radius: 999px;
}
.fgb-card-yuwen h2 { color: #b7f5d4; }
.fgb-card-yuwen p { color: #9ecfb6; }

.fgb-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.fgb-panel-pad { padding: 1.2rem 1.25rem; }

.fgb-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0 0.85rem;
  flex-wrap: wrap;
}

.fgb-tabs.hidden { display: none; }

.fgb-tab {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.fgb-tab.is-active {
  background: linear-gradient(160deg, var(--accent), var(--accent-deep));
  color: #062016;
  border-color: transparent;
}

.fgb-table {
  width: 100%;
  border-collapse: collapse;
}

.fgb-table th,
.fgb-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.fgb-table th {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
  background: rgba(0, 0, 0, 0.2);
}

.fgb-table tr:last-child td { border-bottom: 0; }

.fgb-rank {
  min-width: 3.2rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.fgb-rank-1 { color: var(--gold); }
.fgb-rank-2 { color: var(--silver); }
.fgb-rank-3 { color: var(--bronze); }

.fgb-rank-1::before { content: "🥇 "; }
.fgb-rank-2::before { content: "🥈 "; }
.fgb-rank-3::before { content: "🥉 "; }

.fgb-row-me td {
  background: rgba(62, 207, 142, 0.1);
}

.fgb-empty {
  padding: 2rem;
  text-align: center;
  color: var(--muted);
}

.fgb-filters {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin: 0 0 0.85rem;
}

.fgb-filters label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.fgb-filters select,
.fgb-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
  font: inherit;
  background: rgba(0, 0, 0, 0.25);
  color: var(--ink);
}

/* Shared auth / shell form fields (login, register, play-gate) */
.fgb-field {
  margin-bottom: 0.75rem;
}
.fgb-field > label {
  display: block;
  margin-bottom: 0.35rem;
}
.fgb-form-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 0.85rem;
  align-items: center;
}
.fgb-muted-link {
  color: var(--muted);
  font-size: 0.9rem;
}
.fgb-muted-link a {
  color: var(--accent);
}

.fgb-my-best {
  margin: 0 0 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
}

.fgb-my-best strong { color: var(--ink); }

.fgb-footer-link {
  margin-top: 1.75rem;
  text-align: center;
  font-size: 0.82rem;
}

.fgb-footer-link a {
  color: var(--muted);
  text-decoration: none;
}

.fgb-footer-link a:hover { color: var(--accent); }

.fgb-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(4, 10, 8, 0.72);
  backdrop-filter: blur(4px);
}

.fgb-modal.hidden { display: none !important; }

.fgb-modal-card {
  width: min(420px, 100%);
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.fgb-modal-card h2 {
  margin: 0 0 0.5rem;
  font-family: var(--display);
}

.fgb-modal-card p {
  margin: 0 0 1rem;
  color: var(--muted);
  line-height: 1.45;
}

.fgb-err {
  color: var(--danger);
  font-size: 0.85rem;
  min-height: 1.2em;
  margin-bottom: 0.5rem;
}

.fgb-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.fgb-frame {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
  /* vh 兜底（钉钉/旧 Android WebView 不认 dvh） */
  height: calc(100vh - 10.5rem);
  height: calc(100dvh - 10.5rem);
  min-height: 280px;
}

.fgb-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: transparent;
}

/* 每日挑战对局中：吃满视口，去掉大块空白底 */
body.fgb-daily-playing {
  overflow: hidden;
  height: 100%;
  height: 100vh;
  height: 100dvh;
}
/* 不用 :has()——旧 WebView 不支持；由 daily.html 同步打到 <html> */
html.fgb-daily-playing {
  height: 100%;
  height: 100vh;
  height: 100dvh;
}
body.fgb-daily-playing .fgb-shell,
body.fgb-daily-playing main.fgb-shell {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: min(1080px, calc(100% - 1rem));
  height: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  padding: 0.45rem 0 0.55rem;
}
body.fgb-daily-playing .fgb-topbar {
  display: none;
}
body.fgb-daily-playing #play {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}
body.fgb-daily-playing .fgb-hud {
  flex: 0 0 auto;
  margin-bottom: 0.45rem;
  gap: 0.45rem;
  padding: 0.55rem 0.75rem;
}
body.fgb-daily-playing .fgb-frame {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  /* height:auto 时子 iframe 的 height:100% 会失效，必须绝对铺满 */
  position: relative;
}
body.fgb-daily-playing .fgb-frame iframe {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

@media (max-height: 720px), (orientation: landscape) and (max-height: 900px) {
  .fgb-shell,
  main.fgb-shell { padding: 0.85rem 0 1rem; }
  .fgb-hud { margin-bottom: 0.45rem; gap: 0.45rem; }
  .fgb-frame {
    height: calc(100vh - 7.5rem);
    height: calc(100dvh - 7.5rem);
    min-height: 240px;
  }
  body.fgb-daily-playing .fgb-shell,
  body.fgb-daily-playing main.fgb-shell { padding: 0.3rem 0 0.35rem; }
  body.fgb-daily-playing .fgb-frame { min-height: 0; height: auto; }
}

@media (max-width: 560px) {
  .fgb-shell,
  main.fgb-shell { width: calc(100% - 1.25rem); padding-top: 1.25rem; }
  .fgb-page-title { font-size: 1.75rem; }
}

/* —— Arena / season dashboard —— */
.fgb-stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin: 0 0 1rem;
  position: relative;
  z-index: 1;
}
.fgb-stat-strip .cell {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
}
.fgb-stat-strip .label { color: var(--muted); font-size: 0.78rem; }
.fgb-stat-strip .value { font-weight: 700; font-size: 1.05rem; margin-top: 0.25rem; word-break: break-word; }

.fgb-arena-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
}
@media (max-width: 720px) {
  .fgb-arena-split { grid-template-columns: 1fr; }
  .fgb-stat-strip { grid-template-columns: 1fr; }
}

.yuwen-next:disabled {
  opacity: 0.45;
  cursor: default;
  filter: none;
  transform: none;
}

.fgb-cta-daily {
  display: inline-block;
  margin-top: 0.65rem;
  border: 0;
  border-radius: 12px;
  padding: 0.7rem 1.1rem;
  font: inherit;
  font-weight: 700;
  color: #062016;
  background: linear-gradient(160deg, var(--accent), var(--accent-deep));
  text-decoration: none;
  cursor: pointer;
}

.fgb-podium {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 0.5rem;
  align-items: end;
  margin: 0 0 1rem;
  position: relative;
  z-index: 1;
}
.fgb-podium .spot {
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem 0.5rem;
  background: rgba(255, 255, 255, 0.03);
}
.fgb-podium .spot .icon {
  display: block;
  font-size: 1.7rem;
  line-height: 1.15;
  margin-bottom: 0.15rem;
}
.fgb-podium .spot .title {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}
.fgb-podium .spot .name { font-weight: 700; margin: 0.25rem 0; color: var(--ink); }
.fgb-podium .spot .score { color: var(--muted); font-size: 0.85rem; }
.fgb-podium-1 { border-color: rgba(212, 168, 75, 0.55); min-height: 7.5rem; color: var(--gold); }
.fgb-podium-2 { border-color: rgba(168, 180, 188, 0.45); min-height: 6rem; color: var(--silver); }
.fgb-podium-3 { border-color: rgba(196, 122, 74, 0.45); min-height: 5.5rem; color: var(--bronze); }

.fgb-podium-list li .medal {
  display: inline-block;
  min-width: 1.6rem;
  margin-right: 0.2rem;
}

.fgb-game-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  margin-bottom: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  text-decoration: none;
  color: inherit;
  position: relative;
  z-index: 1;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.fgb-game-row:hover { border-color: rgba(62, 207, 142, 0.4); transform: translateY(-1px); }
.fgb-game-row .meta { color: var(--muted); font-size: 0.85rem; margin: 0.2rem 0 0; }
.fgb-game-row .go { color: var(--accent); font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
.fgb-game-row.is-muted { opacity: 0.72; }

/* 自由训练：小卡片铺满 */
.fgb-grid-train {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  position: relative;
  z-index: 1;
}
.fgb-train-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.35rem;
  min-height: 5.1rem;
  padding: 0.8rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.fgb-train-card:hover {
  border-color: rgba(62, 207, 142, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.32);
}
.fgb-train-card strong {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.25;
}
.fgb-train-card .meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
}
.fgb-train-card .go {
  margin-top: auto;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.78rem;
}
.fgb-train-card.is-muted { opacity: 0.72; }
.fgb-train-card.is-locked {
  opacity: 0.5;
  pointer-events: none;
  filter: grayscale(0.25);
}
.fgb-train-card.is-ref {
  opacity: 1;
  background: rgba(12, 20, 18, 0.55);
  border-style: dashed;
  border-color: rgba(232, 242, 236, 0.22);
  box-shadow: none;
}
.fgb-train-card.is-ref:hover {
  border-color: rgba(143, 163, 153, 0.55);
  border-style: dashed;
  box-shadow: none;
  transform: translateY(-1px);
}
.fgb-train-card.is-ref strong {
  color: var(--muted);
  font-weight: 600;
}
.fgb-train-card.is-ref .meta { color: rgba(143, 163, 153, 0.9); }
.fgb-train-card.is-ref .go {
  color: var(--muted);
  font-weight: 600;
}
@media (min-width: 900px) {
  .fgb-grid-train { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.75rem; }
}
@media (max-width: 420px) {
  .fgb-grid-train { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.fgb-podium-list {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
}
.fgb-podium-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.92rem;
}
.fgb-podium-list li:last-child { border-bottom: 0; }


/* —— Overlays: toast + confirm (moved from fgb-ui.js inject; dark-hall tokens) —— */
.fgb-confirm-mask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(4, 10, 8, 0.72);
  backdrop-filter: blur(4px);
}
.fgb-confirm-mask.hidden { display: none !important; }

.fgb-confirm-box {
  width: min(360px, 100%);
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 1.25rem 1.2rem 1.1rem;
  color: var(--ink);
}
.fgb-confirm-box p {
  margin: 0 0 1.1rem;
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--ink);
}

.fgb-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}
.fgb-confirm-actions button {
  border-radius: 14px;
  padding: 0.75rem 1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.fgb-confirm-cancel {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}
.fgb-confirm-cancel:hover {
  border-color: rgba(62, 207, 142, 0.35);
  color: var(--ink);
}
.fgb-confirm-ok {
  border: 0;
  color: #062016;
  background: linear-gradient(160deg, var(--accent), var(--accent-deep));
}
.fgb-confirm-ok:hover { filter: brightness(1.06); }

.fgb-toast {
  position: fixed;
  left: 50%;
  bottom: 18%;
  transform: translateX(-50%) translateY(8px);
  z-index: 1100;
  max-width: min(420px, 90vw);
  padding: 0.7rem 1.1rem;
  border-radius: 12px;
  background: rgba(18, 32, 28, 0.96);
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: 0.95rem;
  line-height: 1.4;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.22s ease;
}
.fgb-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.fgb-toast.err {
  background: rgba(224, 112, 96, 0.95);
  border-color: rgba(224, 112, 96, 0.55);
  color: #1a1208;
}
.fgb-toast.ok {
  background: rgba(26, 159, 104, 0.95);
  border-color: rgba(62, 207, 142, 0.45);
  color: #062016;
}

/* —— Game chrome: shared result overlay + skin topbar (P2) —— */
body[data-game-skin] > #fgb-topbar {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100% - 1.5rem));
  margin: 0.85rem auto 0;
  padding-bottom: 0.65rem;
  margin-bottom: 0;
}
body[data-game-skin] > #fgb-topbar + .wrap {
  padding-top: 0.85rem;
}
@media (min-width: 640px) {
  body[data-game-skin] > #fgb-topbar {
    width: min(720px, calc(100% - 1.5rem));
  }
}

.fgb-result {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(4, 10, 8, 0.72);
  backdrop-filter: blur(4px);
}
.fgb-result.hidden { display: none !important; }

.fgb-result-box {
  width: min(400px, 100%);
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 1.35rem 1.25rem 1.2rem;
  color: var(--ink);
}

.fgb-result-title {
  font-family: var(--display);
  font-size: clamp(1.45rem, 4vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
  line-height: 1.15;
}

.fgb-result-sub {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
  min-height: 1.2em;
}

.fgb-result-stats {
  margin: 0 0 1.15rem;
}
.fgb-result-stats .stats-list,
.fgb-result-stats ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.fgb-result-stats li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.95rem;
}
.fgb-result-stats li:last-child { border-bottom: 0; }
.fgb-result-stats strong { color: var(--ink); font-variant-numeric: tabular-nums; }

.fgb-result-actions {
  display: grid;
  gap: 0.55rem;
}
.fgb-result-actions .fgb-btn,
.fgb-result-actions .fgb-btn-ghost {
  width: 100%;
  border-radius: 14px;
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
}

/* —— Pilot skins (Task 8): palette / accents only; shared chrome unchanged —— */
/* Second pilot = stroop (default daily order: 24points → schulte → stroop; 24points deferred to Task 10) */

body[data-game-skin="schulte"] {
  --accent: #45d498;
  --accent-deep: #159a64;
  --skin-glow: rgba(69, 212, 152, 0.22);
  --skin-board-line: rgba(69, 212, 152, 0.3);
  --gold: #e0b34a;
  background:
    radial-gradient(900px 480px at 12% -8%, rgba(69, 212, 152, 0.22), transparent 55%),
    radial-gradient(700px 400px at 100% 0%, rgba(224, 179, 74, 0.09), transparent 50%),
    linear-gradient(165deg, #0a1210 0%, #0c1411 45%, #101a16 100%);
}
body[data-game-skin="schulte"] .target-banner {
  background: rgba(69, 212, 152, 0.12);
  border: 1px solid var(--skin-board-line);
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
}
body[data-game-skin="schulte"] .target-banner em {
  color: var(--gold);
}
body[data-game-skin="schulte"] .board {
  border-radius: 14px;
  padding: 0.35rem;
  background: rgba(18, 32, 28, 0.55);
  box-shadow:
    inset 0 0 0 1px var(--skin-board-line),
    0 14px 36px rgba(0, 0, 0, 0.28);
}
body[data-game-skin="schulte"] .cell {
  border-color: rgba(69, 212, 152, 0.2);
}
body[data-game-skin="schulte"] .cell.ok {
  background: rgba(69, 212, 152, 0.28);
  box-shadow: inset 0 0 0 2px var(--accent);
}
body[data-game-skin="schulte"] .cell.hint {
  box-shadow: inset 0 0 0 2px var(--gold);
}

body[data-game-skin="stroop"] {
  --accent: #6b9bff;
  --accent-deep: #3d6ad6;
  --skin-glow: rgba(107, 155, 255, 0.2);
  --warn: #f0a35a;
  background:
    radial-gradient(900px 480px at 18% -8%, rgba(107, 155, 255, 0.2), transparent 55%),
    radial-gradient(700px 400px at 100% 0%, rgba(240, 163, 90, 0.09), transparent 50%),
    linear-gradient(165deg, #0a1018 0%, #0c1219 45%, #10161e 100%);
}
body[data-game-skin="stroop"] .task-bar {
  background: rgba(107, 155, 255, 0.14);
  color: var(--accent);
  border: 1px solid rgba(107, 155, 255, 0.3);
}
body[data-game-skin="stroop"] .stroop-word {
  text-shadow: 0 0 28px var(--skin-glow);
}
body[data-game-skin="stroop"] .color-grid button {
  border-color: rgba(107, 155, 255, 0.24);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}
body[data-game-skin="stroop"] .mode-btn:hover {
  border-color: rgba(107, 155, 255, 0.45);
}

/* —— Remaining free-train skins (Task 9): light accents; shared chrome unchanged —— */

body[data-game-skin="cancel"] {
  --accent: #3ecf8e;
  --accent-deep: #1a9f68;
  --skin-glow: rgba(62, 207, 142, 0.18);
  background:
    radial-gradient(900px 480px at 10% -8%, rgba(62, 207, 142, 0.16), transparent 55%),
    radial-gradient(700px 400px at 100% 0%, rgba(232, 160, 74, 0.07), transparent 50%),
    linear-gradient(165deg, #0a1210 0%, #0c1411 45%, #101a16 100%);
}
body[data-game-skin="cancel"] .target-bar {
  background: rgba(62, 207, 142, 0.12);
  border: 1px solid rgba(62, 207, 142, 0.28);
  border-radius: 12px;
}
body[data-game-skin="cancel"] .grid-cells button.marked,
body[data-game-skin="cancel"] .grid-cells .cell.marked {
  background: rgba(62, 207, 142, 0.2);
  color: var(--accent);
}

body[data-game-skin="simon"] {
  --accent: #c084fc;
  --accent-deep: #9333ea;
  --skin-glow: rgba(192, 132, 252, 0.2);
  background:
    radial-gradient(900px 480px at 16% -8%, rgba(192, 132, 252, 0.18), transparent 55%),
    radial-gradient(700px 400px at 100% 0%, rgba(62, 207, 142, 0.06), transparent 50%),
    linear-gradient(165deg, #100a16 0%, #120c18 45%, #16101c 100%);
}
body[data-game-skin="simon"] .task-bar {
  background: rgba(192, 132, 252, 0.14);
  color: var(--accent);
  border: 1px solid rgba(192, 132, 252, 0.3);
}
body[data-game-skin="simon"] .mode-btn:hover {
  border-color: rgba(192, 132, 252, 0.45);
}

body[data-game-skin="spot-diff"] {
  --accent: #38bdf8;
  --accent-deep: #0284c7;
  --skin-glow: rgba(56, 189, 248, 0.18);
  background:
    radial-gradient(900px 480px at 14% -8%, rgba(56, 189, 248, 0.18), transparent 55%),
    radial-gradient(700px 400px at 100% 0%, rgba(232, 160, 74, 0.07), transparent 50%),
    linear-gradient(165deg, #0a1218 0%, #0c1419 45%, #10161c 100%);
}
body[data-game-skin="spot-diff"] .diff-panels,
body[data-game-skin="spot-diff"] .diff-panel {
  border-color: rgba(56, 189, 248, 0.28);
}
body[data-game-skin="spot-diff"] .panel-label {
  color: var(--accent);
}
body[data-game-skin="spot-diff"] .mode-btn:hover {
  border-color: rgba(56, 189, 248, 0.45);
}

body[data-game-skin="maze"] {
  --accent: #34d399;
  --accent-deep: #059669;
  --skin-glow: rgba(52, 211, 153, 0.18);
  background:
    radial-gradient(900px 480px at 12% -8%, rgba(52, 211, 153, 0.16), transparent 55%),
    radial-gradient(700px 400px at 100% 0%, rgba(125, 211, 252, 0.08), transparent 50%),
    linear-gradient(165deg, #0a1412 0%, #0c1614 45%, #101a18 100%);
}
body[data-game-skin="maze"] .maze-wrap,
body[data-game-skin="maze"] .maze {
  box-shadow:
    inset 0 0 0 1px rgba(52, 211, 153, 0.25),
    0 12px 32px rgba(0, 0, 0, 0.28);
  border-radius: 12px;
}
body[data-game-skin="maze"] .mode-btn:hover {
  border-color: rgba(52, 211, 153, 0.45);
}

body[data-game-skin="sudoku"] {
  --accent: #fbbf24;
  --accent-deep: #d97706;
  --skin-glow: rgba(251, 191, 36, 0.16);
  background:
    radial-gradient(900px 480px at 12% -8%, rgba(251, 191, 36, 0.14), transparent 55%),
    radial-gradient(700px 400px at 100% 0%, rgba(62, 207, 142, 0.06), transparent 50%),
    linear-gradient(165deg, #12100a 0%, #14120c 45%, #1a1610 100%);
}
body[data-game-skin="sudoku"] .sudoku-wrap,
body[data-game-skin="sudoku"] .sudoku {
  box-shadow:
    inset 0 0 0 1px rgba(251, 191, 36, 0.28),
    0 12px 32px rgba(0, 0, 0, 0.28);
  border-radius: 10px;
}
body[data-game-skin="sudoku"] .mode-btn:hover {
  border-color: rgba(251, 191, 36, 0.45);
}
body[data-game-skin="sudoku"] .choice-row button.active {
  color: #1a1208;
}

/* —— Yuwen + 24points skins (Task 10) —— */

body[data-game-skin="yuwen"] {
  --accent: #f0c14a;
  --accent-deep: #c4922a;
  --gold: #f0c14a;
  --skin-glow: rgba(240, 193, 74, 0.16);
  background:
    radial-gradient(900px 480px at 14% -8%, rgba(240, 193, 74, 0.14), transparent 55%),
    radial-gradient(700px 400px at 100% 0%, rgba(62, 207, 142, 0.07), transparent 50%),
    linear-gradient(165deg, #12100a 0%, #14120c 45%, #1a1610 100%);
}
body[data-game-skin="yuwen"] .yuwen-card:hover {
  border-color: rgba(240, 193, 74, 0.5);
}
body[data-game-skin="yuwen"] .yuwen-lane h2 {
  color: var(--gold);
}

body[data-game-skin="24points"],
body[data-game-skin="24points-library"] {
  --accent: #3ecf8e;
  --accent-deep: #1a9f68;
  --skin-glow: rgba(62, 207, 142, 0.18);
  background:
    radial-gradient(900px 480px at 12% -8%, rgba(62, 207, 142, 0.18), transparent 55%),
    radial-gradient(700px 400px at 100% 0%, rgba(232, 160, 74, 0.08), transparent 50%),
    linear-gradient(165deg, #0a1210 0%, #0c1411 45%, #101a16 100%);
}
body[data-game-skin="24points"] .brand em,
body[data-game-skin="24points-library"] .brand em {
  color: var(--accent);
}
body[data-game-skin="24points"] .card,
body[data-game-skin="24points-library"] .card {
  border-color: rgba(62, 207, 142, 0.2);
}
body[data-game-skin="24points-library"] > #fgb-topbar {
  width: min(920px, calc(100% - 1.5rem));
}

/* —— P3 touch + landscape polish (Task 11) —— */
/* Audit: shared chrome controls should be ≥44px; game board .actions stay compact in landscape */

.fgb-btn,
.fgb-btn-ghost,
.fgb-nav-link {
  min-height: 44px;
  min-width: 44px;
  padding: 0.65rem 1.15rem;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.fgb-chip {
  min-height: 44px;
  padding: 0.55rem 1rem;
  box-sizing: border-box;
}

.fgb-chip [data-fgb-logout],
.fgb-chip [data-fgb-rename] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 0.4rem;
  margin-left: 0.15rem;
  box-sizing: border-box;
}

.fgb-confirm-actions button {
  min-height: 48px;
  box-sizing: border-box;
}

.fgb-result-actions .fgb-btn,
.fgb-result-actions .fgb-btn-ghost {
  min-height: 48px;
  padding: 0.85rem 1rem;
}

/* Safe-area insets (notch / home indicator) */
.fgb-shell,
main.fgb-shell {
  padding-left: max(0px, env(safe-area-inset-left, 0px));
  padding-right: max(0px, env(safe-area-inset-right, 0px));
  padding-bottom: max(3.5rem, calc(2rem + env(safe-area-inset-bottom, 0px)));
}

body[data-game-skin] > #fgb-topbar {
  padding-left: max(0px, env(safe-area-inset-left, 0px));
  padding-right: max(0px, env(safe-area-inset-right, 0px));
}

.fgb-result {
  padding-top: max(1rem, env(safe-area-inset-top, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
  padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
}

.fgb-confirm-mask {
  padding-top: max(1rem, env(safe-area-inset-top, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
  padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
}

body.fgb-daily-playing .fgb-shell,
body.fgb-daily-playing main.fgb-shell {
  padding-bottom: max(0.55rem, env(safe-area-inset-bottom, 0px));
  padding-left: max(0px, env(safe-area-inset-left, 0px));
  padding-right: max(0px, env(safe-area-inset-right, 0px));
}

/* Landscape / short viewport: compress shared chrome like game_common .wrap */
@media (max-height: 720px), (orientation: landscape) and (max-height: 900px) {
  .fgb-topbar {
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
  }
  .fgb-page-kicker { font-size: 0.75rem; margin-top: 0.15rem; }

  body[data-game-skin] > #fgb-topbar {
    margin-top: 0.35rem;
    padding-bottom: 0.35rem;
  }
  body[data-game-skin] > #fgb-topbar + .wrap,
  body[data-game-skin] > #fgb-topbar + .fgb-shell {
    padding-top: 0.35rem;
  }

  .fgb-shell,
  main.fgb-shell {
    padding-bottom: max(1rem, calc(0.75rem + env(safe-area-inset-bottom, 0px)));
  }

  .fgb-result-box {
    width: min(400px, 100%);
    max-height: min(88dvh, 100%);
    overflow: auto;
    padding: 1rem 1rem 0.9rem;
    border-radius: 16px;
  }
  .fgb-result-title { margin-bottom: 0.2rem; }
  .fgb-result-sub { margin-bottom: 0.65rem; }
  .fgb-result-stats { margin-bottom: 0.75rem; }
  .fgb-result-actions { gap: 0.45rem; }

  /* Keep chrome hit targets ≥44px even when page chrome is compressed */
  .fgb-btn,
  .fgb-btn-ghost,
  .fgb-nav-link,
  .fgb-result-actions .fgb-btn,
  .fgb-result-actions .fgb-btn-ghost,
  .fgb-confirm-actions button {
    min-height: 44px;
  }
}

/* —— Console product shell (home / library) —— */
body.fgb-console {
  background:
    radial-gradient(1200px 620px at 8% -12%, rgba(62, 207, 142, 0.2), transparent 58%),
    radial-gradient(900px 520px at 92% 4%, rgba(232, 160, 74, 0.08), transparent 52%),
    radial-gradient(ellipse 140% 80% at 50% 120%, rgba(0, 0, 0, 0.55), transparent 55%),
    linear-gradient(180deg, #050807 0%, #0a1210 38%, #0c1411 100%);
}

body.fgb-console::before {
  opacity: 0.14;
  background-size: 40px 40px;
}

.fgb-console-bezel {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 0 80px rgba(0, 0, 0, 0.45);
}

.fgb-console-shell {
  width: min(var(--console-max), calc(100% - 2.5rem));
  padding-top: 1.35rem;
  padding-bottom: 4rem;
}

.fgb-topbar-console {
  align-items: center;
  padding: 0.65rem 1rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--console-edge);
  border-radius: 20px;
  background: linear-gradient(165deg, rgba(22, 36, 30, 0.92), rgba(12, 20, 17, 0.88));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.fgb-brand-block {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.fgb-brand-console {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.fgb-brand-mark {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 12px;
  background:
    linear-gradient(145deg, var(--accent), var(--accent-deep));
  box-shadow: 0 0 22px var(--console-glow);
  position: relative;
}

.fgb-brand-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 8px;
  border: 2px solid rgba(6, 32, 22, 0.35);
}

.fgb-brand-text em {
  font-style: italic;
  color: var(--accent);
}

.fgb-nav-pill {
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
}

.fgb-console-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.35rem;
  position: relative;
  z-index: 1;
}

.fgb-console-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--console-muted);
}

.fgb-console-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.1rem, 5.5vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
  color: var(--console-ink);
}

.fgb-console-tagline {
  margin: 0.55rem 0 0;
  max-width: 28rem;
  color: var(--console-muted);
  font-size: 1.02rem;
  line-height: 1.5;
}

.fgb-console-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
}

.fgb-console-led {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--console-glow);
  animation: fgb-pulse-led 2.4s ease-in-out infinite;
}

@keyframes fgb-pulse-led {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(0.92); }
}

.fgb-console-clock {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  color: var(--console-ink);
}

.fgb-console-hud {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.fgb-hud-tile {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--console-surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.fgb-hud-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--console-muted);
  letter-spacing: 0.03em;
}

.fgb-hud-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--console-ink);
  font-variant-numeric: tabular-nums;
}

.fgb-hud-value-sm {
  font-size: 0.92rem;
  line-height: 1.35;
  font-weight: 600;
}

.fgb-shelf-head {
  margin-bottom: 0.85rem;
}

.fgb-shelf-title {
  margin: 0;
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.fgb-shelf-sub {
  margin: 0.25rem 0 0;
  color: var(--console-muted);
  font-size: 0.88rem;
}

.fgb-shelf-mini-title {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--console-muted);
  letter-spacing: 0.04em;
}

.fgb-shelf-link {
  margin-top: 0.35rem;
}

.fgb-console-spotlight {
  margin-bottom: 1.75rem;
  position: relative;
  z-index: 1;
}

.fgb-spotlight-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.fgb-spotlight {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 11rem;
  padding: 1.25rem 1.35rem;
  border-radius: 22px;
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: transform var(--motion-med), box-shadow var(--motion-med), border-color var(--motion-fast);
}

.fgb-spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.55;
  background: radial-gradient(120% 90% at 0% 0%, rgba(255, 255, 255, 0.12), transparent 55%);
  pointer-events: none;
}

.fgb-spotlight h3 {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.fgb-spotlight p {
  margin: 0;
  color: rgba(232, 242, 236, 0.78);
  font-size: 0.92rem;
  line-height: 1.45;
  position: relative;
  z-index: 1;
  flex: 1;
}

.fgb-spotlight-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.fgb-spotlight-cta {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 0.85rem;
  padding: 0.55rem 1rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.88rem;
  color: #062016;
  background: linear-gradient(160deg, #fff, rgba(255, 255, 255, 0.82));
  position: relative;
  z-index: 1;
}

.fgb-spotlight-daily {
  background:
    linear-gradient(155deg, rgba(232, 160, 74, 0.35) 0%, rgba(18, 32, 28, 0.15) 42%),
    linear-gradient(200deg, #1a2822, #0f1814);
  border-color: rgba(232, 160, 74, 0.45);
  box-shadow: 0 20px 50px rgba(232, 160, 74, 0.12);
}

.fgb-spotlight-yuwen {
  background:
    linear-gradient(155deg, rgba(62, 207, 142, 0.32) 0%, rgba(18, 32, 28, 0.12) 42%),
    linear-gradient(200deg, #152820, #0f1814);
  border-color: rgba(62, 207, 142, 0.42);
  box-shadow: 0 20px 50px rgba(62, 207, 142, 0.1);
}

.fgb-spotlight:hover,
.fgb-spotlight:focus-visible {
  transform: translateY(-3px) scale(1.01);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.45);
  outline: none;
}

.fgb-spotlight:focus-visible {
  box-shadow: var(--console-focus), 0 28px 60px rgba(0, 0, 0, 0.45);
}

.fgb-spotlight-side {
  align-self: stretch;
}

.fgb-console-shelf {
  position: relative;
  z-index: 1;
}

.fgb-shelf-row {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  overflow-y: visible;
  padding: 0.35rem 0.25rem 1.1rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(62, 207, 142, 0.35) transparent;
}

.fgb-shelf-row::after {
  content: "";
  flex: 0 0 0.25rem;
}

.fgb-cover {
  flex: 0 0 min(168px, 42vw);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--console-surface);
  overflow: hidden;
  transition: transform var(--motion-med), border-color var(--motion-fast), box-shadow var(--motion-med);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.32);
}

.fgb-cover-art {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 5;
  background:
    radial-gradient(90% 80% at 30% 15%, rgba(255, 255, 255, 0.18), transparent 55%),
    linear-gradient(165deg, var(--cover-a, var(--accent)), var(--cover-b, var(--accent-deep)));
  position: relative;
}

.fgb-cover-art::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 -24px 40px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.fgb-cover-glyph {
  font-family: var(--display);
  font-size: 2.4rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  position: relative;
  z-index: 1;
}

.fgb-cover-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 0.8rem 0.85rem;
}

.fgb-cover-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
}

.fgb-cover-meta {
  font-size: 0.75rem;
  color: var(--console-muted);
  line-height: 1.35;
}

.fgb-cover-cta {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
}

.fgb-cover:hover,
.fgb-cover:focus-visible {
  transform: translateY(-6px) scale(1.03);
  border-color: rgba(62, 207, 142, 0.55);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(62, 207, 142, 0.2);
  outline: none;
}

.fgb-cover:focus-visible {
  box-shadow: var(--console-focus), 0 22px 48px rgba(0, 0, 0, 0.42);
}

.fgb-cover.is-ref {
  opacity: 0.88;
  border-style: dashed;
}

.fgb-cover.is-ref .fgb-cover-art {
  background: linear-gradient(165deg, #2a3530, #1a221e);
}

.fgb-shelf-empty {
  padding: 1rem 0;
}

@media (max-width: 820px) {
  .fgb-console-hud,
  .fgb-stat-strip { grid-template-columns: 1fr; }
  .fgb-spotlight-row { grid-template-columns: 1fr; }
  .fgb-console-shell { width: calc(100% - 1.5rem); }
}

@media (prefers-reduced-motion: reduce) {
  .fgb-console-led { animation: none; }
  .fgb-cover,
  .fgb-spotlight,
  .fgb-card,
  .fgb-train-card { transition: none; }
}
