/* FSGAMEO toolbox — dark premium theme aligned with main site.
 * Do NOT redefine --fs-nav-w / --fs-top-h here — those belong to the theme leftnav (256px). */
:root {
  --fs-bg: #0c0e12;
  --fs-surface: #151920;
  --fs-elevated: #1b212b;
  --fs-line: rgba(255, 255, 255, 0.08);
  --fs-line-gold: rgba(232, 201, 106, 0.28);
  --fs-text: #eef0f4;
  --fs-muted: #9aa3af;
  --fs-accent: #e8c96a;
  --fs-accent-soft: #f7e5a3;
  --fs-accent-deep: #c19549;
  --fs-accent-dim: rgba(232, 201, 106, 0.14);
  --fs-brand: #e2554a;
  --fs-radius: 10px;
  /* XC standalone chrome only (blank tools / legacy shell) */
  --fsgj-xc-nav-w: 12rem;
  --fsgj-xc-top-h: 3.2rem;
}

html {
  color-scheme: dark;
}

/* Theme left rail must keep site width on /zxgj (never inherit XC 12rem). */
body.fsgj-route.fs-leftnav-layout {
  --fs-nav-w: 256px;
}

/*
 * Do NOT restyle .fs-side-navbar / leftnav menu cards here.
 * Homepage leftnav.css owns that look; earlier “neutralize” rules
 * wiped padding/background/radius and made /zxgj look squeezed.
 *
 * Only pin the rail shell so Layui cannot collapse header.fs-leftnav.
 */
