/* GameSync V1 deliberately inherits the current Zibll light/dark palette.
   No hardcoded "night after 8 pm" script: Zibll already owns theme switching. */
.gs-library{width:100%;max-width:1240px;margin:0 auto;box-sizing:border-box;color:inherit;font:inherit}
.gs-library *{box-sizing:border-box}
.gs-library .gsl-categories{display:flex;flex-wrap:wrap;gap:9px;margin:4px 0 20px}
.gs-library .gsl-category{display:inline-block;padding:7px 12px;border:1px solid rgba(130,130,130,.20);border-radius:999px;background:rgba(127,127,127,.07);color:inherit;font-size:13px;text-decoration:none;line-height:1.35}
.gs-library .gsl-category.is-active,.gs-library .gsl-category:hover{background:rgba(127,127,127,.19);border-color:rgba(127,127,127,.37)}
.gs-library .gsl-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:18px 14px}
.gs-library .gsl-card{position:relative;min-width:0;border-radius:10px;overflow:hidden;background:rgba(127,127,127,.075);border:1px solid rgba(127,127,127,.12);transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;margin:0}
.gs-library .gsl-card:hover{transform:translateY(-3px);border-color:rgba(127,127,127,.35);box-shadow:0 8px 20px rgba(0,0,0,.12)}
.gs-library .gsl-card-link{position:absolute;inset:0;z-index:3;display:block;color:inherit!important;text-decoration:none!important;cursor:pointer;border-radius:inherit} .gs-library .gsl-card-link:focus-visible{outline:3px solid #3284e5;outline-offset:-3px}
.gs-library .gsl-cover{aspect-ratio:460/215;display:flex;align-items:center;justify-content:center;background:rgba(127,127,127,.09);overflow:hidden;width:100%}
.gs-library .gsl-cover img{pointer-events:none;display:block;width:100%;height:100%;object-fit:contain;transition:transform .2s ease}
.gs-library .gsl-card:hover .gsl-cover img:not(.gsl-placeholder){transform:scale(1.035)}
.gs-library .gsl-card-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;margin:10px 10px 3px;font-size:14px;font-weight:600;line-height:1.5;min-height:3em;overflow-wrap:anywhere}
.gs-library .gsl-card-date{display:block;margin:0 10px 12px;font-size:12px;opacity:.65;line-height:1.4;font-weight:400}
.gs-library .gsl-pagination{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:8px;margin-top:24px}
.gs-library .gsl-page-link{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:8px 12px;border:1px solid rgba(127,127,127,.2);border-radius:7px;color:inherit!important;text-decoration:none!important;background:rgba(127,127,127,.06);line-height:1.2}
.gs-library .gsl-page-number{min-width:38px;padding-left:9px;padding-right:9px}
.gs-library .gsl-page-link.is-current,.gs-library a.gsl-page-link:hover{background:rgba(127,127,127,.2)}
.gs-library .gsl-page-link.is-disabled{opacity:.38;cursor:default;user-select:none}
.gs-library .gsl-page-jump{display:inline-flex;align-items:center;gap:6px;margin:0 0 0 4px;padding-left:10px;border-left:1px solid rgba(127,127,127,.18);font-size:13px;line-height:1.2}
.gs-library .gsl-page-status{opacity:.65;white-space:nowrap;margin-right:3px}
.gs-library .gsl-page-jump label,.gs-library .gsl-page-jump span{white-space:nowrap}
.gs-library .gsl-page-jump input[type=number]{width:62px;height:36px;margin:0!important;padding:6px 7px!important;border:1px solid rgba(127,127,127,.28)!important;border-radius:7px!important;background:rgba(127,127,127,.05)!important;color:inherit!important;font:inherit!important;text-align:center;box-shadow:none!important}
.gs-library .gsl-page-jump button{height:36px;margin:0!important;padding:7px 12px!important;border:0!important;border-radius:7px!important;background:#3284e5!important;color:#fff!important;font:inherit!important;font-size:13px!important;line-height:1.2!important;cursor:pointer;box-shadow:none!important}
.gs-library .gsl-page-jump button:hover{background:#2075d8!important}
.gs-library .gsl-empty{padding:24px 12px;border:1px dashed rgba(127,127,127,.25);border-radius:10px;text-align:center;opacity:.8}
@media(max-width:1099px){.gs-library .gsl-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:820px){.gs-library .gsl-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}}
@media(max-width:620px){.gs-library .gsl-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px 9px}.gs-library .gsl-card-title{font-size:13px;margin:8px 8px 3px}.gs-library .gsl-card-date{font-size:11px;margin:0 8px 10px}.gs-library .gsl-categories{gap:6px}.gs-library .gsl-category{padding:6px 10px;font-size:12px}.gs-library .gsl-pagination{gap:6px}.gs-library .gsl-page-link{min-height:34px;padding:7px 9px;font-size:12px}.gs-library .gsl-page-number{min-width:34px}.gs-library .gsl-page-jump{width:100%;justify-content:center;border-left:0;padding-left:0;margin:4px 0 0}.gs-library .gsl-page-jump input[type=number]{width:58px;height:34px}.gs-library .gsl-page-jump button{height:34px;padding:6px 10px!important}.gs-library .gsl-page-status{display:none}}
@media(prefers-reduced-motion:reduce){.gs-library .gsl-card,.gs-library .gsl-cover img{transition:none!important}.gs-library .gsl-card:hover,.gs-library .gsl-card:hover .gsl-cover img{transform:none}}
.gs-library .gsl-preview-note{font-size:13px;padding:10px 12px;border-left:3px solid currentColor;background:rgba(127,127,127,.08);margin:0 0 18px;opacity:.85}

