:root {
  --paper: #f6f5f2;
  --surface: #ffffff;
  --ink: #171717;
  --muted: #686868;
  --line: #e2e0db;
  --blue: #0878e5;
  --blue-dark: #056bcf;
  --blue-wash: #e8f3fd;
  --yellow: #f5b335;
  --yellow-wash: #fff9e9;
  --coral: #e95b45;
  --green: #2b8a56;
  --deep: #111827;
  --max: 1180px;
  color: var(--ink);
  background: var(--paper);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 0;
  background: var(--paper);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(8, 120, 229, .28);
  outline-offset: 2px;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 32px;
  background: rgba(246, 245, 242, .96);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 196px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 36px;
}

.brand-logo {
  display: block;
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 4px 8px rgba(8, 120, 229, .18));
}

.brand strong {
  display: block;
  font-size: 17px;
  line-height: 1.1;
}

.brand small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 1.5px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
}

.nav-link,
.text-action,
.footer-links button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 0;
}

.nav-link:hover,
.nav-link.is-active,
.text-action:hover,
.footer-links button:hover {
  color: var(--ink);
}

.nav-link.is-active {
  font-weight: 700;
  position: relative;
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--blue);
}

.user-greeting {
  max-width: 240px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.mobile-menu {
  display: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 22px;
}

.activity-label {
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.authorized-game-page {
  padding-top: 20px;
}

.authorized-game-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 10px;
}

.authorized-game-tab {
  flex: 0 0 auto;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 15px;
  background: var(--surface);
  color: var(--ink);
}

.authorized-game-tab strong {
  font-size: 14px;
}

.authorized-game-tab:hover,
.authorized-game-tab.is-active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.authorized-game-workspace {
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.authorized-game-subpage {
  min-height: 420px;
  padding: 22px;
  background: var(--paper);
}

.authorized-game-subpage .page-title {
  margin: 8px 0;
  font-size: 26px;
}

.authorized-game-subpage .page-intro {
  margin-top: 0;
}

.authorized-game-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.authorized-game-nav-link {
  min-height: 34px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: #f7f9fd;
  color: var(--muted);
  white-space: nowrap;
}

.authorized-game-nav-link:hover,
.authorized-game-nav-link.is-active {
  background: #eef3ff;
  border-color: #cfe0ff;
  color: var(--blue);
  font-weight: 800;
}

.authorized-live-board {
  display: grid;
  grid-template-columns: 1.1fr 1fr .9fr;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #edf2fa;
}

.authorized-live-card {
  min-width: 0;
  min-height: 130px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.authorized-live-card .activity-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0;
}

.authorized-countdown-block {
  border-top: 3px solid var(--coral);
}

.authorized-countdown-block > strong {
  margin-top: 10px;
  color: var(--coral);
  font-size: 38px;
  line-height: 1;
}

.authorized-number-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 16px;
}

.authorized-number-line i,
.authorized-number-line b {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e9f0f9;
  color: var(--blue);
  font-style: normal;
  font-weight: 700;
}

.authorized-number-line b {
  background: #1aa99a;
  color: #fff;
}

.authorized-countdown-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 12px;
}

.authorized-countdown-meta .link-button {
  margin-top: 0;
  padding: 5px 12px;
  border-radius: 999px;
  background: #eef3ff;
}

.authorized-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.authorized-status-chip.is-live {
  color: #0b8f83;
  background: #e9fbf7;
}

.authorized-status-chip.is-waiting {
  color: #b85a16;
  background: #fff4e8;
}

.authorized-status-chip.is-closed {
  color: #667085;
  background: #f0f1f4;
}

.authorized-countdown-issue {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.authorized-result-issue {
  color: var(--muted);
  font-weight: 600;
}

.authorized-server-block > strong {
  margin-top: 10px;
  font-size: 17px;
  white-space: nowrap;
}

.authorized-bet-remaining {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.authorized-bet-remaining b {
  color: var(--blue);
}

.authorized-game-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 12px;
  padding: 14px;
  background: #edf2fa;
}

.authorized-game-columns.is-participation {
  grid-template-columns: minmax(0, 1fr);
  padding: 0;
  background: transparent;
}

.authorized-game-columns.is-participation .authorized-table-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.authorized-game-columns.is-participation .authorized-round-stack {
  gap: 0;
}

.authorized-round-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  min-height: 0;
}

.authorized-table-card,
.authorized-side-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.authorized-table-card .section-head {
  margin: 0;
  padding: 14px 16px 0;
}

.authorized-table-card .section-head h2 {
  margin-top: 6px;
  font-size: 16px;
}

.authorized-table-card .table-panel {
  border: 0;
  border-radius: 0;
}

.authorized-game-side {
  display: grid;
  align-content: start;
  gap: 12px;
}

.authorized-side-card {
  padding: 16px;
}

.authorized-side-card h3 {
  margin: 8px 0;
  font-size: 17px;
}

.authorized-side-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.authorized-side-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.authorized-side-stat span {
  color: var(--muted);
  font-size: 12px;
}

.authorized-side-stat strong {
  font-size: 20px;
}

.authorized-side-card .primary-button,
.authorized-side-card .link-button {
  margin-top: 4px;
}