body.fsgj-route.fs-leftnav-layout header.fs-leftnav,
body.fsgj-route.fs-leftnav-layout header.header.fs-leftnav.fs-d-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: auto !important;
  bottom: 0 !important;
  width: var(--fs-nav-w) !important;
  max-width: var(--fs-nav-w) !important;
  height: 100vh !important;
  height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  background: var(--fs-bg, #0c0e12) !important;
  border-right: none !important;
  box-shadow: none !important;
  z-index: 1000 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

body.fsgj-dark,
body.fsgj-dark.night,
body.night.fsgj-dark {
  background: var(--fs-bg) !important;
  color: var(--fs-text) !important;
}

/* ---- XC Left nav (standalone shell only; not theme .fs-leftnav) ---- */
body.fsgj-dark .left-nav {
  background: var(--fs-bg) !important;
  border-right: 1px solid var(--fs-line) !important;
  width: var(--fsgj-xc-nav-w) !important;
}
body.fsgj-dark .left-nav::after {
  background: linear-gradient(180deg, rgba(232, 201, 106, 0.18), transparent) !important;
  opacity: 1 !important;
}
body.fsgj-dark .left-nav .logo {
  border-bottom: 1px solid var(--fs-line) !important;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.fsgj-dark .left-nav .logo a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
body.fsgj-dark .left-nav .logo .logo_img {
  object-fit: contain;
  max-width: 9.5rem;
  max-height: 3.2rem;
  height: auto !important;
  width: auto !important;
  margin-top: 0 !important;
}
body.fsgj-dark .head_div .logo_img_waps {
  object-fit: contain;
  max-height: 2rem;
  width: auto !important;
  height: auto !important;
}
body.fsgj-dark .left-nav .nav li a {
  color: var(--fs-muted) !important;
  border-radius: 8px;
}
body.fsgj-dark .left-nav .nav li a:hover,
body.fsgj-dark .left-nav .nav li a.act {
  color: var(--fs-accent-soft) !important;
  background: var(--fs-accent-dim) !important;
}
body.fsgj-dark .left-nav .nav li a i,
body.fsgj-dark .left-nav .nav li a .icons {
  color: var(--fs-accent) !important;
}

/* ---- Top bar / search fix ---- */
body.fsgj-dark .head_div {
  left: var(--fs-nav-w) !important;
  width: calc(100% - var(--fs-nav-w)) !important;
  height: var(--fs-top-h) !important;
  background: rgba(12, 14, 18, 0.92) !important;
  border-bottom: 1px solid var(--fs-line) !important;
  backdrop-filter: blur(12px);
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  padding: 0 1.25rem;
  box-sizing: border-box;
}
body.fsgj-dark .head_div > a,
body.fsgj-dark .head_div > .wapbut {
  /* keep mobile controls, hide desktop logo link gap */
}
body.fsgj-dark .headbutdiv {
  position: static !important;
  right: auto !important;
  top: auto !important;
  height: auto !important;
  line-height: normal !important;
  display: flex !important;
  align-items: center;
  gap: 0.55rem;
  float: none !important;
  margin: 0 !important;
}
body.fsgj-dark .headbutdiv .search_div {
  width: min(22rem, 46vw) !important;
  display: block !important;
  float: none !important;
  order: -1;
}
body.fsgj-dark .headbutdiv .search {
  float: none !important;
  height: 2rem !important;
  line-height: 2rem !important;
  width: 100% !important;
  border: 1px solid var(--fs-line) !important;
  background: var(--fs-elevated) !important;
  border-radius: 999px !important;
  display: flex !important;
  align-items: center;
  overflow: hidden;
}
body.fsgj-dark .headbutdiv .search span {
  display: none !important; /* avoid overlap with placeholder */
}
body.fsgj-dark .headbutdiv .search input {
  height: 2rem !important;
  line-height: 2rem !important;
  color: var(--fs-text) !important;
  padding: 0 2.4rem 0 0.9rem !important;
  flex: 1;
  background: transparent !important;
}
body.fsgj-dark .headbutdiv .search input::placeholder {
  color: var(--fs-muted);
}
body.fsgj-dark .headbutdiv .search i {
  right: 0.15rem !important;
  width: 2rem !important;
  height: 2rem !important;
  line-height: 2rem !important;
  color: var(--fs-accent) !important;
}
body.fsgj-dark .headerbut {
  float: none !important;
  margin: 0 !important;
  width: 2rem !important;
  height: 2rem !important;
  line-height: 2rem !important;
  border: 1px solid var(--fs-line) !important;
  background: var(--fs-elevated);
  color: var(--fs-muted);
  flex: 0 0 auto;
}
body.fsgj-dark .headerbut:hover {
  border-color: var(--fs-line-gold) !important;
  color: var(--fs-accent);
}
body.fsgj-dark .headerbut i {
  color: inherit !important;
}
body.fsgj-dark .headerbut > span {
  background: var(--fs-elevated) !important;
  border: 1px solid var(--fs-line);
  color: var(--fs-text) !important;
}

/* ---- Main / cards ---- */
body.fsgj-dark .main {
  width: calc(100% - var(--fs-nav-w)) !important;
  background: var(--fs-bg) !important;
  margin-top: calc(var(--fs-top-h) + 1.1rem) !important;
  min-height: calc(100vh - var(--fs-top-h) - 1.1rem);
}
body.fsgj-dark .moder_h2 {
  color: var(--fs-text) !important;
}
body.fsgj-dark .moder_h2 i {
  color: var(--fs-accent) !important;
}
body.fsgj-dark .moder li a {
  background: var(--fs-surface) !important;
  border: 1px solid var(--fs-line) !important;
  box-shadow: none !important;
}
body.fsgj-dark .moder li a:hover {
  border-color: var(--fs-line-gold) !important;
  background: var(--fs-elevated) !important;
}
body.fsgj-dark .moder li a span,
body.fsgj-dark .moder li a h3 {
  color: var(--fs-text) !important;
}
body.fsgj-dark .moder li a p {
  color: var(--fs-muted) !important;
}
/* Never recolor theme left-rail links (homepage owns that). */
body.fsgj-dark .fs-main--zxgj a,
body.fsgj-dark .left-nav a,
body.fsgj-dark .head_div a {
  color: var(--fs-muted);
}
/* Tool cards keep their own title/desc colors */
body.fsgj-dark .fs-main--zxgj .moder > li > a,
body.fsgj-dark .fs-main--zxgj .moder > li > a h3 {
  color: var(--fs-text) !important;
}
body.fsgj-dark .fs-main--zxgj .moder > li > a p {
  color: var(--fs-muted) !important;
}

/* Hide legacy XC chrome we don't use */
body.fsgj-dark .wapbut,
body.fsgj-dark .tool_nav_but,
body.fsgj-dark .tool_nav,
.fsgj-cate-panel {
  display: none !important;
}

/* ---- Tool page ---- */
body.fsgj-dark .tools-info {
  border-bottom: 1px solid var(--fs-line) !important;
}
body.fsgj-dark .tools-info .title,
body.fsgj-dark .tools-info h1 {
  color: var(--fs-text) !important;
}
body.fsgj-dark .tools-cent,
body.fsgj-dark .tools-cent .text_input,
body.fsgj-dark .tools-cent textarea,
body.fsgj-dark .tools-cent input,
body.fsgj-dark .tools-cent select,
body.fsgj-dark .tools-cent .layui-textarea,
body.fsgj-dark .tools-cent .layui-input {
  background: var(--fs-surface) !important;
  color: var(--fs-text) !important;
  border-color: var(--fs-line) !important;
}
body.fsgj-dark .formats span,
body.fsgj-dark .action-bar button,
body.fsgj-dark .tools-cent button {
  background: var(--fs-accent-dim) !important;
  color: var(--fs-accent-soft) !important;
  border: 1px solid var(--fs-line-gold) !important;
}

/* ---- Footer / mobile ---- */
body.fsgj-dark .footer {
  background: #0a0c10 !important;
  border-top: 1px solid var(--fs-line-gold) !important;
  width: calc(100% - var(--fs-nav-w)) !important;
  color: var(--fs-muted) !important;
}
body.fsgj-dark .footer h4 { color: var(--fs-accent) !important; }
body.fsgj-dark .fnavs {
  background: var(--fs-surface) !important;
  border-top: 1px solid var(--fs-line) !important;
}
body.fsgj-dark .fnavs a { color: var(--fs-muted) !important; }
body.fsgj-dark .scttop {
  background: var(--fs-elevated) !important;
  color: var(--fs-accent) !important;
  border: 1px solid var(--fs-line);
}

/* Layui layer dark */
body.fsgj-dark .layui-layer,
body.fsgj-dark .layui-layer-title,
body.fsgj-dark .layui-layer-content {
  background: var(--fs-elevated) !important;
  color: var(--fs-text) !important;
  border-color: var(--fs-line) !important;
}
body.fsgj-dark .layui-layer-title {
  border-bottom: 1px solid var(--fs-line) !important;
  color: var(--fs-accent-soft) !important;
}
body.fsgj-dark .app_search_ul li a {
  background: var(--fs-surface) !important;
  border-color: var(--fs-line) !important;
  color: var(--fs-text) !important;
}

/* ---- Type scale (scoped; do not blow up theme chrome) ---- */
body.fsgj-route .fs-main--zxgj {
  font-size: 16px;
}
body.fsgj-route .fs-main--zxgj .moder li a div h3 {
  font-size: 1.05rem !important;
  line-height: 1.3 !important;
}
body.fsgj-route .fs-main--zxgj .tools-info .title h1 {
  font-size: 1.05rem !important;
}
body.fsgj-route .fs-main--zxgj .moder li a div p {
  font-size: 0.76rem !important;
  line-height: 1.4 !important;
}
body.fsgj-route .fs-main--zxgj .tools-cent,
body.fsgj-route .fs-main--zxgj .tools-cent p {
  font-size: 0.88rem !important;
  line-height: 1.55 !important;
}
body.fsgj-route .fs-main--zxgj .moder li a img {
  width: 44px !important;
  height: 44px !important;
  border-radius: 10px !important;
}
body.fsgj-route .fs-main--zxgj .search input {
  font-size: 0.9rem !important;
}

/* Legacy standalone shell (blank tools / fallback) */
html.fsgj-standalone {
  font-size: 16px !important;
}
body.fsgj-dark.fsgj-standalone .left-nav .nav li a {
  font-size: 0.9rem !important;
  line-height: 1.35 !important;
}
body.fsgj-dark.fsgj-standalone .moder li a div h3,
body.fsgj-dark.fsgj-standalone .tools-info .title h1 {
  font-size: 1.05rem !important;
}
body.fsgj-dark.fsgj-standalone .moder li a div p,
body.fsgj-dark.fsgj-standalone .tools-cent,
body.fsgj-dark.fsgj-standalone .tools-cent p {
  font-size: 0.88rem !important;
  line-height: 1.55 !important;
}

/* ---- Theme-integrated shell: hide XC chrome leftovers ---- */
body.fsgj-route .left-nav,
body.fsgj-route .head_div,
body.fsgj-route .tool_nav_but,
body.fsgj-route .fnavs {
  display: none !important;
}
body.fsgj-route .main {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: none !important;
}
body.fsgj-route .fs-main--zxgj .center {
  max-width: none;
  margin: 0;
  width: 100%;
}

/* Horizontal category subnav (1–2 wrapping rows) — sticks under theme topbar */
.fsgj-subnav {
  margin: 0 0 16px;
  padding: 0 20px;
}
body.fsgj-route .fsgj-subnav {
  position: sticky;
  /* Match .fs-workspace-top sticky height: pad-top + topbar + pad-bottom */
  top: calc(var(--fs-rail-pad-top, 4px) * 2 + var(--fs-topbar-h, 48px));
  z-index: 80;
  margin: 0 0 16px;
  padding: 8px 20px 10px;
  background: rgba(12, 14, 18, 0.96);
  box-sizing: border-box;
}
body.fsgj-route .fs-main--zxgj {
  overflow: visible;
}
.fsgj-subnav__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 6px;
  padding: 10px 12px;
  background: var(--fs-surface, #151920);
  border: 1px solid var(--fs-line, rgba(255,255,255,0.08));
  border-radius: 12px;
}
.fsgj-subnav__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--fs-muted, #9aa3af);
  text-decoration: none !important;
  font-size: 0.86rem;
  line-height: 1.2;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.fsgj-subnav__item i {
  font-size: 0.95rem;
  line-height: 1;
}
.fsgj-subnav__item:hover {
  color: var(--fs-accent-soft, #f7e5a3);
  background: var(--fs-accent-dim, rgba(232, 201, 106, 0.14));
}
/* Beat body.fsgj-dark .fs-main--zxgj a { color: muted } — light-on-gold was unreadable */
body.fsgj-route .fsgj-subnav__item.is-active,
body.fsgj-route .fsgj-subnav__item.is-active:hover,
body.fsgj-route .fsgj-subnav__item.is-active:focus,
body.fsgj-route .fsgj-subnav__item.is-active i,
body.fsgj-route .fsgj-subnav__item.is-active span,
body.fsgj-dark .fs-main--zxgj .fsgj-subnav__item.is-active,
body.fsgj-dark .fs-main--zxgj .fsgj-subnav__item.is-active:hover,
body.fsgj-dark .fs-main--zxgj .fsgj-subnav__item.is-active:focus,
body.fsgj-dark .fs-main--zxgj .fsgj-subnav__item.is-active i,
body.fsgj-dark .fs-main--zxgj .fsgj-subnav__item.is-active span {
  color: #1a1408 !important;
  -webkit-text-fill-color: #1a1408 !important;
  background: linear-gradient(135deg, var(--fs-accent-deep, #c19549), var(--fs-accent, #e8c96a));
  border-color: transparent;
  font-weight: 600;
}
.fsgj-subnav__item--action {
  border-color: var(--fs-line, rgba(255,255,255,0.08));
}
/* 「我的收藏」— gold frame highlight */
body.fsgj-route .fsgj-subnav__item--fav,
body.fsgj-dark .fs-main--zxgj .fsgj-subnav__item--fav {
  color: var(--fs-accent-soft, #f7e5a3) !important;
  -webkit-text-fill-color: var(--fs-accent-soft, #f7e5a3) !important;
  border: 1px solid rgba(232, 201, 106, 0.72);
  background: rgba(232, 201, 106, 0.08);
  box-shadow: inset 0 0 0 1px rgba(247, 229, 163, 0.18);
  font-weight: 600;
}
body.fsgj-route .fsgj-subnav__item--fav i,
body.fsgj-dark .fs-main--zxgj .fsgj-subnav__item--fav i,
body.fsgj-route .fsgj-subnav__item--fav span,
body.fsgj-dark .fs-main--zxgj .fsgj-subnav__item--fav span {
  color: var(--fs-accent-soft, #f7e5a3) !important;
  -webkit-text-fill-color: var(--fs-accent-soft, #f7e5a3) !important;
}
body.fsgj-route .fsgj-subnav__item--fav:hover,
body.fsgj-dark .fs-main--zxgj .fsgj-subnav__item--fav:hover {
  color: #1a1408 !important;
  -webkit-text-fill-color: #1a1408 !important;
  background: linear-gradient(135deg, var(--fs-accent-deep, #c19549), var(--fs-accent, #e8c96a));
  border-color: var(--fs-accent, #e8c96a);
  box-shadow: none;
}
body.fsgj-route .fsgj-subnav__item--fav:hover i,
body.fsgj-route .fsgj-subnav__item--fav:hover span,
body.fsgj-dark .fs-main--zxgj .fsgj-subnav__item--fav:hover i,
body.fsgj-dark .fs-main--zxgj .fsgj-subnav__item--fav:hover span {
  color: #1a1408 !important;
  -webkit-text-fill-color: #1a1408 !important;
}

/* Tool search lives in theme topbar on /zxgj; hide legacy in-content toolbar */
body.fsgj-route .fsgj-toolbar {
  display: none !important;
}
.fsgj-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}
.fsgj-toolbar__search .search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: min(22rem, 100%);
  padding: 0 12px;
  height: 2.4rem;
  border-radius: 10px;
  border: 1px solid var(--fs-line, rgba(255,255,255,0.08));
  background: var(--fs-elevated, #1b212b);
}
.fsgj-toolbar__search .search input {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--fs-text, #eef0f4);
  outline: none;
  min-width: 0;
}
.fsgj-toolbar__search .search .icons {
  cursor: pointer;
  color: var(--fs-accent, #e8c96a);
}

/* Topbar tool search — same chrome as site search, clearer typed text */
body.fsgj-route .fs-topbar-search {
  min-width: min(22rem, 42vw);
  max-width: 420px;
  flex: 1 1 220px;
}
body.fsgj-route .fs-topbar-search .fsgj-topbar-tool-search {
  width: 100%;
}
body.fsgj-route .fs-topbar-search-form .fs-topbar-search-input,
body.fsgj-route .fs-topbar-search-form input[type="search"] {
  color: #eef0f4 !important;
  -webkit-text-fill-color: #eef0f4 !important;
  caret-color: #e8c96a;
}
body.fsgj-route .fs-topbar-search-form .fs-topbar-search-input::placeholder,
body.fsgj-route .fs-topbar-search-form input::placeholder {
  color: #8b95a5 !important;
  -webkit-text-fill-color: #8b95a5 !important;
  opacity: 1;
}
body.fsgj-route .fs-topbar-search-form:focus-within .fs-topbar-search-input,
body.fsgj-route .fs-topbar-search-form .fs-topbar-search-input:focus {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
.fsgj-panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}
body.fsgj-route .fs-main--zxgj .moder li a {
  background: var(--fs-surface, #151920) !important;
  border: 1px solid var(--fs-line, rgba(255,255,255,0.08)) !important;
}
body.fsgj-route .fs-main--zxgj .tools {
  background: var(--fs-surface, #151920);
  border: 1px solid var(--fs-line, rgba(255,255,255,0.08));
  border-radius: 12px;
  padding: 16px;
}

@media (max-width: 900px) {
  body.fsgj-route .fsgj-subnav {
    position: static !important;
    top: auto !important;
    padding: 6px 12px 8px;
    background: transparent;
  }
  .fsgj-subnav {
    padding: 0 12px;
  }
  .fsgj-toolbar__search .search {
    min-width: 100%;
  }
}

/* ---- Header buttons: no extra ring / tooltip frame ---- */
body.fsgj-dark .headerbut {
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  width: auto !important;
  min-width: 1.7rem;
  height: 1.7rem !important;
  line-height: 1.7rem !important;
  border-radius: 8px !important;
  position: relative;
}
body.fsgj-dark .headerbut:hover,
body.fsgj-dark .headerbut:focus {
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  background: var(--fs-accent-dim) !important;
}
body.fsgj-dark .headerbut span {
  display: none !important;
}
body.fsgj-dark .headerbut-link {
  text-decoration: none !important;
  color: inherit !important;
}
body.fsgj-dark .headerbut i {
  color: var(--fs-accent) !important;
  font-size: 1rem !important;
}

/* ---- Search / collect modal ---- */
body.fsgj-dark .layui-layer.fsgj-layer,
body.fsgj-dark .layui-layer.app_search {
  border: 1px solid var(--fs-line-gold) !important;
  border-radius: 14px !important;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45) !important;
  background: var(--fs-elevated) !important;
}
body.fsgj-dark .layui-layer.fsgj-layer .layui-layer-title,
body.fsgj-dark .layui-layer.app_search .layui-layer-title {
  height: 2.6rem !important;
  line-height: 2.6rem !important;
  padding: 0 1rem !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  background: var(--fs-surface) !important;
  border-bottom: 1px solid var(--fs-line) !important;
}
body.fsgj-dark .layui-layer.fsgj-layer .layui-layer-content,
body.fsgj-dark .layui-layer.app_search .layui-layer-content {
  padding: 0.85rem 0.9rem 1rem !important;
  background: var(--fs-elevated) !important;
  box-shadow: none !important;
  border: 0 !important;
}
body.fsgj-dark .app_search_ul,
body.fsgj-dark .app_coll_ul {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
}
body.fsgj-dark .app_search_ul li,
body.fsgj-dark .app_coll_ul li {
  float: none !important;
  width: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative;
}
body.fsgj-dark .app_search_ul li a,
body.fsgj-dark .app_coll_ul li a {
  display: flex !important;
  align-items: center;
  gap: 0.7rem;
  min-height: 4.4rem;
  height: auto !important;
  padding: 0.7rem 0.75rem !important;
  border-radius: 12px !important;
  border: 1px solid var(--fs-line) !important;
  background: var(--fs-surface) !important;
  transition: border-color .15s ease, background .15s ease;
}
body.fsgj-dark .app_search_ul li a:hover,
body.fsgj-dark .app_coll_ul li a:hover {
  border-color: var(--fs-line-gold) !important;
  background: #1f2631 !important;
}
body.fsgj-dark .app_search_ul li a img,
body.fsgj-dark .app_coll_ul li a img {
  width: 2.35rem !important;
  height: 2.35rem !important;
  border-radius: 8px;
  flex-shrink: 0;
  object-fit: cover;
}
body.fsgj-dark .app_search_ul li a div,
body.fsgj-dark .app_coll_ul li a div {
  min-width: 0;
  flex: 1;
}
body.fsgj-dark .app_search_ul li a h3,
body.fsgj-dark .app_coll_ul li a h3 {
  margin: 0 0 0.2rem !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  color: var(--fs-text) !important;
  line-height: 1.3 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.fsgj-dark .app_search_ul li a p,
body.fsgj-dark .app_coll_ul li a p {
  margin: 0 !important;
  font-size: 0.72rem !important;
  color: var(--fs-muted) !important;
  line-height: 1.4 !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal !important;
  text-overflow: unset !important;
}
body.fsgj-dark .app_search_bar,
body.fsgj-dark .app_coll_bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  margin-top: 0.85rem !important;
  padding-top: 0.35rem;
}
body.fsgj-dark .app_search_bar span,
body.fsgj-dark .app_coll_bar span {
  min-width: 1.85rem;
  height: 1.85rem !important;
  line-height: 1.85rem !important;
  padding: 0 0.45rem !important;
  border-radius: 8px !important;
  border: 1px solid var(--fs-line) !important;
  background: var(--fs-surface) !important;
  color: var(--fs-muted) !important;
  font-size: 0.78rem !important;
  cursor: pointer;
}
body.fsgj-dark .app_search_bar span.act,
body.fsgj-dark .app_coll_bar span.act {
  background: linear-gradient(135deg, var(--fs-accent-deep), var(--fs-accent)) !important;
  border-color: transparent !important;
  color: #1a1408 !important;
  font-weight: 700;
}
body.fsgj-dark .app_coll_ul li .fsgj-coll-del {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 2;
  width: 1.4rem;
  height: 1.4rem;
  line-height: 1.4rem;
  text-align: center;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  color: #f2b4b0 !important;
  cursor: pointer;
  font-size: 0.75rem !important;
}
body.fsgj-dark .fsgj-coll-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--fs-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ---- Login gate (frosted mask over real tool UI) ---- */
.fsgj-tools-cent--gated {
  position: relative;
  min-height: 18rem;
  overflow: hidden;
  border-radius: 10px;
}
.fsgj-tools-cent--gated .fsgj-tool-preview {
  pointer-events: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}
.fsgj-tools-cent--gated .fsgj-tool-preview a,
.fsgj-tools-cent--gated .fsgj-tool-preview button,
.fsgj-tools-cent--gated .fsgj-tool-preview input,
.fsgj-tools-cent--gated .fsgj-tool-preview textarea,
.fsgj-tools-cent--gated .fsgj-tool-preview select {
  pointer-events: none !important;
}
.fsgj-login-gate {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2.5rem 1rem;
}
.fsgj-tools-cent--gated > .fsgj-login-gate {
  position: absolute;
  inset: 0;
  z-index: 6;
  margin: 0;
  padding: 1.25rem;
  /* Light frost — keep tool layout readable underneath */
  background: rgba(12, 14, 18, 0.28);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.fsgj-login-gate__card {
  width: min(32rem, 100%);
  background: rgba(21, 25, 32, 0.92);
  border: 1px solid var(--fs-line-gold);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.fsgj-login-gate__card h2 {
  margin: 0 0 0.65rem;
  font-size: 1.25rem;
  color: var(--fs-accent-soft);
}
.fsgj-login-gate__card p {
  margin: 0 0 1.25rem;
  color: var(--fs-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}
.fsgj-login-gate__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}
.fsgj-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
  padding: 0 1.1rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
}
.fsgj-btn--primary {
  background: linear-gradient(135deg, var(--fs-accent-deep), var(--fs-accent));
  color: #1a1408 !important;
  border: 0;
}
.fsgj-btn--ghost {
  background: transparent;
  color: var(--fs-text) !important;
  border: 1px solid var(--fs-line);
}
.fsgj-btn--link {
  background: transparent;
  color: var(--fs-accent) !important;
  border: 0;
  text-decoration: underline !important;
  font-weight: 500;
}
.fsgj-login-trigger { display: none !important; }

@media (max-width: 560px) {
  body.fsgj-dark .app_search_ul,
  body.fsgj-dark .app_coll_ul {
    grid-template-columns: 1fr;
  }
}

/* AI form */
.fsgj-ai-wrap {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 16px;
}
.fsgj-ai-form, .fsgj-ai-out {
  background: var(--fs-surface);
  border: 1px solid var(--fs-line);
  border-radius: 12px;
  padding: 14px;
  min-height: 280px;
}
.fsgj-ai-field { margin-bottom: 12px; }
.fsgj-ai-field label { display: block; margin-bottom: 6px; font-weight: 600; font-size: .9rem; color: var(--fs-text); }
.fsgj-ai-field input[type=text],
.fsgj-ai-field textarea,
.fsgj-ai-field select {
  width: 100%;
  border: 1px solid var(--fs-line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  background: var(--fs-elevated);
  color: var(--fs-text);
}
.fsgj-ai-btn {
  border: 0;
  background: linear-gradient(135deg, var(--fs-accent-deep), var(--fs-accent));
  color: #1a1408;
  border-radius: 10px;
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 600;
}
.fsgj-ai-note, .fsgj-empty { color: var(--fs-muted); font-size: .82rem; margin-top: 10px; }

@media (max-width: 900px) {
  body.fsgj-dark .head_div {
    left: 0 !important;
    width: 100% !important;
    padding: 0 0.75rem;
  }
  body.fsgj-dark .headbutdiv .search_div {
    width: min(14rem, 55vw) !important;
  }
  body.fsgj-dark .tool_nav_but {
    left: auto !important;
    right: 0 !important;
    border-radius: 15px 0 0 15px !important;
    border-left: 1px solid var(--fs-line-gold) !important;
    border-right: 0 !important;
  }
  .fsgj-cate-panel {
    left: auto;
    right: 0.5rem;
  }
  .fsgj-ai-wrap { grid-template-columns: 1fr; }
}