/* V1.0.4: opt-in rank + category labels; no change to ordinary library cards. */
.gs-library .gsl-cover{position:relative}
.gs-library .gsl-rank{position:absolute;top:7px;left:7px;min-width:25px;height:25px;border-radius:7px;background:rgba(18,24,34,.86);color:#fff;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:700;z-index:1;pointer-events:none}
.gs-library .gsl-card-category{position:absolute;right:6px;bottom:6px;border-radius:5px;background:rgba(18,24,34,.79);color:#fff;font-size:11px;line-height:1.4;padding:3px 6px;max-width:calc(100% - 12px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;z-index:1;pointer-events:none}
.gs-library .gsl-hot-detail{font-size:12px;opacity:.75;margin:0 0 12px}
.gs-library .gsl-icon-nav{display:flex;flex-wrap:wrap;gap:10px;margin:5px 0 22px}
.gs-library .gsl-icon-link{display:inline-flex;align-items:center;gap:7px;padding:9px 13px;border-radius:9px;border:1px solid rgba(127,127,127,.20);background:rgba(127,127,127,.07);color:inherit!important;text-decoration:none!important;font-size:13px;line-height:1.4;transition:background .18s ease}
.gs-library .gsl-icon-link:hover,.gs-library .gsl-icon-link:focus-visible{background:rgba(127,127,127,.18)}
.gs-library .gsl-icon-link span{font-size:16px;line-height:1}
.gs-library .gsl-search{display:flex;flex-wrap:wrap;align-items:center;gap:9px;margin:2px 0 17px}
.gs-library .gsl-search-label{font-size:13px;font-weight:600}
.gs-library .gsl-search input[type=search]{width:min(100%,370px);flex:1 1 170px;min-width:0;height:38px;padding:8px 11px;border-radius:8px;border:1px solid rgba(127,127,127,.32);background:rgba(127,127,127,.05);color:inherit;font:inherit;font-size:14px}
.gs-library .gsl-search button{border:0;border-radius:8px;padding:9px 18px;min-height:38px;background:#3284e5;color:white;font:inherit;font-size:13px;cursor:pointer}
.gs-library .gsl-search-clear{font-size:13px;color:inherit;opacity:.8}
.gs-library .gsl-preview-note{display:inline-block;padding:5px 9px;margin:0 0 12px;border-radius:5px;border-left:2px solid currentColor;font-size:12px}
@media(max-width:620px){.gs-library .gsl-icon-nav{gap:7px}.gs-library .gsl-icon-link{padding:7px 10px;font-size:12px}.gs-library .gsl-card-category{font-size:10px}}

/* V1.0.5: independent homepage ranking section; inherits theme light/dark. */
.gs-library.gsl-rankboard{max-width:none;margin:16px auto 26px}
.gs-library .gsl-rb-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.06fr);gap:18px;align-items:stretch}
.gs-library .gsl-rb-box{min-width:0;padding:17px 17px 13px;background:rgba(127,127,127,.045);border:1px solid rgba(127,127,127,.15);border-radius:14px}
.gs-library .gsl-rb-heading{display:flex;gap:9px;justify-content:space-between;align-items:center;margin:0 0 13px;flex-wrap:wrap}
.gs-library .gsl-rb-heading h3{font-size:18px;line-height:1.4;font-weight:700;padding:0;margin:0!important;color:inherit}
.gs-library .gsl-rb-heading>span{opacity:.65;font-size:12px}
.gs-library .gsl-rb-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;border-bottom:1px solid rgba(127,127,127,.18);padding-bottom:12px;margin-bottom:12px}
.gs-library button.gsl-rb-tab{font:inherit!important;font-size:13px!important;line-height:1.3!important;font-weight:600!important;background:transparent!important;border:0!important;border-radius:8px!important;box-shadow:none!important;color:inherit!important;opacity:.72;padding:9px 3px!important;min-width:0;height:auto!important;cursor:pointer;transition:background .15s,opacity .15s}
.gs-library button.gsl-rb-tab:hover{background:rgba(60,120,215,.09)!important;opacity:1}
.gs-library button.gsl-rb-tab.is-active{background:#3284e5!important;color:#fff!important;opacity:1}
.gs-library button.gsl-rb-tab:focus-visible{outline:2px solid #3284e5;outline-offset:2px}
.gs-library .gsl-rb-panel[hidden]{display:none!important}
.gs-library .gsl-rb-list{list-style:none!important;margin:0!important;padding:0!important;display:grid;gap:5px}
.gs-library .gsl-rb-entry{position:relative;list-style:none!important;margin:0!important;padding:5px 7px;display:flex;gap:10px;align-items:center;border-radius:8px;min-width:0;min-height:47px;transition:background .14s}
.gs-library .gsl-rb-entry:hover,.gs-library .gsl-rb-entry:focus-within{background:rgba(127,127,127,.10)}
.gs-library .gsl-rb-number{font-size:15px;font-weight:800;min-width:29px;height:32px;flex:0 0 29px;display:inline-flex;align-items:center;justify-content:center;color:inherit;background:rgba(127,127,127,.10);border-radius:7px}
.gs-library .gsl-rb-top .gsl-rb-number{color:#1975d2;background:rgba(60,130,220,.13)}
.gs-library .gsl-rb-entry:first-child .gsl-rb-number{color:#c24734;background:rgba(234,90,68,.14)}
.gs-library .gsl-rb-thumb{width:50px;height:38px;flex:0 0 50px;border-radius:6px;overflow:hidden;background:rgba(127,127,127,.12);display:flex;justify-content:center;align-items:center}
.gs-library .gsl-rb-thumb img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}
.gs-library .gsl-rb-info{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.gs-library .gsl-rb-name{font-weight:650;line-height:1.4;font-size:13px;min-width:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.gs-library .gsl-rb-meta{font-size:11px;opacity:.65;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gs-library .gsl-rb-entry-link{position:absolute;inset:0;z-index:3;border-radius:inherit;cursor:pointer;display:block}
.gs-library .gsl-rb-entry-link:focus-visible{outline:2px solid #3284e5;outline-offset:-2px}
.gs-library .gsl-rb-footnote{opacity:.58;font-size:11px;line-height:1.5;margin:11px 2px 0}
.gs-library .gsl-rb-empty{padding:24px 10px;color:inherit;opacity:.72;text-align:center;font-size:13px;line-height:1.7;margin:0}
.gs-library .gsl-rb-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.gs-library .gsl-rb-card{position:relative;min-width:0;min-height:0;margin:0;padding:0 0 10px;border-radius:10px;overflow:hidden;border:1px solid rgba(127,127,127,.15);background:rgba(127,127,127,.06);transition:transform .16s,border-color .16s}
.gs-library .gsl-rb-card:hover{transform:translateY(-2px);border-color:rgba(80,140,220,.4)}
.gs-library .gsl-rb-card-cover{width:100%;aspect-ratio:460/215;display:flex;align-items:center;justify-content:center;background:rgba(127,127,127,.11);position:relative;overflow:hidden}
.gs-library .gsl-rb-card-cover>img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}
.gs-library .gsl-rb-card-cat{position:absolute;right:5px;bottom:5px;max-width:calc(100% - 10px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;color:#fff;background:rgba(22,35,52,.78);padding:3px 5px;border-radius:5px;pointer-events:none}
.gs-library .gsl-rb-card-name{font-size:13px;font-weight:650;line-height:1.5;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;min-height:3em;margin:7px 8px 2px;overflow-wrap:anywhere}
.gs-library .gsl-rb-card-views{font-size:11px;opacity:.65;display:block;margin:3px 8px 0}
@media(max-width:1020px){.gs-library .gsl-rb-layout{grid-template-columns:1fr}.gs-library .gsl-rb-card-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:620px){.gs-library .gsl-rb-layout{gap:12px}.gs-library .gsl-rb-box{padding:12px 10px}.gs-library .gsl-rb-heading h3{font-size:16px}.gs-library .gsl-rb-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.gs-library .gsl-rb-name{font-size:12px}.gs-library .gsl-rb-thumb{width:46px;height:35px;flex-basis:46px}.gs-library .gsl-rb-entry{gap:7px}.gs-library button.gsl-rb-tab{font-size:12px!important}.gs-library .gsl-rb-card-name{font-size:12px}}
@media(prefers-reduced-motion:reduce){.gs-library .gsl-rb-card,.gs-library .gsl-rb-entry{transition:none!important}.gs-library .gsl-rb-card:hover{transform:none}}


/* V1.0.6 homepage game-only search and same-game data related cards. */
.gs-library.gsl-home-search{margin:18px 0 20px;max-width:none}
.gs-library .gsl-home-search-form{display:flex;gap:9px;align-items:stretch;margin:0;padding:7px;background:rgba(127,127,127,.045);border:1px solid rgba(127,127,127,.2);border-radius:12px;box-shadow:none}
.gs-library .gsl-home-search-form input[type=search]{min-width:0;width:100%;flex:1 1 auto;margin:0!important;padding:10px 13px!important;border:0!important;background:transparent!important;box-shadow:none!important;outline-offset:-2px;color:inherit;font:inherit;font-size:15px;line-height:1.6;height:auto!important}
.gs-library .gsl-home-search-form button{flex:0 0 auto;border:0!important;border-radius:8px;padding:11px 18px!important;margin:0!important;background:#3284e5!important;color:#fff!important;font:inherit;font-size:14px!important;font-weight:600;line-height:1.3;cursor:pointer;height:auto!important;min-height:42px}
.gs-library .gsl-home-search-form button:hover{background:#2075d8!important}
.gs-library .gsl-home-search-form button:focus-visible{outline:2px solid currentColor;outline-offset:3px}
.gs-library .gsl-home-search-results{margin-top:20px}
.gs-library .gsl-home-search-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
.gs-library .gsl-home-search-heading h3{font-size:19px!important;font-weight:700;margin:0!important;color:inherit}
.gs-library.gsl-related{max-width:none;margin:28px 0 24px;clear:both}
.gs-library .gsl-related-title{margin:0 0 14px!important;padding-left:11px;border-left:4px solid #3284e5;font-size:20px!important;font-weight:700;color:inherit}
.gs-library.gsl-related .gsl-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
@media(max-width:720px){.gs-library.gsl-related .gsl-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:420px){.gs-library .gsl-home-search-form{gap:5px}.gs-library .gsl-home-search-form button{padding:10px!important;font-size:13px!important}.gs-library .gsl-home-search-form input[type=search]{padding:9px!important;font-size:13px}}

/* V1.0.14 three proof-based labels; absolute overlay does not block card clicks. */
.gs-library .gsl-cover{position:relative}
.gs-library .gsl-event-badge{position:absolute;right:7px;top:7px;z-index:2;pointer-events:none;display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;border-radius:6px;color:#fff!important;font-size:12px;font-weight:750;line-height:1.25;letter-spacing:.03em;white-space:nowrap;box-shadow:0 2px 8px rgba(0,0,0,.2)}
.gs-library .gsl-event-new{background:#ed5a9b}
.gs-library .gsl-event-updated{background:#3284e5}
.gs-library .gsl-event-listed{background:#8b5cf6}
@media(max-width:620px){.gs-library .gsl-event-badge{right:5px;top:5px;font-size:11px;padding:3px 6px}}

.gs-library .gsl-event-badge[hidden]{display:none!important}

/* V1.0.21: all permanent platform/source marks are orange on the left; timed events remain right. */
.gs-library .gsl-platform-badge{position:absolute;left:7px;top:7px;z-index:2;pointer-events:none;
  max-width:calc(100% - 92px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  display:inline-block;padding:4px 8px;border-radius:7px;background:#e98123;border:1px solid rgba(255,255,255,.12);
  box-shadow:0 2px 8px rgba(17,31,46,.18);color:#fff!important;font-size:11px;
  line-height:1.2;font-weight:600;letter-spacing:.005em}
@media(max-width:620px){.gs-library .gsl-platform-badge{left:5px;top:5px;max-width:calc(100% - 65px);padding:3px 6px;font-size:10px}}

.gs-library .gsl-platform-ranked{top:36px}
@media(max-width:620px){.gs-library .gsl-platform-ranked{top:32px}}

/* V1.0.21: “移除D加密” shares the left orange badge family. */
.gs-library .gsl-platform-secondary{top:35px}
.gs-library .gsl-platform-secondary.gsl-platform-ranked{top:64px}
@media(max-width:620px){
  .gs-library .gsl-platform-secondary{top:31px}
  .gs-library .gsl-platform-secondary.gsl-platform-ranked{top:58px}
}

/* V1.0.24: only port-section image containers fill the wide cover box.
   Keep the natural ratio and crop edges instead of stretching a square source.
   Ordinary PC-game covers and the placeholder remain in their old contain mode. */
.gs-library .gsl-cover.gsl-cover-ported img:not(.gsl-placeholder),
.gs-library .gsl-rb-card-cover.gsl-cover-ported > img:not(.gsl-placeholder),
.gs-library .gsl-rb-thumb.gsl-cover-ported img:not(.gsl-placeholder){object-fit:cover;object-position:center center}