.authorized-history-card {
  margin: 0;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.authorized-history-card .table-panel {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.primary-button,
.secondary-button,
.quiet-button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 700;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.primary-button {
  background: var(--blue);
  color: #fff;
}

.primary-button:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
}

.primary-button.compact:disabled,
.primary-button.compact.is-disabled {
  background: #c7ced9;
  color: #fff;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.primary-button.compact,
.secondary-button.compact {
  min-height: 36px;
  padding: 0 16px;
  font-size: 13px;
}

.secondary-button {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

.secondary-button:hover {
  color: var(--blue);
  border-color: var(--blue);
}

.quiet-button {
  min-height: 36px;
  background: var(--blue-wash);
  color: var(--blue);
  font-size: 13px;
}

#app {
  flex: 1;
}

.page {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.eyebrow {
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.page-title {
  max-width: 760px;
  margin: 12px 0 14px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.12;
  letter-spacing: 0;
}

.page-intro {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-block {
  margin-top: 50px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin: 48px 0 18px;
}

.section-head h2 {
  margin: 0;
  font-size: 24px;
}

.section-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.compact-head {
  margin-top: 28px;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 0;
  font-weight: 700;
}

.hero {
  min-height: 380px;
  display: grid;
  grid-template-columns: 1fr 1.02fr;
  gap: 42px;
  align-items: center;
  padding: 46px 0 38px;
}

.hero h1 {
  max-width: 560px;
  margin: 16px 0;
  font-size: clamp(38px, 5.5vw, 70px);
  line-height: 1.05;
  letter-spacing: 0;
}

.hero h1 em {
  color: var(--blue);
  font-style: normal;
}

.hero-copy {
  max-width: 510px;
  color: var(--muted);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  margin-top: 28px;
}

.hero-note b {
  color: var(--ink);
}

.status-dot {
  color: var(--blue);
}

.status-dot.is-muted {
  color: var(--muted);
}

.hero-art {
  min-height: 340px;
  position: relative;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.hero-art img {
  width: 100%;
  height: 310px;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
}

.hero-label {
  position: absolute;
  left: 28px;
  bottom: 28px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.hero-label strong,
.hero-label span {
  display: block;
}

.hero-label strong {
  font-size: 16px;
}

.hero-label span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.quick-link {
  padding: 20px 18px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.quick-link:last-child {
  border-right: 0;
}

.quick-link:hover {
  background: var(--blue-wash);
}

.quick-link strong,
.quick-link span {
  display: block;
}

.quick-link strong {
  margin-bottom: 6px;
}

.quick-link span {
  color: var(--muted);
  font-size: 12px;
}

.authorized-section {
  padding-top: 2px;
}

.shop-vip-section {
  margin-bottom: 14px;
}

.shop-page {
  padding-top: 28px;
}

.shop-page .page-title {
  margin: 8px 0 10px;
  font-size: clamp(30px, 3.6vw, 42px);
}

.shop-page .page-intro {
  margin-bottom: 12px;
}

.shop-vip-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 12px;
}

.shop-vip-head h2 {
  margin: 4px 0 3px;
  font-size: 22px;
}

.shop-vip-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.shop-vip-contact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.shop-vip-contact::before {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 7px;
  background: var(--yellow-wash);
  color: #b47a0a;
  font-size: 10px;
  content: "✉";
}

.shop-vip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.shop-vip-card {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(37, 66, 124, .07);
}

.shop-vip-card.is-featured {
  border-color: rgba(8, 120, 229, .38);
  box-shadow: 0 16px 34px rgba(8, 120, 229, .13);
}

.shop-vip-card.is-featured::before {
  position: absolute;
  inset: -1px -1px auto;
  height: 4px;
  border-radius: 17px 17px 0 0;
  background: linear-gradient(90deg, var(--yellow), #f6d986, var(--yellow));
  content: "";
}

.shop-vip-card-head {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.shop-vip-card-head > div {
  min-width: 0;
}

.shop-vip-card-head > div:nth-child(2) {
  flex: 1;
}

.shop-vip-crown {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid #efd38e;
  border-radius: 13px;
  background: var(--yellow-wash);
  color: #b47a0a;
  font-size: 21px;
}

.shop-vip-tier {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.shop-vip-tier h3 {
  margin: 0;
  font-size: 19px;
}

.shop-vip-card-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.shop-vip-recommend {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--yellow-wash);
  color: #b47a0a;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.shop-vip-price {
  flex: 0 0 auto;
  margin-left: auto;
  text-align: right;
}

.shop-vip-price small,
.shop-vip-price strong {
  display: block;
}

.shop-vip-price small {
  color: var(--muted);
  font-size: 10px;
}

.shop-vip-price strong {
  margin-top: 2px;
  color: #b47a0a;
  font-size: 20px;
  line-height: 1;
}

.shop-vip-benefits {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.shop-vip-benefit {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.shop-vip-benefit > span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 8px;
  background: var(--blue-wash);
  font-size: 12px;
}

.shop-vip-benefit p {
  margin: 0;
}

.shop-vip-benefit strong {
  color: var(--ink);
}

.shop-vip-section + .coin-card-section {
  margin-top: 16px;
  padding-top: 16px;
}

.authorized-rank-section,
.coin-card-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.rank-tabs {
  display: flex;
  gap: 8px;
  margin: 18px 0 14px;
}

.activity-rank-list {
  border: 1px solid var(--line);
  background: var(--surface);
}

.activity-rank-row {
  display: grid;
  grid-template-columns: 56px 1fr 140px 150px;
  align-items: center;
  gap: 16px;
  min-height: 62px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}

.activity-rank-row:last-child {
  border-bottom: 0;
}

.activity-rank-row > strong {
  color: var(--blue);
  font-size: 18px;
}

.activity-rank-row small {
  color: var(--muted);
}

.activity-rank-row b {
  color: var(--green);
  text-align: right;
}

.coin-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.coin-card-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.coin-card-quantity {
  display: grid;
  gap: 4px;
  width: 78px;
  color: var(--muted);
  font-size: 11px;
}

.coin-card-quantity input {
  width: 100%;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.coin-card-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid #f1d99f;
  color: #9b6a00;
  background: var(--yellow-wash);
  font-size: 12px;
  font-weight: 700;
}

.coin-card-item h3 {
  margin: 0 0 5px;
  font-size: 16px;
}

.coin-card-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.coin-card-item > strong {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.authorized-home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.activity-card,
.recent-results-panel,
.chart-panel,
.chart-note,
.model-list,
.model-editor,
.automation-hero,
.automation-card,
.rules-panel,
.switch-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.activity-card {
  padding: 20px;
}

.activity-card.is-featured {
  border-color: #f1d99f;
  background: var(--yellow-wash);
}

.activity-card-top,
.panel-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.activity-card h3,
.panel-title-row h3 {
  margin: 5px 0 0;
  font-size: 19px;
}

.activity-card p {
  min-height: 44px;
  margin: 16px 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 13px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
  white-space: nowrap;
}

.status-badge.is-live {
  color: var(--green);
  border-color: #b8dfc9;
  background: #effaf4;
}

.activity-meta,
.activity-actions,
.participation-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.activity-meta {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 12px;
}

.activity-meta strong {
  color: var(--ink);
}

.countdown-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  padding: 16px;
  border-radius: 8px;
  background: var(--surface);
}

.countdown-line span {
  color: var(--muted);
}

.countdown-line strong {
  font-size: 36px;
  letter-spacing: 0;
}

.participation-preview {
  margin-bottom: 18px;
}

.participation-preview div,
.activity-summary-strip div {
  min-width: 0;
  flex: 1;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
}

.participation-preview span,
.activity-summary-strip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.participation-preview strong,
.activity-summary-strip strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
}

.recent-results-panel {
  padding: 20px;
}

.result-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.result-row {
  display: grid;
  grid-template-columns: 1.15fr .7fr .7fr .7fr;
  gap: 10px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.result-row:last-child {
  border-bottom: 0;
}

.result-row span {
  color: var(--muted);
}

.result-row em {
  color: var(--coral);
  font-style: normal;
}

.result-row small {
  color: var(--muted);
  text-align: right;
}

  .game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }

  .library-result-note {
    margin: -4px 0 18px;
    color: var(--muted);
    font-size: 13px;
  }

  .empty-state {
    border: 1px dashed var(--line);
    padding: 28px;
    color: var(--muted);
    text-align: center;
    background: var(--surface);
  }

.game-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  transition: border-color .18s ease, transform .18s ease;
}

.game-card:hover {
  border-color: #a8cdef;
  transform: translateY(-2px);
}

.game-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #edf0f2;
}

.game-body {
  padding: 14px;
}

.game-body h3 {
  margin: 0;
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-body p {
  height: 40px;
  margin: 8px 0 14px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.game-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.game-tag {
  color: var(--coral);
  font-size: 11px;
}

.game-footer .quiet-button {
  flex-shrink: 0;
}

.game-card.is-content-game {
  display: flex;
  flex-direction: column;
}

.game-card.is-content-game .game-body {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.game-card.is-content-game .game-footer {
  justify-content: flex-end;
  margin-top: auto;
}

.game-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.game-meta-row span:not(.game-tag) {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--blue-wash);
  color: #2f659e;
  font-size: 10px;
}

.participation-confirm__panel.library-game-detail-panel {
  width: min(980px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  padding: 0;
  overflow: auto;
}

.library-game-detail-close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  color: #17345c;
  font-size: 24px;
  line-height: 1;
}

.library-game-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr);
}

.library-game-detail-media {
  min-height: 520px;
  background: #dce9f8;
}

.library-game-detail-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.library-game-detail-copy {
  padding: 42px 34px 32px;
}

.library-game-detail-copy h2 {
  margin: 8px 0 12px;
  color: #142e52;
  font-size: 34px;
  line-height: 1.08;
}

.library-game-summary {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.library-game-facts {
  display: grid;
  gap: 9px;
  margin-top: 22px;
}

.library-game-facts div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.library-game-facts span {
  color: var(--muted);
  font-size: 12px;
}

.library-game-facts strong {
  color: #1e3f69;
  font-size: 13px;
  text-align: right;
}

.library-game-tips {
  margin-top: 20px;
  padding: 16px;
  border-radius: 14px;
  background: var(--blue-wash);
}

.library-game-tips > span {
  color: #2f659e;
  font-size: 12px;
  font-weight: 800;
}

.library-game-tips ul {
  margin: 9px 0 0;
  padding-left: 18px;
  color: #426485;
  font-size: 12px;
  line-height: 1.75;
}

.library-game-detail-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.notice-layout {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 16px;
}

.events-layout {
  margin-top: 34px;
}

.notice-list,
.info-panel,
.form-panel,
.profile-panel,
.table-panel,
.detail-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.notice-list {
  padding: 4px 22px;
}

.notice-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.notice-row:last-child {
  border-bottom: 0;
}

.notice-row.is-active {
  margin: 0 -14px;
  padding-right: 14px;
  padding-left: 14px;
  border-bottom-color: transparent;
  border-radius: 10px;
  background: var(--blue-wash);
}

.notice-row strong {
  font-size: 14px;
}

.notice-row span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.notice-type {
  margin-left: 8px;
  color: var(--coral);
  font-size: 11px;
  font-weight: 400;
}

.info-panel {
  padding: 24px;
  border-color: #f4dfaf;
  background: var(--yellow-wash);
}

.info-panel h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.info-panel p {
  color: #6d5a2c;
  line-height: 1.8;
  font-size: 13px;
}

.toolbar,
.chart-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 32px 0 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 8px 13px;
  font-size: 12px;
}

.filter.is-active,
.filter:hover {
  border-color: var(--blue);
  background: var(--blue-wash);
  color: var(--blue);
}

.search {
  width: 220px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--surface);
}

.rank-list {
  display: grid;
  gap: 10px;
}

.rank-row {
  display: grid;
  grid-template-columns: 44px 62px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.rank-no {
  color: var(--muted);
  font-size: 22px;
  font-weight: 700;
  text-align: center;
}

.rank-row:nth-child(1) .rank-no {
  color: var(--coral);
}

.rank-row:nth-child(2) .rank-no {
  color: var(--yellow);
}

.rank-row img {
  width: 62px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
}

.rank-copy strong,
.rank-copy span {
  display: block;
}

.rank-copy span {
  color: var(--muted);
  font-size: 12px;
}

.rank-score {
  color: var(--blue);
  font-weight: 700;
  text-align: right;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 30px;
}

.shop-item {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.shop-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 28px;
  border-radius: 8px;
  background: var(--blue-wash);
  color: var(--blue);
  font-size: 22px;
}

.shop-item h3 {
  margin: 0 0 6px;
}

.shop-item p {
  height: 42px;
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 13px;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.price {
  font-size: 20px;
  font-weight: 700;
}

.detail-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: center;
  margin-top: 34px;
  padding: 18px;
  border-radius: 12px;
  background: var(--deep);
  color: #fff;
}

.detail-hero img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 8px;
}

.detail-hero .eyebrow {
  color: #7ebcff;
}

.detail-hero h1 {
  margin: 14px 0;
  font-size: clamp(30px, 5vw, 58px);
}

.detail-hero p {
  color: #c3ccda;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0;
  color: #c3ccda;
  font-size: 12px;
}

.detail-meta span {
  padding-right: 12px;
  border-right: 1px solid #4b5563;
}

.detail-meta span:last-child {
  border-right: 0;
}

.detail-content {
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  gap: 16px;
  margin-top: 16px;
}

.detail-panel {
  padding: 24px;
}

.detail-panel h2 {
  margin-top: 0;
}

.detail-panel p {
  color: var(--muted);
  line-height: 1.9;
}

.feature-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.feature-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.feature-list span {
  color: var(--muted);
}

.auth-layout {
  max-width: 900px;
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 16px;
  align-items: stretch;
  margin: 20px auto 0;
}

.auth-aside {
  padding: 32px;
  border-radius: 12px;
  background: var(--deep);
  color: #fff;
}

.auth-aside h2 {
  margin: 20px 0 14px;
  font-size: 32px;
}

.auth-aside p {
  color: #c3ccda;
  line-height: 1.8;
}

.auth-aside ul {
  padding-left: 18px;
  color: #dce5ef;
  line-height: 2;
  font-size: 13px;
}

.form-panel {
  padding: 32px;
}

.form-panel h2 {
  margin: 0 0 8px;
}

.form-panel > p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 13px;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}

.field label {
  font-size: 13px;
  font-weight: 700;
}

.field input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
}

.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 10px;
  align-items: stretch;
}

.captcha-row input {
  min-width: 0;
}

.captcha-refresh {
  position: relative;
  width: 132px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fc;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.captcha-refresh:hover {
  border-color: var(--accent);
}

.captcha-refresh img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.form-note {
  color: var(--muted);
  font-size: 12px;
}

.profile-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 16px;
  margin-top: 30px;
}

.profile-nav {
  align-self: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.profile-nav button {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  padding: 12px;
  text-align: left;
}

.profile-nav button:hover,
.profile-nav button.is-active {
  background: var(--blue-wash);
  color: var(--ink);
  font-weight: 700;
}

.profile-panel {
  padding: 26px;
}

.member-center-page {
  --member-center-radius: 22px;
}

.member-center-topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--member-center-radius);
  background:
    radial-gradient(circle at 100% 0%, rgba(98, 135, 235, .14), transparent 34%),
    linear-gradient(120deg, var(--blue-wash), var(--surface) 72%);
  box-shadow: 0 18px 44px rgba(42, 72, 132, .08);
}

.member-center-identity {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 280px;
}

.member-center-identity .avatar {
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  border: 4px solid var(--surface);
  box-shadow: 0 12px 28px rgba(28, 64, 128, .14);
}

.member-center-identity > div > span {
  color: var(--blue);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.45px;
}

.member-center-identity h1 {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 23px;
  line-height: 1.15;
}

.member-center-identity p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.member-center-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.member-center-stats.is-single {
  grid-template-columns: minmax(180px, 240px);
}

.member-center-stat {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid rgba(111, 135, 185, .17);
  border-radius: 14px;
  background: rgba(255, 255, 255, .76);
}

.member-center-stat span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.member-center-stat strong {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  color: var(--ink);
  font-size: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-center-actions {
  min-width: 124px;
}

.member-center-actions .primary-button,
.member-center-actions .secondary-button {
  width: 100%;
}

.member-center-sign-button {
  margin: 0;
}

.member-center-nav {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
  margin-top: 14px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.member-center-nav.is-compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.member-center-nav.is-wide {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.member-center-nav button {
  position: relative;
  min-width: 0;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.member-center-nav button:hover {
  border-color: rgba(72, 124, 226, .14);
  background: var(--blue-wash);
  color: var(--blue-dark);
}

.member-center-nav button.is-active {
  border-color: rgba(72, 124, 226, .2);
  background: linear-gradient(135deg, var(--blue), #6d94f1);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(72, 124, 226, .2);
}

.member-center-nav button span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-center-nav button small {
  max-width: 100%;
  overflow: hidden;
  color: inherit;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .45px;
  opacity: .65;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-center-logout {
  border: 1px solid rgba(222, 92, 82, .18);
  background: rgba(255, 242, 240, .78);
  color: #c74d42;
  font-weight: 700;
}

.member-center-logout:hover {
  border-color: rgba(222, 92, 82, .34);
  background: rgba(255, 235, 232, .98);
}

.member-center-content {
  min-width: 0;
  min-height: 420px;
  margin-top: 14px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--member-center-radius);
  background: var(--surface);
}

.member-center-section-head {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.member-center-section-head > span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.4px;
}

.member-center-section-head h1 {
  margin: 7px 0 0;
  color: var(--ink);
  font-size: 26px;
  line-height: 1.2;
}

.member-center-section-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.member-center-section-head-inline {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.member-center-title-password {
  min-width: 220px;
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}

.member-center-title-password input {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--blue-wash);
  color: var(--ink);
}

.member-center-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
}

.member-center-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 29, 52, .34);
  backdrop-filter: blur(3px);
}

.member-center-modal-panel {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  max-height: min(680px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 28px 70px rgba(21, 42, 86, .22);
}

.member-center-modal-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.member-center-modal-panel header span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
}

.member-center-modal-panel header h2 {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 20px;
}

.member-center-modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.member-center-modal-close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 21px;
  line-height: 1;
}

.member-center-modal-body {
  max-height: 520px;
  overflow-y: auto;
  padding: 20px 22px 24px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.75;
}

.member-center-modal-body p {
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  word-break: break-all;
}

.member-center-modal-body p:last-child {
  border-bottom: 0;
}

.announcement-detail-content {
  max-height: 52vh;
  overflow-y: auto;
  padding: 0 22px 18px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.8;
  word-break: break-word;
}

.announcement-detail-panel {
  min-height: 280px;
  padding: 24px;
  border-color: var(--line);
  background: var(--surface);
}

.announcement-detail-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.announcement-detail-head h3 {
  margin: 6px 0;
  font-size: 20px;
  line-height: 1.35;
}

.announcement-detail-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.announcement-detail-panel .announcement-detail-content {
  max-height: 62vh;
  padding: 16px 0 0;
}

.announcement-detail-content img {
  max-width: 100%;
  height: auto;
}

.member-center-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.member-center-overview article {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.member-center-overview span,
.member-center-overview small {
  display: block;
  color: var(--muted);
}

.member-center-overview span {
  font-size: 12px;
}

.member-center-overview strong {
  display: block;
  margin-top: 8px;
  overflow: hidden;
  color: var(--ink);
  font-size: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-center-overview small {
  margin-top: 8px;
  font-size: 11px;
}

.member-center-profile-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--blue-wash);
}

.member-center-profile-note span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.member-center-profile-note h2 {
  margin: 6px 0 0;
  font-size: 18px;
}

.member-center-profile-note p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.member-center-section-mount {
  display: block;
}

.member-center-form,
.member-center-code-form,
.member-center-inline-form {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.member-center-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.member-center-form-grid label,
.member-center-inline-form label {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.member-center-form-grid label > strong {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--blue-wash);
  color: var(--ink);
  font-size: 13px;
}

.member-center-form input,
.member-center-form select,
.member-center-inline-form input,
.member-center-inline-form select,
.member-center-code-form textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

.member-center-code-form textarea {
  resize: vertical;
}

.member-center-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.member-center-form-title {
  margin-bottom: 18px;
}

.member-center-form-title span,
.member-center-subsection h2 + * {
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .8px;
}

.member-center-form-title h2,
.member-center-subsection h2 {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 18px;
}

.member-center-form-title p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.member-center-security-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.member-center-security-grid .member-center-form {
  margin-top: 0;
}

.member-center-field-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.member-center-captcha {
  width: 110px;
  min-height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--blue-wash);
}

.member-center-captcha img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-center-balance-grid,
.member-center-record-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.member-center-record-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.member-center-balance-grid article,
.member-center-record-grid article {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}

.member-center-balance-grid span,
.member-center-record-grid span,
.member-center-record-grid small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.member-center-balance-grid strong,
.member-center-record-grid strong {
  display: block;
  margin-top: 8px;
  overflow: hidden;
  color: var(--ink);
  font-size: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-center-record-grid small {
  margin-top: 8px;
}

.is-profit-win {
  color: #d64b3c !important;
}

.is-profit-loss {
  color: #21875b !important;
}

.member-center-feedback,
.member-center-result {
  margin-top: 16px;
  padding: 16px;
  border: 1px dashed rgba(96, 127, 183, .32);
  border-radius: 14px;
  background: var(--blue-wash);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.member-center-feedback.is-error {
  border-color: rgba(216, 84, 69, .3);
  background: rgba(255, 240, 238, .78);
  color: #bd493d;
}

.member-center-result-lines {
  display: grid;
  gap: 8px;
  border-style: solid;
}

.member-center-code-result-summary {
  color: var(--ink);
  font-weight: 700;
}

.member-center-code-result-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.member-center-code-result-line code {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}

.member-center-code-result-line span {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
}

.member-center-code-result-line.is-success span {
  color: #1f8f63;
}

.member-center-code-result-line.is-error span {
  color: #d34b40;
}

.member-center-trade-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  max-width: 540px;
}

.member-center-trade-summary > span {
  min-width: 0;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.member-center-trade-summary .link-button {
  flex: 0 0 auto;
  margin-top: 0;
}

.member-center-trade-detail-body p {
  white-space: pre-wrap;
}

.member-center-table {
  margin-top: 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.member-center-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
}

.member-center-sort-button span {
  color: var(--muted);
  font-size: 11px;
}

.member-center-sort-button.is-active,
.member-center-sort-button.is-active span {
  color: var(--blue-dark);
}

.member-card-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.member-card-status.is-unused {
  background: #eaf8f1;
  color: #1f8f63;
}

.member-card-status.is-used {
  background: #fff0ee;
  color: #d34b40;
}

.member-card-status.is-transferred {
  background: #fff7e8;
  color: #b8781e;
}

.member-center-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

.member-center-pagination > div {
  display: flex;
  gap: 8px;
}

.member-center-inline-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
}

.member-center-promotion-overview {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 16px;
  align-items: stretch;
  margin-top: 20px;
}

.member-center-promotion-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 100%;
  margin-top: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--blue-wash);
}

.member-center-promotion-hero img {
  width: 104px;
  height: 104px;
  flex: 0 0 104px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
}

.member-center-promotion-hero > div {
  min-width: 0;
  flex: 1;
}

.member-center-promotion-link-block {
  display: grid;
  gap: 8px;
  align-content: center;
}

.member-center-promotion-hero span,
.member-center-promotion-hero p {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.member-center-promotion-link {
  display: block;
  max-width: 32ch;
  margin-top: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
  white-space: normal;
  word-break: break-word;
}

.member-center-promotion-hero p {
  margin-top: 0;
}

.member-center-promotion-link-block .secondary-button {
  justify-self: start;
}

.member-center-promotion-rules {
  height: 100%;
  margin-top: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.member-center-rules-head span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
}

.member-center-rules-head h2 {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 18px;
}

.member-center-promotion-rules ol {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding-left: 22px;
}

.member-center-promotion-rules li {
  padding-left: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.member-center-promotion-rules strong {
  color: var(--blue-dark);
}

.member-center-subsection {
  margin-top: 22px;
}

.profile-section-placeholder {
  min-height: 310px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 30px;
  border: 1px dashed rgba(96, 127, 183, .34);
  border-radius: 18px;
  background: var(--blue-wash);
  text-align: center;
}

.profile-section-placeholder strong {
  color: var(--ink);
  font-size: 19px;
}

.profile-section-placeholder p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.profile-placeholder-state {
  margin-top: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 800;
}

.account-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.avatar {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  font-size: 21px;
  font-weight: 700;
}

.avatar-image {
  overflow: hidden;
  background: var(--blue-wash);
}

.avatar-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.account-head h2 {
  margin: 0;
  font-size: 19px;
}

.account-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.balance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}

.balance {
  padding: 16px;
  border-radius: 8px;
  background: var(--paper);
}

.balance span,
.balance strong {
  display: block;
}

.balance span {
  color: var(--muted);
  font-size: 12px;
}

.balance strong {
  margin-top: 7px;
  font-size: 22px;
}

.table-panel {
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th,
.data-table td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.data-table th {
  background: var(--paper);
  color: var(--muted);
  font-weight: 400;
}

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

.status,
.record-status {
  color: var(--green);
}

.record-status.is-pending {
  color: var(--coral);
}

.activity-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 30px 0 16px;
}

.activity-summary-strip div {
  border: 1px solid var(--line);
  background: var(--surface);
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.rules-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  background: var(--line);
}

.rules-panel div {
  padding: 18px;
  background: var(--surface);
}

.rules-panel strong,
.rules-panel span {
  display: block;
}

.rules-panel span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.chart-layout,
.model-layout {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 16px;
}

.chart-panel,
.chart-note,
.model-list,
.model-editor {
  padding: 22px;
}

.bar-chart {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.bar-row {
  display: grid;
  grid-template-columns: 126px 1fr 48px;
  gap: 14px;
  align-items: center;
}

.bar-label strong,
.bar-label span {
  display: block;
}

.bar-label span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--paper);
}

.bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.chart-note p {
  color: var(--muted);
  line-height: 1.8;
}

.model-list {
  display: grid;
  gap: 10px;
}

.model-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  text-align: left;
}

.model-row.is-active,
.model-row:hover {
  border-color: var(--blue);
  background: var(--blue-wash);
}

.model-row strong,
.model-row small {
  display: block;
}

.model-row small {
  margin-top: 5px;
  color: var(--muted);
}

.model-row b {
  color: var(--blue);
  font-size: 13px;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.setting-row span {
  color: var(--muted);
}

.editor-actions {
  justify-content: flex-end;
}

.automation-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin: 30px 0 16px;
  padding: 24px;
  background: var(--deep);
  color: #fff;
}

.automation-hero h2 {
  margin: 6px 0 8px;
}

.automation-hero p {
  margin: 0;
  color: #c3ccda;
}

.automation-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.automation-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 18px;
}

