/* Shared geometry; three generated material backgrounds match the original game art. */
html { scroll-padding-top:80px; }
body { padding-top:64px !important; }
#tm-game-navigation {
  --tm-ink:#f6e1b0; --tm-muted:#c4a476; --tm-accent:#efc16a; --tm-panel:#22130c;
  --tm-line:#ae88465c; --tm-hover:#deb67320; --tm-button:#e5bc72; --tm-button-ink:#28180a;
  position:fixed; inset:0 0 auto; z-index:2147483000; width:100%; height:64px;
  margin:0; padding:0; box-sizing:border-box; color:var(--tm-ink);
  background:var(--tm-panel) url('/ui/game-navigation/chenmo-v1.webp') center / 100% 100% no-repeat;
  border-bottom:1px solid var(--tm-line); box-shadow:0 3px 12px #0003;
  font:16px/1.4 'Microsoft YaHei','PingFang SC',sans-serif; text-align:left; letter-spacing:0;
}
#tm-game-navigation[data-theme=xunxianjue] {
  --tm-ink:#264e50; --tm-muted:#587d79; --tm-accent:#1f6362; --tm-panel:#f1f4ee;
  --tm-line:#477e6c44; --tm-hover:#2a696714; --tm-button:#2f6866; --tm-button-ink:#fffdf3;
  background-image:url('/ui/game-navigation/xunxianjue-v1.webp');
}
#tm-game-navigation[data-theme=yumoji] {
  --tm-ink:#f3dfb8; --tm-muted:#c7b698; --tm-accent:#e2be80; --tm-panel:#34322c;
  --tm-line:#c6a86e55; --tm-hover:#d7bc8526; --tm-button:#d3b67d; --tm-button-ink:#29261e;
  background-image:url('/ui/game-navigation/yumoji-v1.webp');
}
#tm-game-navigation * { box-sizing:border-box; float:none; }
#tm-game-navigation .tm-nav-inner { width:calc(100% - 48px); max-width:1240px; height:100%; margin:0 auto; padding:0; display:flex; align-items:center; gap:24px; }
#tm-game-navigation a { position:relative; display:inline-flex; align-items:center; justify-content:center; width:auto; height:auto; margin:0; text-indent:0; color:var(--tm-ink); font:inherit; text-decoration:none; white-space:nowrap; transition:background-color .18s,color .18s; }
#tm-game-navigation .tm-nav-brand { flex-shrink:0; gap:10px; justify-content:flex-start; font-size:20px; font-weight:700; letter-spacing:2px; }
#tm-game-navigation .tm-nav-brand small { display:block; margin:2px 0 0; color:var(--tm-muted); font-size:10px; font-weight:400; line-height:1.2; letter-spacing:3px; }
#tm-game-navigation .tm-nav-seal { width:34px; height:34px; display:grid; place-items:center; border:1px solid var(--tm-accent); color:var(--tm-accent); font:23px/1 Georgia,'SimSun',serif; letter-spacing:0; }
#tm-game-navigation nav { flex:1; min-width:0; display:flex; flex-wrap:nowrap; justify-content:flex-end; align-items:center; gap:4px; margin:0; padding:0; overflow-x:auto; scrollbar-width:thin; }
#tm-game-navigation .tm-nav-link { flex:0 0 auto; padding:10px 16px; border:1px solid transparent; border-radius:3px; font-size:15px; }
#tm-game-navigation .tm-nav-link:hover,#tm-game-navigation .tm-nav-link[aria-current=page] { color:var(--tm-accent); background:var(--tm-hover); border-color:var(--tm-line); }
#tm-game-navigation .tm-nav-action { color:var(--tm-button-ink); background:var(--tm-button); border-color:var(--tm-button); font-weight:700; min-width:110px; }
#tm-game-navigation .tm-nav-action:hover { color:var(--tm-button-ink); background:var(--tm-button); filter:brightness(1.07); border-color:var(--tm-button); }
#tm-game-navigation a:focus-visible { outline:2px solid var(--tm-accent); outline-offset:2px; }
@media(max-width:1000px) {
  #tm-game-navigation .tm-nav-inner { gap:10px; width:calc(100% - 24px); }
  #tm-game-navigation .tm-nav-link { padding:10px; font-size:14px; }
  #tm-game-navigation .tm-nav-brand { font-size:18px; letter-spacing:1px; }
}
@media(max-width:700px) {
  html { scroll-padding-top:108px; } body { padding-top:96px !important; }
  #tm-game-navigation { height:96px; background-size:auto 100%; }
  #tm-game-navigation .tm-nav-inner { display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-rows:52px 43px; gap:0 12px; }
  #tm-game-navigation .tm-nav-brand small { display:none; }
  #tm-game-navigation .tm-nav-seal { width:28px; height:28px; font-size:20px; }
  #tm-game-navigation nav { grid-column:1/-1; grid-row:2; justify-content:flex-start; border-top:1px solid var(--tm-line); width:100%; }
  #tm-game-navigation .tm-nav-link { padding:8px 12px; font-size:14px; }
  #tm-game-navigation .tm-nav-action { grid-row:1; grid-column:2; min-width:96px; padding:7px 12px; }
}
@media(prefers-reduced-motion:reduce) { #tm-game-navigation a { transition:none; } }
