.public-site {
  min-height: 100vh;
  overflow-x: hidden;
  color: #333;
  background: #f7f7f7;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

.catalog-shell,
.public-site .shell {
  width: min(990px, calc(100% - 32px));
  margin-inline: auto;
}

.catalog-header {
  position: sticky;
  z-index: 80;
  top: 0;
  height: 70px;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid #ededed;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .035);
  backdrop-filter: blur(12px);
}

.catalog-header-inner {
  display: flex;
  width: min(1174px, calc(100% - 32px));
  height: 100%;
  margin-inline: auto;
  align-items: center;
}

.gm-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.gm-brand img { width: 54px; height: 54px; }
.gm-brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.catalog-nav {
  display: flex;
  height: 100%;
  margin-left: 50px;
  align-items: stretch;
  gap: 28px;
}

.catalog-nav a {
  position: relative;
  display: flex;
  align-items: center;
  color: #333;
  font-size: 15px;
  white-space: nowrap;
}

.catalog-nav a::after {
  position: absolute;
  right: 50%;
  bottom: 0;
  left: 50%;
  height: 2px;
  content: "";
  background: #ff5b34;
  transition: left .18s ease, right .18s ease;
}

.catalog-nav a:hover, .catalog-nav a.active { color: #f0522c; }
.catalog-nav a:hover::after, .catalog-nav a.active::after { right: 0; left: 0; }

.catalog-header-actions {
  display: flex;
  margin-left: auto;
  align-items: center;
  gap: 20px;
}

.catalog-menu-toggle {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  color: #353535;
  border: 0;
  background: transparent;
}

.catalog-menu-toggle svg { width: 21px; height: 21px; }
.header-theme-toggle { display: grid; width: 36px; height: 36px; padding: 0; place-items: center; color: #666; border: 1px solid #e6e6e6; background: #f5f5f5; border-radius: 50%; transition: color .18s ease, border-color .18s ease, background .18s ease; }
.header-theme-toggle:hover { color: #f0522c; border-color: #ffc2b3; background: #fff5f2; }
.header-theme-toggle svg { width: 19px; height: 19px; }
.account-link { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; }
.account-link svg { display: none; width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.account-link:hover, .account-link.active { color: #f0522c; }
.catalog-menu-toggle { display: none; }

.catalog-home { min-height: 75vh; padding: 45px 0 82px; }

.notice-banner {
  position: relative;
  display: flex;
  height: 61px;
  overflow: hidden;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  color: #fff;
  background:
    linear-gradient(115deg, rgba(255,255,255,.05), rgba(255,255,255,.15)),
    linear-gradient(100deg, #9e9e9e, #ababab);
  border-radius: 12px;
}

.notice-banner::before {
  position: absolute;
  width: 260px;
  height: 140px;
  content: "";
  top: -66px;
  left: 170px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  transform: rotate(-12deg);
}

.notice-banner strong { position: relative; font-size: 18px; }
.notice-banner span { position: relative; padding: 9px 17px; background: rgba(255,255,255,.13); border-radius: 10px; font-size: 14px; }
.notice-banner b { margin-left: 3px; font-size: 19px; line-height: 0; }

.catalog-search {
  display: flex;
  height: 61px;
  margin-top: 24px;
  align-items: center;
  background: #fff;
  border-radius: 4px;
}

.catalog-search input {
  min-width: 0;
  height: 100%;
  flex: 1;
  padding: 0 25px;
  outline: 0;
  color: #444;
  border: 0;
  background: transparent;
  font-size: 17px;
}

.catalog-search input::placeholder { color: #888; }
.catalog-search button { display: grid; width: 74px; height: 100%; padding: 0; place-items: center; color: #111; border: 0; background: transparent; }
.catalog-search button svg { width: 25px; height: 25px; stroke-width: 1.5; }

.home-categories { margin-top: 20px; padding: 22px 24px 24px; background: #fff; border: 1px solid #ededed; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.025); }
.home-categories-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding-bottom: 17px; border-bottom: 1px solid #efefef; }
.home-categories-heading span { display: block; margin-bottom: 4px; color: #f0522c; font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.home-categories-heading h2 { margin: 0; color: #303030; font-size: 19px; font-weight: 600; }
.home-categories-heading small { color: #999; font-size: 11px; }
.home-category-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 10px; padding-top: 17px; }
.home-category-list a { display: flex; min-height: 40px; align-items: center; justify-content: center; padding: 8px 12px; color: #555; background: #f7f7f7; border: 1px solid #e8e8e8; border-radius: 6px; font-size: 13px; text-align: center; transition: color .18s, background .18s, border-color .18s, transform .18s; }
.home-category-list a:hover { color: #f0522c; border-color: #ffc7ba; background: #fff8f6; transform: translateY(-1px); }
.home-category-list a.active { color: #fff; border-color: #ff5b34; background: #ff5b34; box-shadow: 0 6px 14px rgba(255,91,52,.17); }

.games-heading { padding: 57px 0 32px; text-align: center; }
.games-heading h1 { display: inline-block; position: relative; margin: 0; color: #2d2d2d; font-size: 23px; font-weight: 400; line-height: 1.3; }
.games-heading sup { position: absolute; top: -14px; right: -44px; padding: 2px 6px; color: #fff; background: #ff5b34; border-radius: 5px 5px 5px 0; font-size: 11px; font-weight: 700; }
.games-heading > i { display: block; width: 20px; height: 3px; margin: 13px auto 17px; background: #ff5b34; border-radius: 999px; }
.games-heading p { margin: 0; color: #818181; font-size: 13px; }

.result-toolbar { display: flex; margin: -10px 0 20px; align-items: center; justify-content: space-between; color: #8a8a8a; font-size: 12px; }
.result-toolbar a { color: #f0522c; }

.game-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.game-card { overflow: hidden; background: #fff; border-radius: 5px; box-shadow: 0 4px 14px rgba(0,0,0,.025); transition: transform .2s ease, box-shadow .2s ease; }
.game-card:hover { z-index: 2; box-shadow: 0 12px 28px rgba(0,0,0,.1); transform: translateY(-5px); }
.game-cover { position: relative; display: block; overflow: hidden; aspect-ratio: 1.6 / 1; background: #e6e6e6; }
.game-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.game-card:hover .game-cover img { transform: scale(1.035); }
.rare-corner { position: absolute; top: 9px; right: 9px; padding: 3px 7px; color: #fff; background: rgba(255,91,52,.92); border-radius: 3px; font-size: 10px; }
.game-card-body { min-height: 96px; padding: 15px 15px 17px; }
.game-meta { display: flex; align-items: center; gap: 7px; color: #5b5b5b; font-size: 11px; }
.game-meta span:first-child::before { margin-right: 5px; color: #ff5b5b; content: "•"; }
.game-meta i { width: 4px; height: 4px; background: #efb64a; border-radius: 50%; }
.game-card h2 { margin: 8px 0 0; font-size: 16px; font-weight: 600; line-height: 1.35; }
.game-card h2 a { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.game-card h2 a:hover { color: #f0522c; }
.more-row { padding-top: 38px; text-align: center; }
.more-row a { display: inline-flex; min-width: 106px; height: 38px; align-items: center; justify-content: center; color: #777; border: 1px solid #ddd; background: #fff; border-radius: 4px; font-size: 13px; }
.more-row a:hover { color: #fff; border-color: #ff5b34; background: #ff5b34; }

.catalog-empty { padding: 65px 20px; text-align: center; background: #fff; border-radius: 5px; }
.catalog-empty > span { color: #ff5b34; font-size: 42px; }
.catalog-empty h2 { margin: 4px 0; font-size: 20px; }
.catalog-empty p { margin: 0 0 18px; color: #888; }
.catalog-empty a { color: #f0522c; }

.site-notice-modal {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  padding: 20px;
  place-items: center;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
}
.site-notice-modal:target { visibility: visible; opacity: 1; pointer-events: auto; }
.site-notice-backdrop { position: absolute; inset: 0; background: rgba(20, 20, 20, .56); backdrop-filter: blur(3px); }
.site-notice-card { position: relative; width: min(500px, 100%); padding: 34px; background: #fff; border-radius: 12px; box-shadow: 0 24px 70px rgba(0, 0, 0, .22); }
.site-notice-card > span { color: #ff5b34; font-size: 11px; font-weight: 700; letter-spacing: .18em; }
.site-notice-card h2 { margin: 7px 0 13px; color: #2f2f2f; font-size: 25px; }
.site-notice-card p { margin: 0; color: #666; font-size: 14px; line-height: 1.8; }
.site-notice-card ol { margin: 18px 0 24px; padding-left: 21px; color: #555; font-size: 13px; line-height: 2; }
.site-notice-card > div { display: flex; gap: 10px; }
.site-notice-card > div a { display: inline-flex; min-height: 38px; padding: 0 16px; align-items: center; justify-content: center; color: #fff; background: #ff5b34; border-radius: 4px; font-size: 13px; }
.site-notice-card > div a:last-child { color: #555; border: 1px solid #ddd; background: #fff; }
.site-notice-close { position: absolute; display: grid; width: 34px; height: 34px; top: 16px; right: 16px; place-items: center; color: #888; background: #f3f3f3; border-radius: 50%; font-size: 21px; }

.floating-search {
  position: fixed;
  z-index: 90;
  right: 22px;
  bottom: 24px;
  touch-action: none;
  user-select: none;
}
.floating-search-toggle {
  position: relative;
  display: grid;
  width: 54px;
  height: 54px;
  padding: 0;
  place-items: center;
  color: #fff;
  cursor: grab;
  border: 0;
  background: #ff5b34;
  border-radius: 50%;
  box-shadow: 0 10px 28px rgba(255,91,52,.32);
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.floating-search:not(.dragging) .floating-search-toggle:hover { background: #ea4723; box-shadow: 0 12px 30px rgba(255,91,52,.4); transform: translateY(-2px); }
.floating-search.dragging .floating-search-toggle { cursor: grabbing; box-shadow: 0 15px 36px rgba(255,91,52,.44); transform: scale(1.06); }
.floating-search-toggle:focus-visible { outline: 3px solid rgba(255,91,52,.24); outline-offset: 3px; }
.floating-search-toggle svg { position: absolute; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.8; transition: opacity .16s ease, transform .2s ease; }
.floating-search-close-icon { opacity: 0; transform: rotate(-70deg) scale(.72); }
.floating-search.open .floating-search-open-icon { opacity: 0; transform: rotate(70deg) scale(.72); }
.floating-search.open .floating-search-close-icon { opacity: 1; transform: rotate(0) scale(1); }
.floating-search-panel {
  position: absolute;
  display: flex;
  width: min(340px, calc(100vw - 32px));
  height: 54px;
  right: var(--search-panel-right, 0);
  left: var(--search-panel-left, auto);
  bottom: calc(100% + 12px);
  align-items: center;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background: #fff;
  border: 1px solid #e7e7e7;
  border-radius: 27px;
  box-shadow: 0 16px 42px rgba(0,0,0,.16);
  transform: translateY(8px) scale(.96);
  transform-origin: bottom right;
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.floating-search.open .floating-search-panel { visibility: visible; opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.floating-search.panel-down .floating-search-panel { top: calc(100% + 12px); bottom: auto; transform: translateY(-8px) scale(.96); transform-origin: top right; }
.floating-search.panel-down.open .floating-search-panel { transform: translateY(0) scale(1); }
.floating-search-panel input { min-width: 0; height: 100%; flex: 1; padding: 0 8px 0 21px; outline: 0; color: #333; border: 0; background: transparent; font-size: 14px; }
.floating-search-panel input::placeholder { color: #999; }
.floating-search-panel button { display: grid; width: 48px; height: 48px; flex: 0 0 48px; margin-right: 3px; padding: 0; place-items: center; color: #ff5b34; border: 0; background: transparent; border-radius: 50%; }
.floating-search-panel button:hover { background: #fff2ee; }
.floating-search-panel button:focus-visible, .floating-search-panel input:focus-visible { outline: 0; }
.floating-search-panel:focus-within { border-color: #ffad99; box-shadow: 0 16px 42px rgba(0,0,0,.16), 0 0 0 3px rgba(255,91,52,.1); }
.floating-search-panel svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.7; }

.catalog-footer { padding: 34px 0; color: #aaa; background: #252525; }
.catalog-footer-inner { display: grid; grid-template-columns: .65fr 1.7fr .55fr; align-items: center; gap: 35px; }
.footer-identity { display: flex; align-items: center; gap: 10px; color: #fff; }
.footer-identity img { width: 38px; height: 38px; }
.catalog-footer p { margin: 0; font-size: 11px; line-height: 1.8; }
.catalog-footer-inner > div:last-child { display: flex; justify-content: flex-end; gap: 16px; font-size: 11px; }
.catalog-footer a:hover { color: #fff; }
.mobile-bottom-nav { display: none; }

/* Player registration, login and recently played games. */
.player-auth-page { display: grid; min-height: 70vh; padding: 58px 16px 80px; place-items: start center; background: #f7f7f7; }
.player-auth-card { width: min(460px, 100%); overflow: hidden; padding: 38px 42px 30px; background: #fff; border: 1px solid #e9e9e9; border-radius: 12px; box-shadow: 0 16px 45px rgba(0,0,0,.07); }
.player-auth-brand { text-align: center; }
.player-auth-brand > span { display: grid; width: 54px; height: 54px; margin: 0 auto 16px; place-items: center; color: #fff; background: #ff5b34; border-radius: 18px 18px 18px 6px; box-shadow: 0 10px 22px rgba(255,91,52,.22); }
.player-auth-brand svg { width: 27px; height: 27px; }
.player-auth-brand small, .player-history-heading span, .player-profile-copy > small { color: #f0522c; font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.player-auth-brand h1 { margin: 6px 0 7px; color: #2d2d2d; font-size: 27px; font-weight: 600; }
.player-auth-brand p { margin: 0; color: #888; font-size: 13px; }
.player-auth-form { display: grid; gap: 16px; margin-top: 29px; }
.player-auth-form > label:not(.player-remember) { display: grid; gap: 7px; color: #444; font-size: 13px; font-weight: 600; }
.player-auth-form input:not([type="checkbox"]) { width: 100%; height: 48px; padding: 0 14px; outline: none; color: #333; background: #fafafa; border: 1px solid #dedede; border-radius: 7px; font-size: 14px; transition: border-color .18s, box-shadow .18s, background .18s; }
.player-auth-form input:not([type="checkbox"]):focus { background: #fff; border-color: #ff8062; box-shadow: 0 0 0 3px rgba(255,91,52,.1); }
.player-auth-form label > small { min-height: 0; color: #d43d22; font-size: 11px; font-weight: 500; }
.player-auth-form label > small:empty { display: none; }
.player-remember { display: flex; align-items: center; gap: 8px; color: #777; font-size: 12px; }
.player-remember input { width: 16px; height: 16px; accent-color: #ff5b34; }
.player-auth-form > button { min-height: 49px; padding: 0 20px; color: #fff; border: 0; background: #ff5b34; border-radius: 7px; font-size: 15px; font-weight: 700; box-shadow: 0 10px 22px rgba(255,91,52,.18); }
.player-auth-form > button:hover { background: #ea4723; }
.player-form-errors { padding: 10px 12px; color: #b8321c; background: #fff3f0; border: 1px solid #ffd0c5; border-radius: 7px; font-size: 12px; }
.player-form-errors.validation-summary-valid { display: none; }
.player-form-errors ul { margin: 0; padding-left: 18px; }
.player-auth-switch { margin-top: 24px; padding-top: 21px; color: #888; border-top: 1px solid #ededed; font-size: 13px; text-align: center; }
.player-auth-switch a { color: #f0522c; font-weight: 700; }

.player-profile-page { min-height: 70vh; padding: 48px 0 80px; background: #f7f7f7; }
.player-profile-head { display: flex; align-items: center; gap: 18px; padding: 26px 30px; background: #fff; border: 1px solid #e9e9e9; border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.035); }
.player-avatar { display: grid; width: 62px; height: 62px; flex: 0 0 auto; place-items: center; color: #fff; background: linear-gradient(135deg, #ff7655, #ff4e27); border-radius: 20px 20px 20px 7px; }
.player-avatar svg { width: 31px; height: 31px; }
.player-profile-copy { min-width: 0; flex: 1; }
.player-profile-copy h1 { overflow: hidden; margin: 3px 0 1px; color: #2d2d2d; font-size: 24px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.player-profile-copy p { margin: 0; color: #999; font-size: 11px; }
.player-profile-head form { margin: 0; }
.player-profile-head button { min-height: 38px; padding: 0 15px; color: #777; border: 1px solid #ddd; background: #fff; border-radius: 6px; font-size: 12px; }
.player-profile-head button:hover { color: #f0522c; border-color: #ffb5a4; }
.player-history { margin-top: 22px; padding: 28px 30px 32px; background: #fff; border: 1px solid #e9e9e9; border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.035); }
.player-history-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid #ededed; }
.player-history-heading h2 { margin: 4px 0 0; color: #303030; font-size: 22px; font-weight: 600; }
.player-history-heading > small { color: #999; font-size: 11px; }
.player-history-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding-top: 22px; }
.player-history-card { display: grid; min-width: 0; grid-template-columns: 132px minmax(0, 1fr); overflow: hidden; background: #fafafa; border: 1px solid #ededed; border-radius: 8px; transition: border-color .18s, transform .18s, box-shadow .18s; }
.player-history-card:hover { border-color: #ffc2b4; box-shadow: 0 9px 22px rgba(0,0,0,.06); transform: translateY(-2px); }
.player-history-cover { display: block; min-height: 118px; background: #eee; }
.player-history-cover img { width: 100%; height: 100%; object-fit: cover; }
.player-history-card > div { min-width: 0; padding: 15px 15px 13px; }
.player-history-card span { display: block; overflow: hidden; color: #888; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.player-history-card h3 { display: -webkit-box; margin: 7px 0 9px; overflow: hidden; color: #333; font-size: 15px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.player-history-card h3 a:hover { color: #f0522c; }
.player-history-card p, .player-history-card small { display: block; margin: 0; color: #999; font-size: 10px; line-height: 1.6; }
.player-history-empty { padding: 60px 20px 45px; color: #888; text-align: center; }
.player-history-empty > span { color: #ff5b34; font-size: 40px; }
.player-history-empty h3 { margin: 3px 0; color: #333; font-size: 19px; }
.player-history-empty p { margin: 0 0 17px; font-size: 13px; }
.player-history-empty a { display: inline-flex; min-height: 38px; align-items: center; padding: 0 17px; color: #fff; background: #ff5b34; border-radius: 5px; font-size: 12px; font-weight: 700; }

/* The public detail page stays focused on screenshots, introduction and the two downloads. */
.simple-detail-page { min-height: 66vh; padding: 54px 0 80px; background: #f7f7f7; }
.simple-game-detail { max-width: 900px; margin: 0 auto; padding: 22px 54px 40px; background: #fff; border: 1px solid #e9e9e9; border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.045); }
.simple-game-header { padding-bottom: 14px; border-bottom: 1px solid #ededed; }
.simple-game-header h1 { margin: 0; color: #292929; font-family: "Microsoft YaHei", "PingFang SC", sans-serif; font-size: clamp(28px, 3.4vw, 36px); font-weight: 600; line-height: 1.25; }
.simple-game-screenshots { padding: 20px 0 0; }
.simple-screenshot-track { display: flex; overflow-x: auto; gap: 14px; padding: 0 0 13px; scroll-behavior: smooth; scroll-snap-type: x mandatory; scrollbar-color: #d7d7d7 transparent; scrollbar-width: thin; }
.simple-screenshot-track figure { overflow: hidden; min-width: 0; flex: 0 0 min(580px, 78%); aspect-ratio: 16 / 9; margin: 0; background: #eee; border: 1px solid #ececec; border-radius: 8px; scroll-snap-align: start; }
.simple-screenshot-track figure:only-child { flex-basis: 100%; }
.simple-screenshot-track img { display: block; width: 100%; height: 100%; object-fit: cover; }
.simple-screenshot-empty { display: grid; min-height: 170px; place-items: center; padding: 24px; color: #999; background: #f7f7f7; border: 1px dashed #ddd; border-radius: 8px; font-size: 14px; text-align: center; }
.simple-game-intro { padding: 16px 0 28px; }
.simple-game-intro h2 { margin: 0 0 8px; color: #333; font-size: 22px; font-weight: 600; }
.simple-intro-text { margin-top: 0; color: #555; font-size: 16px; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.simple-intro-text :where(p, ul, ol, blockquote, pre) { margin: 0 0 4px; }
.simple-intro-text p:empty, .simple-intro-text p:has(> br:only-child) { display: none; }
.simple-intro-text :where(h1, h2, h3, h4) { margin: 18px 0 8px; color: #333; font-weight: 700; line-height: 1.35; }
.simple-intro-text h1 { font-size: 30px; }
.simple-intro-text h2 { font-size: 24px; }
.simple-intro-text h3 { font-size: 20px; }
.simple-intro-text h4 { font-size: 17px; }
.simple-intro-text a { color: #0b6d8d; text-decoration: underline; }
.simple-intro-text li { margin-left: 1.3em; }
.simple-intro-text img { display: block; max-width: 100%; height: auto; margin: 12px 0; border-radius: 8px; }
.simple-intro-text table { width: 100%; margin: 0 0 14px; border-collapse: collapse; }
.simple-intro-text td, .simple-intro-text th { padding: 8px 10px; border: 1px solid #e1e1e1; }
.simple-intro-text pre { overflow: auto; padding: 12px 14px; background: #f7f7f7; border-radius: 7px; }
.simple-download-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 18px; border-top: 1px solid #ededed; }
.simple-player-admin { display: flex; min-height: 42px; grid-column: 1 / -1; align-items: center; justify-content: center; padding: 6px 14px; color: #fff; background: #ff5b34; border: 0; border-radius: 7px; font-size: 15px; font-weight: 700; text-align: center; box-shadow: 0 8px 16px rgba(255,91,52,.18); transition: background .2s, box-shadow .2s, transform .2s; }
.simple-player-admin:not(.disabled):hover { color: #fff; background: #f04a22; box-shadow: 0 10px 18px rgba(255,91,52,.24); transform: translateY(-1px); }
.simple-player-admin.disabled { cursor: not-allowed; color: #999; background: #fafafa; border: 1px solid #ddd; box-shadow: none; font-weight: 600; }
.player-admin-frame { position: fixed; z-index: 80; inset: 0; display: flex; flex-direction: column; background: #fff; }
.player-admin-frame[hidden] { display: none; }
.player-admin-frame-bar { display: flex; min-height: 48px; flex: 0 0 auto; align-items: center; gap: 12px; padding: 6px 12px; color: #fff; background: #ff5b34; }
.player-admin-frame-bar button { min-height: 32px; padding: 0 12px; color: #ff5b34; background: #fff; border: 0; border-radius: 6px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.player-admin-frame-bar strong { min-width: 0; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.player-admin-frame iframe { flex: 1 1 auto; width: 100%; border: 0; background: #fff; }
body.player-admin-open { overflow: hidden; }
.simple-platform-download { display: flex; min-width: 0; min-height: 46px; align-items: center; justify-content: center; padding: 6px 14px; color: #fff; border-radius: 7px; box-shadow: 0 8px 16px rgba(0,0,0,.1); text-align: center; transition: transform .2s, box-shadow .2s, filter .2s; }
.simple-platform-download.android { background: #36a86b; box-shadow: 0 10px 22px rgba(54,168,107,.2); }
.simple-platform-download.ios { background: #252d31; box-shadow: 0 10px 22px rgba(37,45,49,.18); }
.simple-download-actions.single-platform .simple-platform-download { grid-column: 1 / -1; }
.simple-platform-download > span { display: block; min-width: 0; }
.simple-platform-download strong, .simple-platform-download small { display: block; }
.simple-platform-download strong { font-size: 15px; line-height: 1.2; }
.simple-platform-download small { overflow: hidden; margin-top: 1px; color: rgba(255,255,255,.72); font-size: 10px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.simple-platform-download:hover { color: #fff; filter: brightness(.95); box-shadow: 0 13px 27px rgba(0,0,0,.2); transform: translateY(-2px); }
.simple-platform-download.disabled { cursor: not-allowed; color: #888; background: #ededed; box-shadow: none; filter: none; }
.simple-platform-download.disabled small { color: #aaa; }

/* Old detail tabs can keep their HTML after a deployment. Keep their download icon hidden
   so stale markup can never expand into a full-page graphic. */
.simple-download-button { display: flex; min-height: 62px; align-items: center; justify-content: center; overflow: hidden; padding: 10px 18px; color: #fff; background: #36a86b; border-radius: 7px; text-align: center; }
.simple-download-button svg, .simple-download-button img, .simple-download-button > b { display: none !important; width: 0 !important; height: 0 !important; }

.public-site .detail-page { padding: 30px 0 70px; }
.public-site .breadcrumb { margin-bottom: 20px; color: #8b8b8b; }
.public-site .detail-hero { border-color: #ececec; border-radius: 8px; box-shadow: 0 5px 18px rgba(0,0,0,.04); }
.public-site .detail-cover { background: #f1f1f1; }
.public-site .detail-cover img { border-radius: 4px; }
.public-site .category-label { background: #ff5b34; }
.public-site .editor-label { color: #6e5000; background: #ffc83e; }
.public-site .detail-summary h1 { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; font-size: clamp(29px, 3.4vw, 42px); font-weight: 600; }
.public-site .detail-tags span, .public-site .copy-link, .public-site .back-link { color: #f0522c; }
.public-site .detail-layout { gap: 28px; }
.public-site .detail-content h2 { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; font-size: 28px; font-weight: 500; }
.public-site .download-panel { border-color: #e9e9e9; border-radius: 8px; box-shadow: 0 7px 24px rgba(0,0,0,.055); }
.public-site .download-icon, .public-site .download-button { background: #ff5b34; }
.public-site .download-button { border-radius: 5px; box-shadow: 0 9px 20px rgba(255,91,52,.22); }
.public-site .download-button:hover { background: #e94b27; }
.public-site .download-button b { color: #ff5b34; }

html[data-theme="dark"] .public-site { color: #e6e6e6; background: #151515; }
html[data-theme="dark"] .catalog-header { background: rgba(29,29,29,.97); border-color: #292929; }
html[data-theme="dark"] .catalog-nav a, html[data-theme="dark"] .account-link { color: #ddd; }
html[data-theme="dark"] .header-theme-toggle { color: #ccc; border-color: #444; background: #303030; }
html[data-theme="dark"] .header-theme-toggle:hover { color: #ff8062; border-color: #75483d; background: #3a2c29; }
html[data-theme="dark"] .catalog-search, html[data-theme="dark"] .game-card, html[data-theme="dark"] .more-row a, html[data-theme="dark"] .catalog-empty { background: #232323; }
html[data-theme="dark"] .games-heading h1 { color: #eee; }
html[data-theme="dark"] .game-card h2, html[data-theme="dark"] .catalog-search input { color: #eee; }
html[data-theme="dark"] .game-meta, html[data-theme="dark"] .games-heading p { color: #aaa; }
html[data-theme="dark"] .floating-search-panel { background: #292929; border-color: #3e3e3e; }
html[data-theme="dark"] .floating-search-panel input { color: #eee; }
html[data-theme="dark"] .floating-search-panel button:hover { background: #3a2c29; }
html[data-theme="dark"] .site-notice-card { background: #252525; }
html[data-theme="dark"] .site-notice-card h2 { color: #f1f1f1; }
html[data-theme="dark"] .site-notice-card p, html[data-theme="dark"] .site-notice-card ol { color: #bcbcbc; }
html[data-theme="dark"] .site-notice-card > div a:last-child { color: #ddd; border-color: #444; background: #303030; }
html[data-theme="dark"] .simple-detail-page { background: #181818; }
html[data-theme="dark"] .simple-game-detail { background: #232323; border-color: #303030; box-shadow: none; }
html[data-theme="dark"] .simple-game-header { border-color: #383838; }
html[data-theme="dark"] .simple-game-header h1, html[data-theme="dark"] .simple-game-intro h2 { color: #f1f1f1; }
html[data-theme="dark"] .simple-intro-text { color: #d0d0d0; }
html[data-theme="dark"] .simple-screenshot-track figure { border-color: #383838; background: #181818; }
html[data-theme="dark"] .simple-screenshot-empty { color: #aaa; background: #181818; border-color: #444; }
html[data-theme="dark"] .simple-download-actions { border-color: #383838; }
html[data-theme="dark"] .simple-player-admin { color: #fff; background: #ff5b34; }
html[data-theme="dark"] .simple-player-admin:hover { background: #f04a22; }
html[data-theme="dark"] .simple-player-admin.disabled { color: #999; background: #292929; border-color: #444; }
html[data-theme="dark"] .simple-platform-download.disabled { color: #888; background: #333; }
html[data-theme="dark"] .home-categories { background: #222; border-color: #383838; }
html[data-theme="dark"] .home-categories-heading { border-color: #383838; }
html[data-theme="dark"] .home-categories-heading h2 { color: #f1f1f1; }
html[data-theme="dark"] .home-category-list a { color: #ccc; background: #292929; border-color: #3b3b3b; }
html[data-theme="dark"] .home-category-list a:hover { color: #ff8062; background: #302522; border-color: #75483d; }
html[data-theme="dark"] .home-category-list a.active { color: #fff; background: #ff5b34; border-color: #ff5b34; }
html[data-theme="dark"] .player-auth-page, html[data-theme="dark"] .player-profile-page { background: #181818; }
html[data-theme="dark"] .player-auth-card, html[data-theme="dark"] .player-profile-head, html[data-theme="dark"] .player-history { background: #232323; border-color: #343434; box-shadow: none; }
html[data-theme="dark"] .player-auth-brand h1, html[data-theme="dark"] .player-profile-copy h1, html[data-theme="dark"] .player-history-heading h2, html[data-theme="dark"] .player-history-empty h3 { color: #f1f1f1; }
html[data-theme="dark"] .player-auth-form > label:not(.player-remember) { color: #ddd; }
html[data-theme="dark"] .player-auth-form input:not([type="checkbox"]) { color: #eee; background: #1c1c1c; border-color: #424242; }
html[data-theme="dark"] .player-auth-form input:not([type="checkbox"]):focus { background: #1c1c1c; border-color: #ff8062; }
html[data-theme="dark"] .player-auth-switch, html[data-theme="dark"] .player-history-heading { border-color: #3a3a3a; }
html[data-theme="dark"] .player-profile-head button { color: #bbb; background: #292929; border-color: #444; }
html[data-theme="dark"] .player-history-card { background: #292929; border-color: #3a3a3a; }
html[data-theme="dark"] .player-history-card h3 { color: #eee; }
html[data-theme="dark"] .mobile-bottom-nav { background: rgba(35,35,35,.97); border-color: #393939; }
html[data-theme="dark"] .mobile-bottom-nav a { color: #aaa; }
html[data-theme="dark"] .mobile-bottom-nav a.active { color: #ff8062; }

@media (max-width: 1050px) {
  .catalog-header-inner { width: min(100% - 26px, 990px); }
  .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .public-site { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .catalog-header { height: 64px; }
  .gm-brand img { width: 48px; height: 48px; }
  .catalog-nav { position: absolute; display: none; height: auto; top: 64px; right: 14px; left: 14px; margin: 0; padding: 10px; align-items: stretch; flex-direction: column; gap: 0; background: #fff; border: 1px solid #e9e9e9; border-radius: 6px; box-shadow: 0 12px 30px rgba(0,0,0,.12); }
  .catalog-nav.open { display: flex; }
  .catalog-nav a { min-height: 43px; padding: 0 12px; }
  .catalog-nav a::after { display: none; }
  .catalog-header-actions { gap: 8px; }
  .header-theme-toggle { width: 34px; height: 34px; border: 0; background: transparent; }
  .header-theme-toggle svg { width: 20px; height: 20px; }
  .account-link { display: grid; width: 34px; height: 34px; place-items: center; }
  .account-link span { display: none; }
  .account-link svg { display: block; }
  .catalog-menu-toggle { display: grid; }
  .catalog-home { padding-top: 34px; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
  .game-cover { aspect-ratio: 1.38 / 1; }
  .game-card-body { min-height: 85px; padding: 11px 11px 13px; }
  .game-meta { gap: 5px; font-size: 10px; }
  .game-card h2 { margin-top: 7px; font-size: 14px; line-height: 1.5; }
  .floating-search { right: 14px; top: clamp(130px, 26vh, 220px); bottom: auto; }
  .floating-search-toggle { width: 50px; height: 50px; }
  .floating-search-panel { width: min(330px, calc(100vw - 28px)); height: 52px; }
  .catalog-footer-inner { grid-template-columns: 1fr; gap: 17px; }
  .catalog-footer-inner > div:last-child { justify-content: flex-start; }
  .mobile-bottom-nav { position: fixed; z-index: 95; display: grid; min-height: 66px; right: 0; bottom: 0; left: 0; grid-template-columns: repeat(3, 1fr); padding: 5px 8px env(safe-area-inset-bottom); background: rgba(255,255,255,.97); border-top: 1px solid #e6e6e6; box-shadow: 0 -8px 25px rgba(0,0,0,.08); backdrop-filter: blur(16px); }
  .mobile-bottom-nav a { display: flex; min-width: 0; align-items: center; justify-content: center; flex-direction: column; gap: 3px; color: #888; font-size: 10px; font-weight: 700; }
  .mobile-bottom-nav a.active { color: #ff5b34; }
  .mobile-bottom-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
  html[data-theme="dark"] .catalog-nav { background: #252525; border-color: #333; }
}

@media (max-width: 520px) {
  .catalog-shell, .public-site .shell { width: min(100% - 24px, 990px); }
  .notice-banner { height: 61px; padding-inline: 20px; border-radius: 10px; }
  .notice-banner strong { font-size: 15px; }
  .notice-banner span { padding: 7px 10px; font-size: 12px; }
  .catalog-search { height: 51px; margin-top: 14px; }
  .catalog-search input { padding-inline: 18px; font-size: 15px; }
  .catalog-search button { width: 58px; }
  .home-categories { margin-top: 12px; padding: 13px 12px 14px; }
  .home-categories-heading { align-items: center; padding-bottom: 10px; }
  .home-categories-heading span { display: none; }
  .home-categories-heading h2 { font-size: 16px; }
  .home-categories-heading small { font-size: 10px; }
  .home-category-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding-top: 10px; }
  .home-category-list a { min-height: 36px; padding: 5px 6px; border-radius: 5px; font-size: 11px; }
  .games-heading { padding: 34px 0 21px; }
  .games-heading h1 { font-size: 18px; }
  .games-heading sup { top: -13px; right: -42px; }
  .games-heading > i { margin: 9px auto 12px; }
  .games-heading p { padding-inline: 0; font-size: 12px; line-height: 1.6; white-space: nowrap; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
  .public-site .detail-summary { padding: 27px 20px; }
  .public-site .detail-summary h1 { font-size: 30px; }
  .public-site .download-panel { padding: 21px; }
  .simple-detail-page { min-height: 70vh; padding: 14px 0 48px; }
  .simple-game-detail { padding: 12px 16px 20px; border-radius: 8px; }
  .simple-game-header { padding-bottom: 8px; }
  .simple-game-header h1 { font-size: 22px; line-height: 1.25; }
  .simple-game-screenshots { padding-top: 14px; }
  .simple-screenshot-track { gap: 10px; margin-right: -22px; padding-right: 22px; }
  .simple-screenshot-track figure { flex-basis: 86%; border-radius: 6px; }
  .simple-screenshot-track figure:only-child { flex-basis: calc(100% - 22px); }
  .simple-game-intro { padding: 14px 0 24px; }
  .simple-game-intro h2 { margin-bottom: 6px; font-size: 19px; }
  .simple-intro-text { margin-top: 0; font-size: 14px; line-height: 1.5; }
  .simple-download-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-top: 14px; }
  .simple-player-admin { min-height: 40px; order: 3; font-size: 15px; }
  .simple-platform-download.android { order: 1; }
  .simple-platform-download.ios { order: 2; }
  .simple-platform-download { min-height: 42px; padding: 5px 10px; }
  .simple-platform-download strong { font-size: 14px; }
  .site-notice-card { padding: 30px 22px 24px; }
  .site-notice-card > div { flex-direction: column; }
  .player-auth-page { min-height: 72vh; padding: 24px 12px 45px; }
  .player-auth-card { padding: 30px 22px 24px; border-radius: 9px; }
  .player-auth-brand h1 { font-size: 24px; }
  .player-profile-page { padding: 22px 0 45px; }
  .player-profile-head { align-items: flex-start; gap: 13px; padding: 20px 18px; }
  .player-avatar { width: 52px; height: 52px; border-radius: 17px 17px 17px 6px; }
  .player-avatar svg { width: 26px; height: 26px; }
  .player-profile-copy h1 { font-size: 20px; }
  .player-profile-head button { min-height: 34px; padding-inline: 10px; }
  .player-history { margin-top: 14px; padding: 22px 16px 24px; }
  .player-history-heading h2 { font-size: 19px; }
  .player-history-grid { grid-template-columns: 1fr; gap: 11px; padding-top: 16px; }
  .player-history-card { grid-template-columns: 116px minmax(0, 1fr); }
  .player-history-cover { min-height: 108px; }
  .player-history-card > div { padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .game-card, .game-cover img, .catalog-nav a::after { transition: none !important; }
}