.automation-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.warning-panel {
  margin-top: 16px;
}

.switch-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 30px 0 16px;
}

.switch-card {
  display: grid;
  gap: 8px;
  padding: 20px;
  text-align: left;
}

.switch-card:hover,
.switch-card.is-active {
  border-color: var(--blue);
  background: var(--blue-wash);
}

.switch-card span {
  color: var(--green);
  font-size: 12px;
}

.switch-card strong {
  font-size: 18px;
}

.switch-card small {
  color: var(--muted);
  word-break: break-all;
}

.empty {
  padding: 54px 20px;
  border: 1px dashed #c8c5be;
  border-radius: 12px;
  background: rgba(255, 255, 255, .5);
  color: var(--muted);
  text-align: center;
}

.empty strong,
.empty span {
  display: block;
}

.empty strong {
  margin-bottom: 8px;
  color: var(--ink);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.footer strong {
  margin-right: 12px;
  color: var(--ink);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 30;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--deep);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 20px);
  transition: opacity .2s ease, transform .2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1040px) {
  .game-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero {
    gap: 24px;
  }

  .quick-links,
  .activity-summary-strip,
  .switch-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .notice-layout,
  .detail-content,
  .authorized-home-grid,
  .authorized-game-columns,
  .chart-layout,
  .model-layout {
    grid-template-columns: 1fr;
  }

  .authorized-live-board {
    grid-template-columns: 1fr;
  }

  .coin-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar {
    height: 64px;
    padding: 0 20px;
    position: sticky;
  }

  .brand {
    min-width: 0;
  }

  .user-greeting {
    max-width: 240px;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .top-actions {
    display: none;
  }

  .activity-rank-row {
    grid-template-columns: 40px 1fr auto;
    gap: 10px;
    padding: 12px 14px;
  }

  .activity-rank-row small {
    grid-column: 2;
  }

  .activity-rank-row b {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .coin-card-item {
    grid-template-columns: auto 1fr;
  }

  .coin-card-item > strong {
    grid-column: 2;
  }

  .coin-card-quantity {
    grid-column: 2;
  }

  .coin-card-item > button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .mobile-menu {
    display: block;
    margin-left: auto;
  }

  .topbar.menu-open .main-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    z-index: 22;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px 18px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
  }

  .topbar.menu-open .top-actions {
    position: absolute;
    left: 20px;
    right: 20px;
    top: 208px;
    z-index: 22;
    display: flex;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
  }

  .page {
    width: min(calc(100% - 32px), var(--max));
    padding: 30px 0 52px;
  }

  .hero,
  .detail-hero,
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .authorized-game-nav {
    padding: 0 10px;
  }

  .authorized-game-columns {
    padding: 10px;
  }

  .authorized-history-card {
    margin: 0 10px 10px;
  }

  .hero {
    padding-top: 12px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-art {
    min-height: 0;
  }

  .hero-art img {
    height: 230px;
  }

  .game-grid,
  .shop-grid,
  .activity-grid,
  .automation-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .game-body {
    padding: 11px;
  }

  .game-body p {
    margin-bottom: 10px;
  }

  .game-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar,
  .chart-toolbar,
  .automation-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .search,
  .automation-hero .primary-button {
    width: 100%;
  }

  .rank-row {
    grid-template-columns: 30px 50px 1fr;
    gap: 10px;
  }

  .rank-row img {
    width: 50px;
    height: 44px;
  }

  .rank-score {
    grid-column: 3;
    text-align: left;
  }

  .profile-layout {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
  }

  .profile-layout > * {
    min-width: 0;
  }

  .profile-nav {
    display: flex;
    gap: 4px;
    max-width: 100%;
    overflow-x: auto;
  }

  .profile-nav button {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .account-head {
    flex-wrap: wrap;
  }

  .balance-grid,
  .activity-summary-strip,
  .rules-panel {
    grid-template-columns: 1fr;
  }

  .result-row {
    grid-template-columns: 1fr 1fr;
  }

  .result-row small {
    text-align: left;
  }

  .bar-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .table-panel {
    overflow-x: auto;
  }

  .data-table {
    min-width: 560px;
  }

  .footer {
    display: block;
    padding: 22px 16px;
  }

  .footer-links {
    flex-wrap: wrap;
    margin-top: 14px;
  }
}

@media (max-width: 460px) {
  .game-grid,
  .shop-grid,
  .activity-grid,
  .automation-grid,
  .quick-links,
  .switch-grid {
    grid-template-columns: 1fr;
  }

  .quick-link,
  .quick-link:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .quick-link:last-child {
    border-bottom: 0;
  }

  .activity-actions,
  .editor-actions,
  .price-row,
  .form-row {
    align-items: stretch;
    flex-direction: column;
  }

  .activity-actions .primary-button,
  .activity-actions .secondary-button,
  .editor-actions .primary-button,
  .editor-actions .secondary-button,
  .price-row .primary-button,
  .form-row .primary-button,
  .form-row .secondary-button {
    width: 100%;
  }

  .countdown-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .countdown-line strong {
    font-size: 30px;
  }
}


/* Authorized participation panel */
.authorized-profile-card {
  display: grid;
  gap: 16px;
}

.authorized-profile-head {
  display: flex;
  gap: 12px;
  align-items: center;
}

.authorized-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, #3656f5, #ef5bd7);
}

.authorized-avatar-image {
  overflow: hidden;
}

.authorized-avatar-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.authorized-profile-head strong,
.authorized-profile-head span,
.authorized-profile-balance span,
.authorized-profile-note {
  display: block;
}

.authorized-profile-head span,
.authorized-profile-balance span,
.authorized-profile-note {
  color: var(--muted);
  font-size: 13px;
}

.authorized-profile-balance {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #f7f8ff;
  border: 1px solid var(--line);
}

.authorized-profile-balance span,
.authorized-profile-balance strong {
  display: inline;
  margin-top: 0;
}

.authorized-profile-balance strong {
  color: #ff6b00;
  font-size: 20px;
}

.authorized-board-tabs,
.quick-amounts,
.participation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.authorized-profile-actions {
  display: grid;
  gap: 12px;
}

.authorized-action-group {
  display: grid;
  gap: 7px;
}

.authorized-action-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.authorized-action-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.authorized-action-buttons .primary-button,
.authorized-action-buttons .secondary-button {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
}

.authorized-leaderboard,
.authorized-weekly-board {
  display: grid;
  gap: 12px;
}

.authorized-side-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.authorized-side-heading h3 {
  margin: 2px 0 0;
}

.authorized-board-tabs button,
.quick-amounts button,
.participation-option {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 7px 12px;
  cursor: pointer;
}

.authorized-board-tabs .is-active,
.participation-option.is-active {
  border-color: #3656f5;
  color: #3656f5;
  background: #eef2ff;
}

.authorized-mini-list {
  display: grid;
  gap: 8px;
}

.authorized-mini-row,
.authorized-rank-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

.authorized-mini-row:last-child,
.authorized-rank-row:last-child {
  border-bottom: 0;
}

.authorized-mini-row b,
.authorized-rank-row b {
  color: #4a5d8f;
}

.authorized-mini-row strong,
.authorized-rank-row strong {
  color: #2d65c8;
  font-size: 13px;
}

.authorized-rank-caption,
.authorized-rank-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.authorized-rank-caption {
  color: var(--muted);
  font-size: 12px;
}

.authorized-rank-list {
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.authorized-rank-row {
  padding: 7px 0;
}

.authorized-rank-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.authorized-rank-row small,
.authorized-rank-empty {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.authorized-rank-empty {
  padding: 8px 0;
}

.authorized-participation-page {
  display: grid;
  gap: 18px;
}

.participation-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.participation-page-head h2,
.participation-page-head p {
  margin: 4px 0 0;
}

.participation-page-head p {
  color: var(--muted);
}

.participation-countdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.participation-countdown div {
  padding: 14px;
  border-radius: 16px;
  background: #f7f8ff;
  border: 1px solid var(--line);
}

.participation-countdown span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.participation-countdown strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
}

.participation-form {
  display: grid;
  gap: 16px;
}

.participation-form-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(160px, .8fr) minmax(180px, 1fr);
  gap: 14px;
}

.participation-form .field {
  display: grid;
  gap: 8px;
}

.participation-form label {
  color: var(--text);
  font-weight: 700;
}

.participation-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.participation-form input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  background: #fff;
  color: var(--text);
}

.participation-amount {
  display: flex;
  align-items: center;
  gap: 8px;
}

.participation-amount span {
  color: var(--muted);
  white-space: nowrap;
}

.participation-actions {
  justify-content: flex-end;
}

.participation-workbench {
  gap: 14px;
}

.participation-panel {
  padding: 16px;
  border: 1px solid #dfe6ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(25, 47, 78, .08);
}

.participation-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.participation-panel-head h3,
.participation-panel-head p {
  margin: 4px 0 0;
}

.participation-panel-head p {
  color: var(--muted);
  font-size: 12px;
}

.participation-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.participation-mode-tab {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--muted);
  font-weight: 700;
}

.participation-mode-tab.is-active {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}

.participation-mode-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.participation-mode-summary > div {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.participation-mode-summary > div.is-warm {
  border-color: #ffd2ac;
  background: #fff8ef;
}

.participation-mode-summary strong,
.participation-mode-summary span {
  display: block;
}

.participation-mode-summary strong {
  margin-bottom: 4px;
  font-size: 17px;
}

.participation-mode-summary span {
  color: var(--muted);
  font-size: 12px;
}

.participation-control-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.participation-control-label {
  width: 64px;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.participation-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.participation-filter-chip {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
}

.participation-filter-chip:hover,
.participation-filter-chip.is-active {
  color: var(--blue);
  border-color: #9bc9f6;
  background: var(--blue-wash);
}

.participation-workbench-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
  gap: 12px;
  align-items: start;
}

.participation-selection-panel {
  min-width: 0;
}

.participation-selection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 720px;
  overflow-y: auto;
  padding-right: 4px;
}

.participation-number-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 88px;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
}

.participation-number-row:hover,
.participation-number-row.is-selected {
  border-color: #82bff5;
  background: var(--blue-wash);
}

.participation-number-badge {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid #9bc9f6;
  border-radius: 50%;
  background: var(--blue-wash);
  color: var(--blue);
  font-weight: 800;
}

.participation-number-row.is-selected .participation-number-badge {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}

.participation-number-copy {
  min-width: 0;
}

.participation-number-copy strong,
.participation-number-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participation-number-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.participation-number-input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.participation-number-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(8, 120, 229, .1);
}

.participation-summary {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #dfe6ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(25, 47, 78, .08);
}

.participation-workbench .participation-countdown div {
  border-color: #dfe6ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(25, 47, 78, .08);
}

.participation-summary h3 {
  margin: 0;
  font-size: 16px;
}

.participation-summary .summary-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.participation-summary-box {
  padding: 10px;
  border-radius: 9px;
  background: var(--surface);
}

.participation-summary-box strong {
  display: block;
  margin-top: 5px;
  font-size: 20px;
}

.participation-summary-box.is-total {
  border: 1px solid #ffd2ac;
  background: #fff8ef;
}

.participation-summary-box.is-total strong {
  color: var(--orange);
}

.participation-selected-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 28px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.participation-selected-list span {
  min-width: 27px;
  padding: 4px 6px;
  border-radius: 5px;
  background: var(--blue-wash);
  color: var(--blue);
  text-align: center;
  font-weight: 700;
}

.participation-summary .primary-button,
.participation-summary .secondary-button {
  width: 100%;
}

.participation-summary .form-note {
  margin: 0;
}

@media (max-width: 900px) {
  .shop-vip-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .shop-vip-grid {
    grid-template-columns: 1fr;
  }

  .member-center-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .member-center-identity {
    min-width: 0;
  }

  .member-center-nav {
    display: flex;
    max-width: 100%;
    overflow-x: auto;
  }

  .member-center-nav button {
    flex: 0 0 132px;
  }

  .member-center-content {
    min-height: 0;
  }

  .member-center-logout {
    justify-self: start;
  }

  .member-center-security-grid,
  .member-center-inline-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .member-center-section-head-inline {
    align-items: stretch;
    flex-direction: column;
  }

  .member-center-title-password {
    min-width: 0;
  }

  .member-center-record-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .member-center-promotion-overview {
    grid-template-columns: 1fr;
  }

  .member-center-profile-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .authorized-game-columns {
    grid-template-columns: 1fr;
  }

  .authorized-game-side {
    width: 100%;
  }

  .table-panel {
    overflow-x: auto;
  }

  .participation-form-grid,
  .participation-countdown {
    grid-template-columns: 1fr;
  }

  .participation-page-head {
    flex-direction: column;
  }

  .participation-workbench-grid {
    grid-template-columns: 1fr;
  }

  .participation-summary {
    position: static;
  }
}

@media (max-width: 620px) {
  .member-center-stats,
  .member-center-overview,
  .member-center-form-grid,
  .member-center-security-grid,
  .member-center-balance-grid,
  .member-center-record-grid,
  .member-center-inline-form {
    grid-template-columns: 1fr;
  }

  .member-center-promotion-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .participation-mode-tabs,
  .participation-mode-summary,
  .participation-selection-grid {
    grid-template-columns: 1fr;
  }

  .participation-control-label {
    width: 100%;
  }

  .participation-number-row {
    grid-template-columns: 38px minmax(0, 1fr) 78px;
  }
}

@media (max-width: 760px) {
  .library-game-detail {
    grid-template-columns: 1fr;
  }

  .library-game-detail-media {
    min-height: 220px;
  }

  .library-game-detail-copy {
    padding: 28px 20px 24px;
  }

  .library-game-detail-copy h2 {
    font-size: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
