body.theme-main {
  --paper: #f6f5f2;
  --surface: #fff;
  --ink: #171717;
  --muted: #686868;
  --line: #e2e0db;
  --blue: #0878e5;
  --blue-dark: #056bcf;
  --blue-wash: #e8f3fd;
  --yellow: #f5b335;
  --yellow-wash: #fff9e9;
  --green: #2b8a56;
  --coral: #e95b45;
}

body.theme-game {
  --paper: #f5f8ff;
  --surface: #fff;
  --ink: #15203a;
  --muted: #687494;
  --line: #dce6f7;
  --blue: #4f7df3;
  --blue-dark: #345fd8;
  --blue-wash: #edf2ff;
  --yellow: #f8c34a;
  --yellow-wash: #fff8e8;
  --green: #12a879;
  --coral: #ff7a5c;
  background:
    radial-gradient(circle at 12% 0%, rgba(94, 132, 255, .11), transparent 32%),
    radial-gradient(circle at 88% 8%, rgba(255, 138, 61, .09), transparent 28%),
    var(--paper);
}

.site-theme-switch {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-theme-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 17px;
  font-weight: 800;
}

.site-theme-button[data-site-theme="main"] {
  color: var(--blue);
  background: var(--blue-wash);
}

.site-theme-button[data-site-theme="game"] {
  color: #6d55d8;
  background: linear-gradient(135deg, #edf2ff, #fff3e8);
}

.site-theme-button.is-active {
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(79, 125, 243, .24);
}

body.theme-main .site-theme-button[data-site-theme="main"].is-active {
  background: linear-gradient(135deg, var(--blue), #62a7ff);
}

body.theme-game .site-theme-button[data-site-theme="game"].is-active {
  background: linear-gradient(135deg, #4f7df3, #8b5cf6, #ff8a3d);
}

body.theme-game .topbar,
body.theme-game .site-shell {
  background-color: transparent;
}

body.theme-game .topbar {
  background: rgba(245, 248, 255, .96);
  border-bottom-color: rgba(126, 151, 212, .22);
}

body.theme-game .game-card,
body.theme-game .panel,
body.theme-game .form-panel,
body.theme-game .activity-card,
body.theme-game .automation-card,
body.theme-game .shop-item,
body.theme-game .profile-panel,
body.theme-game .authorized-table-card,
body.theme-game .authorized-side-card {
  border-color: var(--line);
  border-radius: 20px;
}

body.theme-game .primary-button {
  border-color: transparent;
  background: linear-gradient(135deg, #4f7df3, #7867f2);
}

.authorized-game-redesign {
  --game-canvas: #f5f7fb;
  --game-surface: #fff;
  --game-surface-soft: #f7f9fc;
  --game-line: #dfe6ef;
  --game-ink: #172033;
  --game-muted: #708096;
  --game-accent: #0878e5;
  --game-accent-soft: #eaf4ff;
  --game-orange: #ff6b00;
  --game-orange-soft: #fff2e5;
  --game-green: #0c9b68;
  --game-radius: 14px;
  --game-radius-sm: 9px;
  --game-shadow: 0 12px 34px rgba(24, 47, 79, .08);
}

.authorized-game-redesign.theme-game {
  --game-canvas: #f5f8ff;
  --game-surface-soft: #f7f9ff;
  --game-line: #dce6f7;
  --game-ink: #15203a;
  --game-muted: #687494;
  --game-accent: #4f7df3;
  --game-accent-soft: #edf2ff;
  --game-orange: #ff8a3d;
  --game-orange-soft: #fff3e8;
  --game-green: #12a879;
  --game-radius: 20px;
  --game-radius-sm: 13px;
  --game-shadow: 0 16px 40px rgba(73, 103, 172, .13);
}

.authorized-game-redesign .authorized-game-tabs {
  position: relative;
  padding-right: 92px;
}

.authorized-game-redesign .authorized-theme-switch {
  position: absolute;
  top: 50%;
  right: 0;
  display: flex;
  gap: 8px;
  transform: translateY(-50%);
}

.authorized-game-redesign .authorized-theme-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--game-line);
  border-radius: 50%;
  background: var(--game-surface);
  color: var(--game-muted);
  font-size: 17px;
  font-weight: 800;
}

.authorized-game-redesign .authorized-theme-button[data-authorized-theme="main"] {
  color: var(--game-accent);
  background: var(--game-accent-soft);
}

.authorized-game-redesign .authorized-theme-button[data-authorized-theme="game"] {
  color: #6d55d8;
  background: linear-gradient(135deg, #edf2ff, #fff3e8);
}

.authorized-game-redesign .authorized-theme-button.is-active {
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(79, 125, 243, .25);
}

.authorized-game-redesign .authorized-profile-profit {
  width: 100%;
  min-height: 56px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 12px;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  padding: 0 14px;
  border: 1px solid var(--game-line);
  border-radius: 16px;
  color: var(--game-muted);
  background: #f7f8ff;
  text-align: left;
}

.authorized-game-redesign .authorized-profile-profit span {
  font-size: 14px;
}

.authorized-game-redesign .authorized-profile-profit strong {
  min-width: 0;
  overflow: hidden;
  color: var(--game-ink);
  font-size: 18px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.authorized-game-redesign .authorized-profile-profit em {
  color: var(--game-accent);
  font-size: 16px;
  font-style: normal;
  font-weight: 800;
}

.authorized-game-redesign .authorized-profile-profit strong.is-profit-win {
  color: #e5484d;
}

.authorized-game-redesign .authorized-profile-profit strong.is-profit-loss {
  color: #12a879;
}

.authorized-game-redesign.theme-main .authorized-theme-button[data-authorized-theme="main"].is-active {
  background: linear-gradient(135deg, var(--game-accent), #62a7ff);
}

.authorized-game-redesign.theme-game .authorized-theme-button[data-authorized-theme="game"].is-active {
  background: linear-gradient(135deg, #4f7df3, #8b5cf6, #ff8a3d);
}

.authorized-game-redesign .game-live-board {
  display: grid;
  grid-template-columns: 1.05fr 1.25fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.authorized-game-redesign .game-live-card,
.authorized-game-redesign .game-panel {
  border: 1px solid var(--game-line);
  border-radius: var(--game-radius);
  background: var(--game-surface);
  box-shadow: var(--game-shadow);
}

.authorized-game-redesign .game-live-card {
  min-height: 156px;
  padding: 20px;
  text-align: center;
}

.authorized-game-redesign .game-live-card > span:first-child,
.authorized-game-redesign .game-muted {
  color: var(--game-muted);
  font-size: 12px;
}

.authorized-game-redesign .game-live-card strong {
  display: block;
  margin-top: 8px;
  font-size: 19px;
}

.authorized-game-redesign .game-countdown {
  color: #e95b45;
  font-size: 34px !important;
}

.authorized-game-redesign.theme-game .game-countdown {
  color: #ff7a45;
}

.authorized-game-redesign .game-number-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 15px;
}

.authorized-game-redesign .game-number-line i,
.authorized-game-redesign .game-number-line b {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-style: normal;
  font-weight: 800;
}

.authorized-game-redesign .game-number-line i {
  background: var(--game-accent-soft);
  color: var(--game-accent);
}

.authorized-game-redesign .game-number-line b {
  background: var(--game-green);
  color: #fff;
}

.authorized-game-redesign .game-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eaf8f0;
  color: var(--game-green);
  font-size: 12px;
  font-weight: 700;
}

.authorized-game-redesign .game-home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: 14px;
}

.authorized-game-redesign .game-panel {
  padding: 20px;
}

.authorized-game-redesign .game-panel + .game-panel {
  margin-top: 14px;
}

.authorized-game-redesign .game-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.authorized-game-redesign .game-panel-head h2,
.authorized-game-redesign .game-panel-head h3,
.authorized-game-redesign .game-panel-head p {
  margin: 0;
}

.authorized-game-redesign .game-panel-head p {
  margin-top: 5px;
  color: var(--game-muted);
  font-size: 12px;
}

.authorized-game-redesign .game-table-wrap {
  overflow-x: auto;
}

.authorized-game-redesign .mine-records-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid var(--game-line);
  border-radius: 14px;
  background: var(--game-surface-soft);
  color: var(--game-muted);
  font-size: 13px;
}

.authorized-game-redesign .mine-page-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.authorized-game-redesign .mine-page-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--game-line);
  border-radius: 10px;
  background: #fff;
  color: var(--game-ink);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.authorized-game-redesign .mine-page-button:hover {
  border-color: color-mix(in srgb, var(--game-accent) 45%, white);
  color: var(--game-accent);
}

.authorized-game-redesign .mine-page-button.is-active {
  border-color: var(--game-accent);
  background: var(--game-accent);
  color: #fff;
  box-shadow: 0 6px 14px color-mix(in srgb, var(--game-accent) 24%, transparent);
}

.authorized-game-redesign .mine-page-button:disabled {
  cursor: not-allowed;
  opacity: .38;
}

.authorized-game-redesign .mine-page-size {
  width: 120px;
  flex: 0 0 120px;
  min-width: 120px;
}

.authorized-game-redesign .mine-pagination-total {
  white-space: nowrap;
}

.authorized-game-redesign .mine-records-table-wrap {
  border: 1px solid var(--game-line);
  border-radius: 14px;
  background: #fff;
}

.authorized-game-redesign .mine-records-table {
  min-width: 860px;
}

.authorized-game-redesign .mine-records-table .is-profit-win {
  color: #e05252;
  font-weight: 800;
}

.authorized-game-redesign .mine-records-table .is-profit-loss {
  color: #22a06b;
  font-weight: 800;
}

.authorized-game-redesign .mine-detail-dialog .participation-confirm__panel {
  width: min(920px, calc(100vw - 48px));
  max-height: 88vh;
  padding: 0;
  overflow: hidden;
}

.authorized-game-redesign .mine-detail-panel {
  position: relative;
}

.authorized-game-redesign .mine-detail-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--game-surface-soft);
  color: var(--game-muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.authorized-game-redesign .mine-detail-close:hover {
  background: var(--game-accent-soft);
  color: var(--game-accent);
}

.authorized-game-redesign .mine-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 60px 18px;
  text-align: left;
}

.authorized-game-redesign .mine-detail-emblem {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  margin: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--game-accent), #7c5cf2);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--game-accent) 25%, transparent);
}

.authorized-game-redesign .mine-detail-header h2,
.authorized-game-redesign .mine-detail-header p {
  margin: 0;
}

.authorized-game-redesign .mine-detail-header h2 {
  color: var(--game-ink);
  font-size: 20px;
}

.authorized-game-redesign .mine-detail-header p {
  margin-top: 5px;
  color: var(--game-muted);
  font-size: 13px;
}

.authorized-game-redesign .mine-detail-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0 28px 16px;
}

.authorized-game-redesign .mine-detail-overview > div {
  padding: 14px 16px;
  border: 1px solid var(--game-line);
  border-radius: 14px;
  background: var(--game-surface-soft);
}

.authorized-game-redesign .mine-detail-overview span,
.authorized-game-redesign .mine-detail-overview strong {
  display: block;
}

.authorized-game-redesign .mine-detail-overview span {
  color: var(--game-muted);
  font-size: 12px;
}

.authorized-game-redesign .mine-detail-overview strong {
  margin-top: 6px;
  color: var(--game-ink);
  font-size: 20px;
  line-height: 1.2;
  white-space: nowrap;
}

.authorized-game-redesign .mine-detail-overview .is-profit-win {
  color: #e05252;
  font-weight: 900;
}

.authorized-game-redesign .mine-detail-overview .is-profit-loss {
  color: #22a06b;
  font-weight: 900;
}

.authorized-game-redesign .mine-detail-table-wrap {
  max-height: 52vh;
  margin: 0 28px 24px;
  border: 1px solid var(--game-line);
  border-radius: 14px;
  overflow: auto;
  background: #fff;
}

.authorized-game-redesign .mine-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.authorized-game-redesign .mine-detail-table th,
.authorized-game-redesign .mine-detail-table td {
  height: 44px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--game-line);
  white-space: nowrap;
}

.authorized-game-redesign .mine-detail-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--game-muted);
  background: var(--game-surface-soft);
  font-size: 12px;
  font-weight: 800;
}

.authorized-game-redesign .mine-detail-table th:not(:first-child),
.authorized-game-redesign .mine-detail-table td:not(:first-child) {
  text-align: right;
}

.authorized-game-redesign .mine-detail-table tbody tr:last-child td {
  border-bottom: 0;
}

.authorized-game-redesign .mine-detail-table tbody tr.is-win {
  background: #f2fcf8;
}

.authorized-game-redesign .mine-detail-number {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--mine-number-color, var(--game-accent));
  color: #fff;
  font-weight: 900;
}

.authorized-game-redesign .mine-detail-empty {
  color: var(--game-muted);
  text-align: center !important;
}

.authorized-game-redesign .mine-detail-table .is-profit-win {
  color: #e05252;
  font-weight: 900;
}

.authorized-game-redesign .mine-detail-table .is-profit-loss {
  color: #22a06b;
  font-weight: 900;
}

.authorized-game-redesign .game-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.authorized-game-redesign .game-table th,
.authorized-game-redesign .game-table td {
  height: 46px;
  padding: 10px 14px;
  border-top: 1px solid var(--game-line);
  vertical-align: middle;
}

.authorized-game-redesign .game-table th {
  height: 42px;
  color: var(--game-muted);
  background: var(--game-surface-soft);
  font-size: 12px;
  font-weight: 700;
}

.authorized-game-redesign .game-table th:not(:first-child),
.authorized-game-redesign .game-table td:not(:first-child) {
  text-align: center;
}

.authorized-game-redesign .game-profile-card,
.authorized-game-redesign .game-rank-card {
  padding: 18px;
}

.authorized-game-redesign .game-profile-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.authorized-game-redesign .game-avatar {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #3a5ef5, #ee5bd5);
  color: #fff;
  font-weight: 800;
}

.authorized-game-redesign .game-profile-head strong,
.authorized-game-redesign .game-profile-head span {
  display: block;
}

.authorized-game-redesign .game-profile-head span {
  margin-top: 4px;
  color: var(--game-muted);
  font-size: 12px;
}

.authorized-game-redesign .game-profile-balance {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--game-line);
  border-radius: var(--game-radius-sm);
  background: var(--game-surface-soft);
}

.authorized-game-redesign.theme-game .game-profile-balance {
  background: linear-gradient(135deg, #f4f7ff, #fff5ec);
}

.authorized-game-redesign .game-profile-balance strong {
  color: var(--game-orange);
  font-size: 26px;
}

.authorized-game-redesign .game-rank-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 34px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid var(--game-line);
  color: var(--game-muted);
  font-size: 12px;
}

.authorized-game-redesign .game-rank-row b {
  color: var(--game-accent);
}

.authorized-game-redesign .game-rank-row strong {
  color: var(--game-ink);
}

.authorized-game-redesign .game-page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 74px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--game-line);
}

.authorized-game-redesign .game-page-title h1,
.authorized-game-redesign .game-page-title p {
  margin: 0;
}

.authorized-game-redesign .game-page-title h1 {
  font-size: 28px;
}

.authorized-game-redesign .game-page-title p {
  margin-top: 6px;
  color: var(--game-muted);
}

.authorized-game-redesign .game-button {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--game-line);
  border-radius: var(--game-radius-sm);
  background: var(--game-surface);
  color: var(--game-ink);
  font-weight: 700;
}

.authorized-game-redesign .game-button.primary {
  color: #fff;
  border-color: var(--game-accent);
  background: var(--game-accent);
}

.authorized-game-redesign .game-button.confirm {
  color: #fff;
  border-color: var(--game-orange);
  background: var(--game-orange);
}

.authorized-game-redesign.theme-game .game-button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, #4f7df3, #7867f2);
}

.authorized-game-redesign.theme-game .game-button.confirm {
  border-color: transparent;
  background: linear-gradient(135deg, #ff8a3d, #ff6f61);
}

.authorized-game-redesign .game-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.authorized-game-redesign .game-mode-tab {
  min-height: 42px;
  border: 1px solid var(--game-line);
  border-radius: var(--game-radius-sm);
  background: var(--game-surface);
  color: var(--game-muted);
  font-weight: 700;
}

.authorized-game-redesign .game-mode-tab.is-active {
  color: #fff;
  border-color: var(--game-accent);
  background: var(--game-accent);
}

.authorized-game-redesign.theme-game .game-mode-tab.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, #4f7df3, #7867f2);
}

.authorized-game-redesign .game-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.authorized-game-redesign .game-chip {
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--game-line);
  border-radius: 999px;
  background: var(--game-surface-soft);
  color: var(--game-muted);
  font-size: 12px;
}

.authorized-game-redesign .game-chip.is-active {
  color: var(--game-accent);
  border-color: color-mix(in srgb, var(--game-accent) 35%, white);
  background: var(--game-accent-soft);
}

.authorized-game-redesign .game-control-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid var(--game-line);
}

.authorized-game-redesign .participation-custom-control {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.authorized-game-redesign .participation-custom-control .game-control-input {
  width: 118px;
  height: 34px;
}

.authorized-game-redesign .participation-custom-control .game-button {
  min-height: 34px;
  height: 34px;
  padding: 0 13px;
}

.authorized-game-redesign .participation-number-copy {
  display: grid;
  gap: 3px;
}

.authorized-game-redesign .participation-number-odds,
.authorized-game-redesign .participation-number-record {
  display: block;
  overflow: hidden;
  color: var(--game-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.authorized-game-redesign .participation-number-odds {
  color: var(--game-accent);
  font-weight: 700;
}

.authorized-game-redesign .game-control-label {
  width: 64px;
  color: var(--game-muted);
  font-size: 12px;
  font-weight: 700;
}

.authorized-game-redesign .game-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  align-items: start;
}

.authorized-game-redesign .game-participation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  align-items: start;
}

.authorized-game-redesign .game-participation-layout .participation-top-sections,
.authorized-game-redesign .game-participation-layout > .participation-panel,
.authorized-game-redesign .game-participation-layout .game-workbench > .participation-selection-panel {
  grid-column: 1;
}

.authorized-game-redesign .game-participation-layout .game-workbench {
  display: contents;
}

.authorized-game-redesign .game-participation-layout .game-workbench > .game-summary-card {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: start;
}

.authorized-game-redesign .participation-top-sections {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  gap: 14px;
  align-items: stretch;
}

.authorized-game-redesign .participation-quick-panel {
  min-width: 0;
  height: 320px;
  display: flex;
  flex-direction: column;
}

.authorized-game-redesign .quick-select-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px;
}

.authorized-game-redesign .quick-select-button {
  min-height: 40px;
  padding: 0 8px;
  border: 1px solid var(--game-line);
  border-radius: 6px;
  background: var(--game-surface);
  color: var(--game-accent);
  font-size: 13px;
  font-weight: 700;
}

.authorized-game-redesign .quick-select-button:hover,
.authorized-game-redesign .quick-select-button.is-active {
  border-color: color-mix(in srgb, var(--game-accent) 40%, white);
  background: var(--game-accent-soft);
}

.authorized-game-redesign .custom-mode-panel {
  min-width: 0;
  height: 320px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--game-line);
  border-radius: var(--game-radius);
  background: var(--game-surface);
  box-shadow: var(--game-shadow);
}

.authorized-game-redesign .custom-mode-body {
  flex: 1;
  min-height: 0;
  padding: 0;
  overflow-y: auto;
  background: transparent;
}

.authorized-game-redesign .custom-mode-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.authorized-game-redesign .custom-mode-tag {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--game-accent) 24%, white);
  border-radius: 5px;
  background: var(--game-accent-soft);
  color: var(--game-accent);
  font-weight: 700;
}

.authorized-game-redesign .custom-mode-tag:hover {
  border-color: color-mix(in srgb, var(--game-accent) 40%, white);
  background: #fff;
}

.authorized-game-redesign .custom-mode-tag.is-active {
  color: #fff;
  border-color: #ff8a3d;
  background: linear-gradient(135deg, #ff9b42, #ff704d);
  box-shadow: 0 7px 18px rgba(255, 112, 77, .24);
}

.authorized-game-redesign .custom-mode-empty {
  color: var(--game-muted);
  font-size: 13px;
}

.authorized-game-redesign .game-selection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(14, minmax(64px, auto));
  grid-auto-flow: column;
  gap: 10px;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.authorized-game-redesign .game-number-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) minmax(260px, 300px);
  align-items: center;
  gap: 8px;
  min-height: 64px;
  padding: 10px;
  border: 1px solid var(--game-line);
  border-radius: var(--game-radius-sm);
  background: var(--game-surface);
}

.authorized-game-redesign .game-number-row:hover,
.authorized-game-redesign .game-number-row.is-selected {
  border-color: color-mix(in srgb, var(--game-accent) 45%, white);
  background: var(--game-accent-soft);
}

.authorized-game-redesign.theme-game .game-number-row.is-selected {
  background: linear-gradient(135deg, #f1f5ff, #fff5ed);
}

.authorized-game-redesign .game-number-badge {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--game-accent-soft);
  color: var(--game-accent);
  font-weight: 800;
}

.authorized-game-redesign .game-number-copy {
  min-width: 0;
}

.authorized-game-redesign .game-number-copy strong,
.authorized-game-redesign .game-number-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.authorized-game-redesign .game-number-copy small {
  margin-top: 4px;
  color: var(--game-muted);
  font-size: 11px;
}

.authorized-game-redesign .game-number-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.authorized-game-redesign .game-number-input,
.authorized-game-redesign .game-control-input,
.authorized-game-redesign .game-select {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--game-line);
  border-radius: var(--game-radius-sm);
  background: var(--game-surface);
  color: var(--game-ink);
}

.authorized-game-redesign .game-number-input {
  text-align: right;
}

.authorized-game-redesign .game-multiplier {
  display: none;
  align-items: center;
  gap: 3px;
  min-width: 0;
  overflow-x: auto;
  color: var(--game-muted);
  scrollbar-width: none;
}

.authorized-game-redesign .game-multiplier::-webkit-scrollbar {
  display: none;
}

.authorized-game-redesign .game-number-row.has-amount .game-multiplier {
  display: flex;
}

.authorized-game-redesign .game-number-row.has-amount .game-number-entry {
  grid-template-columns: minmax(90px, 140px) minmax(0, 1fr);
}

.authorized-game-redesign .game-number-row.has-amount .game-number-input {
  width: 100%;
  min-width: 90px;
  max-width: 140px;
}

.authorized-game-redesign .game-multiplier button {
  min-width: 27px;
  height: 27px;
  padding: 0 5px;
  border: 1px solid var(--game-line);
  border-radius: 5px;
  background: var(--game-surface);
  color: var(--game-muted);
  font-size: 12px;
}

.authorized-game-redesign .game-multiplier-icon {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--game-orange-soft);
  color: var(--game-orange);
  font-size: 11px;
  font-weight: 900;
}

.authorized-game-redesign .game-summary-card {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 112px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 18px;
  border: 1px solid var(--game-line);
  border-radius: var(--game-radius);
  background: var(--game-surface);
  box-shadow: var(--game-shadow);
}

.authorized-game-redesign .game-summary-box {
  margin-top: 12px;
  padding: 13px;
  border-radius: var(--game-radius-sm);
  background: var(--game-surface-soft);
}

.authorized-game-redesign .game-summary-box.total {
  border: 1px solid #ffd2ac;
  background: var(--game-orange-soft);
}

.authorized-game-redesign .game-summary-box strong {
  display: block;
  margin-top: 5px;
  font-size: 22px;
}

.authorized-game-redesign .game-summary-box.total strong {
  color: var(--game-orange);
}

.authorized-game-redesign .game-summary-card .game-button {
  width: 100%;
  margin-top: 10px;
}

.authorized-game-redesign .mode-edit-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.authorized-game-redesign .mode-edit-actions[hidden] {
  display: none !important;
}

.authorized-game-redesign .mode-edit-actions .game-button {
  width: 100%;
  margin-top: 0;
}

.authorized-game-redesign .mode-edit-actions .mode-delete-button {
  border-color: #f1c2c2;
  color: #d84d4d;
  background: #fff5f5;
}

.authorized-game-redesign .participation-summary-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.authorized-game-redesign .participation-summary-actions .game-button {
  width: 100%;
  min-height: 30px;
  height: 30px;
  margin-top: 0;
  padding: 0 6px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
}

.authorized-game-redesign .participation-summary-actions .action-invert {
  color: #2f7ed8;
  border-color: #cfe7fb;
  background: #eef7ff;
}

.authorized-game-redesign .participation-summary-actions .action-clear {
  color: #c55a4f;
  border-color: #ffd8d3;
  background: #fff4f2;
}

.authorized-game-redesign .participation-summary-actions .action-all-in {
  color: #a66f00;
  border-color: #ffe2a6;
  background: #fff8e8;
}

.authorized-game-redesign .participation-summary-actions .action-last-bet {
  color: #5667b7;
  border-color: #dce3ff;
  background: #f2f5ff;
}

.authorized-game-redesign .game-button.confirm.is-disabled {
  border-color: #cbd3df !important;
  color: #fff !important;
  background: #cbd3df !important;
  box-shadow: none !important;
  cursor: not-allowed;
}

.authorized-game-redesign .game-trend-grid {
  position: relative;
  overflow-x: hidden;
  overflow-y: hidden;
  border: 1px solid var(--game-line);
  border-radius: var(--game-radius-sm);
  background: #fff;
}

.authorized-game-redesign .game-trend-table {
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 12px;
}

.authorized-game-redesign .game-trend-table th,
.authorized-game-redesign .game-trend-table td {
  min-width: 0;
  height: 30px;
  padding: 2px 1px;
  border: 1px solid var(--game-line);
  text-align: center;
}

.authorized-game-redesign .game-trend-table thead {
  position: sticky;
  top: 0;
  z-index: 5;
}

.authorized-game-redesign .game-trend-table thead th {
  background: #f5f7ff;
  color: #4e5f83;
  font-weight: 700;
}

.authorized-game-redesign .game-trend-table th:first-child,
.authorized-game-redesign .game-trend-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 6;
  width: 100px;
  min-width: 100px;
  max-width: 100px;
  background: #fbfcff;
  font-weight: 700;
}

.authorized-game-redesign .game-trend-table thead th:first-child {
  background: var(--game-surface-soft);
}

.authorized-game-redesign .trend-col-blue {
  background: #f2f5ff;
}

.authorized-game-redesign .trend-col-red {
  background: #fff3f3;
}

.authorized-game-redesign .trend-period-cell {
  line-height: 1.25;
}

.authorized-game-redesign .trend-period-cell small {
  display: block;
  margin-top: 2px;
  color: var(--game-muted);
  font-size: 9px;
  font-weight: 400;
}

.authorized-game-redesign .game-trend-hit-ball {
  width: 100%;
  height: 100%;
  min-height: 28px;
  background: var(--trend-ball-color, #3977e8);
  color: #fff;
  font-weight: 700;
}

.authorized-game-redesign .trend-number-hit-cell {
  padding: 0;
  background: var(--trend-ball-color, #3977e8) !important;
  text-align: center;
}

.authorized-game-redesign .trend-result-cell {
  padding: 0;
  color: #fff;
  font-weight: 700;
  vertical-align: middle;
}

.authorized-game-redesign .trend-result-cell.trend-tag-single { background: #f14539; }
.authorized-game-redesign .trend-result-cell.trend-tag-double { background: #945abe; }
.authorized-game-redesign .trend-result-cell.trend-tag-middle { background: #945abe; }
.authorized-game-redesign .trend-result-cell.trend-tag-edge { background: #08c494; }
.authorized-game-redesign .trend-result-cell.trend-tag-big { background: #eb8725; }
.authorized-game-redesign .trend-result-cell.trend-tag-small { background: #8fc64f; }
.authorized-game-redesign .trend-result-cell.trend-tag-big-tail { background: #0c9fff; }
.authorized-game-redesign .trend-result-cell.trend-tag-small-tail { background: #4db056; }
.authorized-game-redesign .trend-result-cell.trend-tag-plain { color: #000; font-weight: 400; }

.authorized-game-redesign .trend-connection-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.authorized-game-redesign .game-trend-empty {
  min-height: 240px;
  display: grid;
  place-items: center;
  color: var(--game-muted);
}

.authorized-game-redesign .game-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  align-items: start;
}

.authorized-game-redesign .game-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.authorized-game-redesign .game-form-field {
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--game-line);
  border-radius: var(--game-radius-sm);
  background: var(--game-surface-soft);
}

.authorized-game-redesign .game-form-field label {
  color: var(--game-muted);
  font-size: 12px;
  font-weight: 700;
}

.authorized-game-redesign .game-form-field > span {
  color: var(--game-muted);
  font-size: 12px;
  font-weight: 700;
}

.authorized-game-redesign .game-form-field small {
  color: var(--game-muted);
  font-size: 11px;
  line-height: 1.45;
}

.authorized-game-redesign .auto-task-status {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--game-surface-soft);
  color: var(--game-muted);
  font-size: 12px;
  font-weight: 800;
}

.authorized-game-redesign .auto-task-status.is-active {
  background: rgba(58, 166, 117, .12);
  color: #3aa675;
}

.authorized-game-redesign .auto-task-table-wrap {
  margin-top: 18px;
}

.authorized-game-redesign .auto-task-mode-table {
  min-width: 720px;
}

.authorized-game-redesign .auto-task-mode-table .game-select {
  width: 100%;
  min-width: 150px;
}

.authorized-game-redesign .auto-task-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  color: var(--game-muted);
  font-size: 13px;
}

.authorized-game-redesign .auto-task-switch input {
  width: 18px;
  height: 18px;
  accent-color: var(--game-accent);
}

.authorized-game-redesign .auto-task-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
}

.authorized-game-redesign .auto-task-summary-actions {
  margin-top: 18px;
}

.authorized-game-redesign .auto-task-submit-button {
  width: 100%;
}

.authorized-game-redesign .auto-task-error {
  min-height: 20px;
  margin: 0;
  color: #d44;
  font-size: 13px;
}

.authorized-game-redesign .game-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.authorized-game-redesign .game-stat-card {
  min-height: 104px;
  display: grid;
  align-content: center;
  padding: 18px;
  border: 1px solid var(--game-line);
  border-radius: var(--game-radius);
  background: var(--game-surface);
  box-shadow: var(--game-shadow);
}

.authorized-game-redesign .game-stat-card span {
  color: var(--game-muted);
  font-size: 12px;
}

.authorized-game-redesign .game-stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
}

.authorized-game-redesign .game-stat-card strong.orange {
  color: var(--game-orange);
}

.authorized-game-redesign .game-tabs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 14px;
}

.authorized-game-redesign .game-tabs-row button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--game-line);
  border-radius: var(--game-radius-sm);
  background: var(--game-surface);
  color: var(--game-muted);
  font-weight: 700;
}

.authorized-game-redesign .game-tabs-row button.is-active {
  color: #fff;
  border-color: var(--game-accent);
  background: var(--game-accent);
}

.authorized-game-redesign .game-page-shell {
  width: min(100%, 1440px);
  margin: 0 auto;
}

.authorized-game-redesign.page {
  width: min(calc(100% - 48px), 1600px);
  padding-top: 20px;
}

.authorized-game-redesign .authorized-game-workspace {
  width: min(100%, 1440px);
  margin: 0 auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.authorized-game-redesign .authorized-game-subpage {
  min-height: 0;
  padding: 0;
  background: transparent;
}

.authorized-game-redesign .authorized-game-tabs {
  width: min(100%, 1440px);
  margin: 0 auto 12px;
  padding: 0 92px 0 0;
  border: 0;
  background: transparent;
}

.authorized-game-redesign .authorized-game-tab {
  min-height: 36px;
  padding: 0 18px;
  border: 1px solid var(--game-line);
  border-radius: 999px;
  background: var(--game-surface);
  color: var(--game-ink);
  font-weight: 700;
}

.authorized-game-redesign .authorized-game-tab.is-active {
  color: #fff;
  border-color: var(--game-accent);
  background: var(--game-accent);
}

.authorized-game-redesign.theme-game .authorized-game-tab.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, #4f7df3, #7c63f1);
}

.authorized-game-redesign .authorized-game-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 14px;
  padding: 11px 12px;
  border: 1px solid var(--game-line);
  border-radius: var(--game-radius);
  background: var(--game-surface);
  box-shadow: var(--game-shadow);
}

.authorized-game-redesign .authorized-game-nav-link {
  min-height: 34px;
  padding: 0 15px;
  border: 1px solid var(--game-line);
  border-radius: 999px;
  background: var(--game-surface-soft);
  color: var(--game-muted);
  font-weight: 700;
}

.authorized-game-redesign .authorized-game-nav-link.is-active {
  color: var(--game-accent);
  border-color: color-mix(in srgb, var(--game-accent) 35%, white);
  background: var(--game-accent-soft);
}

.authorized-game-redesign .authorized-game-nav-status {
  margin-left: 6px;
  color: #3aa675;
  font-size: 11px;
  font-weight: 800;
}

.authorized-game-redesign .authorized-live-board {
  display: grid;
  grid-template-columns: 1.05fr 1.25fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
  padding: 0;
  background: transparent;
}

.authorized-game-redesign .authorized-live-card {
  min-height: 156px;
  padding: 20px;
  border: 1px solid var(--game-line);
  border-radius: var(--game-radius);
  background: var(--game-surface);
  box-shadow: var(--game-shadow);
  text-align: center;
}

.authorized-game-redesign .authorized-live-card > strong {
  display: block;
  margin-top: 10px;
  font-size: 34px;
}

.authorized-game-redesign .authorized-countdown-block > strong {
  color: #e95b45;
}

.authorized-game-redesign.theme-game .authorized-countdown-block > strong {
  color: #ff7a45;
}

.authorized-game-redesign .authorized-live-card .activity-label,
.authorized-game-redesign .authorized-live-card .authorized-countdown-issue,
.authorized-game-redesign .authorized-live-card .authorized-bet-remaining {
  color: var(--game-muted);
  font-size: 12px;
}

.authorized-game-redesign .authorized-countdown-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.authorized-game-redesign .authorized-status-chip,
.authorized-game-redesign .authorized-countdown-meta .link-button {
  min-height: 31px;
  padding: 0 12px;
  border-radius: 999px;
}

.authorized-game-redesign .authorized-status-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cfeadb;
  background: #eaf8f0;
  color: var(--game-green);
  font-size: 12px;
  font-weight: 700;
}

.authorized-game-redesign .authorized-number-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 15px;
}

.authorized-game-redesign .authorized-number-line i,
.authorized-game-redesign .authorized-number-line b {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-style: normal;
  font-weight: 800;
}

.authorized-game-redesign .authorized-number-line i {
  background: var(--game-accent-soft);
  color: var(--game-accent);
}

.authorized-game-redesign .authorized-number-line b {
  background: var(--game-green);
  color: #fff;
}

.authorized-game-redesign .authorized-game-columns {
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: 14px;
  padding: 0;
  background: transparent;
}

.authorized-game-redesign .authorized-game-columns.is-participation {
  grid-template-columns: minmax(0, 1fr);
}

.authorized-game-redesign .authorized-game-columns.is-participation .authorized-table-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.authorized-game-redesign .authorized-round-stack {
  gap: 14px;
}

.authorized-game-redesign .authorized-table-card,
.authorized-game-redesign .authorized-side-card {
  border: 1px solid var(--game-line);
  border-radius: var(--game-radius);
  background: var(--game-surface);
  box-shadow: var(--game-shadow);
}

.authorized-game-redesign .authorized-table-card .section-head {
  padding: 20px 20px 0;
}

.authorized-game-redesign .authorized-table-card .table-panel {
  border: 0;
  border-radius: 0;
  overflow: auto;
}

.authorized-game-redesign .authorized-table-card .data-table th,
.authorized-game-redesign .authorized-table-card .data-table td {
  height: 46px;
  padding: 10px 14px;
}

.authorized-game-redesign .authorized-table-card .data-table th {
  background: var(--game-surface-soft);
}

.authorized-game-redesign .authorized-side-card {
  padding: 18px;
}

.authorized-game-redesign .authorized-history-card {
  min-height: 0;
}

.authorized-game-redesign .authorized-history-card .table-panel {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
}

.authorized-game-redesign.theme-game .authorized-game-workspace {
  background: transparent !important;
}

.authorized-game-redesign.theme-game .game-live-card,
.authorized-game-redesign.theme-game .game-panel,
.authorized-game-redesign.theme-game .game-summary-card,
.authorized-game-redesign.theme-game .game-stat-card {
  border-color: rgba(126, 151, 212, .22);
}

@media (max-width: 1200px) {
  .authorized-game-redesign .game-participation-layout {
    grid-template-columns: 1fr;
  }

  .authorized-game-redesign .game-participation-layout .game-workbench > .game-summary-card {
    grid-column: 1;
    grid-row: auto;
  }

  .authorized-game-redesign .game-home-layout,
  .authorized-game-redesign .game-workbench,
  .authorized-game-redesign .game-form-layout,
  .authorized-game-redesign .participation-top-sections {
    grid-template-columns: 1fr;
  }

  .authorized-game-redesign .quick-select-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .authorized-game-redesign .participation-quick-panel,
  .authorized-game-redesign .custom-mode-panel {
    height: auto;
    max-height: none;
  }

  .authorized-game-redesign .game-summary-card {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 620px) {
  .authorized-game-redesign .game-selection-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-flow: row;
  }
}

body.is-confirm-open,
body.is-announcement-open {
  overflow: hidden;
}

.participation-confirm {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.participation-confirm.is-open {
  display: flex;
}

.participation-confirm__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(21, 32, 58, .32);
  backdrop-filter: blur(5px);
}

.participation-confirm__panel {
  position: relative;
  width: min(440px, 100%);
  padding: 24px;
  border: 1px solid var(--line, #dce6f7);
  border-radius: 22px;
  background: var(--surface, #fff);
  box-shadow: 0 24px 80px rgba(35, 55, 95, .24);
  color: var(--ink, #15203a);
}

.participation-confirm__icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--yellow-wash, #fff8e8);
  color: #d99a1f;
  font-size: 23px;
  font-weight: 900;
  line-height: 1;
}

.participation-confirm__copy {
  margin-top: 12px;
}

.participation-confirm__copy h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.participation-confirm__copy p {
  margin: 8px 0 0;
  color: var(--muted, #687494);
  font-size: 14px;
}

.participation-confirm__summary {
  margin: 18px 0 0;
  padding: 0;
  border: 1px solid var(--line, #dce6f7);
  border-radius: 16px;
  overflow: hidden;
}

.participation-confirm__summary div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding: 11px 14px;
}

.participation-confirm__summary div + div {
  border-top: 1px solid var(--line, #dce6f7);
}

.participation-confirm__summary dt,
.participation-confirm__summary dd {
  margin: 0;
}

.participation-confirm__summary dt {
  color: var(--muted, #687494);
}

.participation-confirm__summary dd {
  min-width: 0;
  color: var(--ink, #15203a);
  font-weight: 700;
  text-align: right;
  word-break: break-word;
}

.participation-confirm__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.participation-confirm__actions .primary-button,
.participation-confirm__actions .secondary-button {
  min-height: 42px;
  border-radius: 13px;
}

.announcement-popup__panel {
  width: min(560px, 100%);
}

.session-expired-dialog__icon {
  color: #c46b16;
  background: #fff4e5;
}

.announcement-popup__content {
  max-height: min(52vh, 420px);
  margin-top: 18px;
  padding: 16px 18px;
  overflow: auto;
  border: 1px solid var(--line, #dce6f7);
  border-radius: 16px;
  background: var(--surface-soft, #f7faff);
  color: var(--ink, #15203a);
  font-size: 14px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.announcement-popup__content p {
  margin: 0 0 10px;
}

.announcement-popup__content p:last-child {
  margin-bottom: 0;
}

.announcement-popup__content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.mode-name-dialog__field {
  display: grid;
  gap: 7px;
  margin-top: 18px;
  color: var(--muted, #687494);
  font-size: 13px;
}

.mode-name-dialog__field input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line, #dce6f7);
  border-radius: 12px;
  background: #fff;
  color: var(--ink, #15203a);
  outline: none;
}

.mode-name-dialog__field input:focus {
  border-color: var(--blue, #4f7df3);
  box-shadow: 0 0 0 3px rgba(79, 125, 243, .12);
}

.mode-name-dialog__error {
  min-height: 18px;
  margin: 6px 0 0;
  color: #df6b6b;
  font-size: 12px;
}

.mode-delete-dialog__icon {
  color: #d84d4d;
  background: #fff0f0;
}

.mode-delete-dialog__target {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #f0d7d7;
  border-radius: 14px;
  background: #fff8f8;
}

.mode-delete-dialog__target span,
.mode-delete-dialog__target strong {
  display: block;
}

.mode-delete-dialog__target span {
  color: var(--muted, #687494);
  font-size: 12px;
}

.mode-delete-dialog__target strong {
  margin-top: 5px;
  color: var(--ink, #15203a);
  font-size: 17px;
}

.mode-delete-button {
  border-color: #d84d4d !important;
  background: #d84d4d !important;
  color: #fff !important;
}

.authorized-game-redesign .data-table .is-profit-win {
  color: #df6b6b;
  font-weight: 800;
}

.authorized-game-redesign .data-table .is-profit-loss {
  color: #3aa675;
  font-weight: 800;
}

/* ==========================================================================
   窄屏降级：三栏 → 单栏
   app.css:3565 的 @media (max-width: 1040px) 三栏降级被本文件 235 / 1634 两条
   同属性规则按「同特异性取后写」压掉了，从来没生效过。这里在文件末尾补一次，
   特异性与 235 / 1634 相同、但更晚加载，所以能压住它们。
   ========================================================================== */
@media (max-width: 1040px) {
  .authorized-game-redesign .authorized-live-board,
  .authorized-game-redesign .game-live-board {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   服务器时间：定长 18 字符的时间串，字号随卡片宽度收缩
   1653 那条 `.authorized-live-card > strong { font-size: 34px }` 本来是给
   「开奖倒计时 00:31」五个字符用的，服务器时间挂在同一个 DOM 位置上被一起
   放大到 34px，实测串宽 334px，卡片一窄就溢出。
   这里用容器查询单位 cqi（= 卡片内容宽度的 1%）让字号跟着卡片走，
   兜底 20px 给不支持容器查询的浏览器。
   选择器多带一个 [data-server-time]，特异性 (0,3,1) 高于 1653 的 (0,2,1)，
   并且只命中服务器时间这一个 <strong>，不影响倒计时。
   ========================================================================== */
.authorized-game-redesign .authorized-server-block {
  container-type: inline-size;
}

.authorized-game-redesign .authorized-server-block > strong[data-server-time] {
  font-size: 20px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

@supports (font-size: 1cqi) {
  .authorized-game-redesign .authorized-server-block > strong[data-server-time] {
    /* 8.4cqi：时间串总宽约为卡片内容宽的 82%，留 18% 余量；上限 34px 与倒计时对齐 */
    font-size: clamp(11px, 8.4cqi, 34px);
  }
}

/* ==========================================================================
   2026-11-07：本次追号记录（自动追号面板底部）
   不复用 .game-table 的默认间距：这里每行是一「期」，列多、数字要右对齐，
   与「我的参与」列表观感一致但更紧凑。类名全部 auto-record-*，不碰既有样式。
   ========================================================================== */
.auto-record-panel {
  margin-top: 18px;
}

.auto-record-panel .game-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.auto-record-tasks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
}

.auto-record-task-chip {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: transparent;
  color: inherit;
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.auto-record-task-chip:hover {
  border-color: rgba(0, 0, 0, 0.32);
}

.auto-record-task-chip.is-active {
  border-color: #e0a400;
  color: #a97b00;
  background: rgba(245, 196, 81, 0.14);
}

.auto-record-table-wrap {
  margin-top: 12px;
  max-height: 420px;
  overflow: auto;
}

.auto-record-table th,
.auto-record-table td {
  white-space: nowrap;
}

/* 投注、中奖两列永远是从后数第 3、第 2 列 —— 追号 6 列 / 自动参与 7 列都适用，
   写死 nth-child(4)(5) 的话自动参与多一个「模式」列就全错位了。 */
.auto-record-table td:nth-last-child(2),
.auto-record-table td:nth-last-child(3) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.auto-record-mark {
  display: inline-block;
  min-width: 40px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  text-align: center;
}

.auto-record-mark.is-win {
  background: rgba(18, 161, 80, 0.14);
  color: #0e8a45;
}

.auto-record-mark.is-lose {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.45);
}

/* 三态里的第三态：这期还没开奖，一笔都没结算。不能跟「未中」混为一谈。 */
.auto-record-mark.is-pending {
  background: rgba(0, 0, 0, 0.04);
  color: rgba(0, 0, 0, 0.38);
  font-style: italic;
}

/* 2026-11-09：第四态 —— 已开奖但注单一笔都没结算（结算漏跑）。
   橙色示警，跟「待开奖」的灰斜体区分开，否则漏结算永远看不出来。 */
.auto-record-mark.is-unsettled {
  background: rgba(217, 122, 24, 0.15);
  color: #b45f0a;
  font-weight: 600;
}

.auto-record-table tr.is-pending td {
  opacity: 0.62;
}

/* ------- 自动参与专属：模式列 + 模式分布 ------- */
.auto-record-mode-chip {
  display: inline-block;
  min-width: 30px;
  padding: 2px 9px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.03);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.auto-record-mode-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
}

.auto-record-mode-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.035);
  font-variant-numeric: tabular-nums;
}

.auto-record-mode-stat b {
  font-weight: 600;
}

.auto-record-mode-stat em {
  font-style: normal;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.55);
}

/* 2026-11-09：全站统一为「盈=红、亏=绿」（中式），跟 WAP 的 .profit-positive/.profit-negative
   以及本站 .is-profit-win(#e05252)/.is-profit-loss(#22a06b) 一致。
   改前这里是 #0e8a45(绿=盈) / #d92d20(红=亏)，与同一站的「我的记录」正好相反。
   色值刻意复用 .is-profit-win / .is-profit-loss 已有的那对，不新造。 */
.auto-record-mode-stat.is-win em {
  color: #e05252;
}

.auto-record-mode-stat.is-lose em {
  color: #22a06b;
}

.auto-record-more {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.auto-record-more .game-button {
  min-width: 240px;
}

/* 2026-11-08：原来的「加载更多」整宽按钮换成翻页条（每页 30 期） */
.auto-record-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.auto-record-pager-info {
  font-size: 13px;
  opacity: 0.72;
  font-variant-numeric: tabular-nums;
}

.auto-record-pager-btns {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.auto-record-page-btn {
  min-width: 34px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.auto-record-page-btn:hover:not(:disabled) {
  border-color: rgba(0, 0, 0, 0.28);
  background: rgba(0, 0, 0, 0.03);
}

.auto-record-page-btn:disabled {
  cursor: default;
  opacity: 0.45;
}

.auto-record-page-btn.is-active {
  border-color: #f26522;
  background: #f26522;
  color: #fff;
  font-weight: 600;
}

.auto-record-page-btn--nav {
  padding: 0 12px;
}

.auto-record-page-gap {
  padding: 0 2px;
  opacity: 0.5;
}

/* 2026-11-08：保留期倒计时 —— 用户明确要红字，用纯红而不是品牌橙，
   与旁边的绿色「运行中」形成「这台机器在跑 / 这条数据要没了」的区分 */
.auto-record-keep {
  margin-left: 10px;
  color: #d92d20;
  font-weight: 600;
}

.auto-record-keep.is-expired {
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(217, 45, 32, 0.1);
}

.auto-record-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 13px;
  color: inherit;
  opacity: 0.78;
}

.auto-record-summary strong {
  color: inherit;
  font-variant-numeric: tabular-nums;
}

/* 2026-11-09：同上，净额正负也改成「盈红/亏绿」，与 WAP 的 profit-positive 完全对齐 */
.auto-record-net.is-win strong {
  color: #e05252;
}

.auto-record-net.is-lose strong {
  color: #22a06b;
}

/* ==========================================================================
   2026-11-07：运行中把设置区收成一条状态条
   理由：任务跑起来之后没人天天改设置，但「本次记录」要天天看 ——
   表单占满一屏的话记录永远在折叠线以下。
   ========================================================================== */
.auto-settings-collapsed {
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.015);
}

.auto-settings-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
}

.auto-settings-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  /* 2026-11-07：允许这一块真正收缩，按钮组才有位置贴到右边界内侧，
     而不是把整条状态栏顶出卡片外 */
  min-width: 0;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.6);
}

.auto-settings-info strong {
  color: #0e8a45;
  font-weight: 600;
}

.auto-settings-info b {
  color: rgba(0, 0, 0, 0.86);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.auto-settings-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0e8a45;
  box-shadow: 0 0 0 4px rgba(14, 138, 69, 0.14);
  animation: autoSettingsPulse 1.8s ease-in-out infinite;
}

@keyframes autoSettingsPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(14, 138, 69, 0.14); }
  50% { box-shadow: 0 0 0 7px rgba(14, 138, 69, 0.05); }
}

.auto-settings-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  /* 2026-11-07：这一块不许被 flex 压缩 —— 一压「展开设置」四个字就折成两行 */
  flex-shrink: 0;
  flex-wrap: nowrap;
  max-width: 100%;
  /* 窄到换行时也贴右边，不要孤零零甩在左侧 */
  margin-left: auto;
}

/* 2026-11-07 修正（越界）：本文件 1479 行 .auto-task-submit-button{width:100%}
   是给右侧摘要卡里那个整宽按钮用的。它落到折叠状态条里时，"100%" 会以
   .auto-settings-actions 为基准，而 actions 本身是 shrink:0 的内容宽
   → 橙色「停止自动追号」被撑成 actions 的 100%，把「展开设置」挤出右边界、
   并越出卡片右圆角（实测溢出 106px）。这里按内容自适应交还宽度。 */
.auto-settings-actions .auto-task-submit-button {
  width: auto;
  min-width: 150px;
  flex: 0 0 auto;
}

/* 2026-11-07：展开设置 / 收起设置 都是四个字，统一 nowrap + 同宽，
   两边看起来才是一对按钮，而不是一个被挤扁、一个正常 */
.auto-settings-actions .game-button,
.auto-settings-head-actions .game-button {
  min-width: 88px;
  white-space: nowrap;
  flex-shrink: 0;
}

.auto-settings-collapsed .auto-task-error {
  margin: 0;
  padding: 0 18px 12px;
}

.auto-settings-collapsed .auto-task-error:empty {
  display: none;
}

.auto-settings-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* ------- 单期投注明细（点行展开，一期压着 14 注）------- */
.auto-record-row {
  cursor: pointer;
  transition: background 0.12s ease;
}

.auto-record-row:hover {
  background: rgba(0, 0, 0, 0.022);
}

.auto-record-row.is-open {
  background: rgba(245, 196, 81, 0.08);
}

.auto-record-issue {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.auto-record-caret {
  font-style: normal;
  font-size: 10px;
  color: rgba(0, 0, 0, 0.32);
  transform: translateY(-1px);
}

.auto-record-row.is-open .auto-record-caret {
  color: #a97b00;
}

.auto-record-detail-row > td {
  padding: 12px 14px 14px !important;
  background: rgba(0, 0, 0, 0.018);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.auto-record-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(66px, 1fr));
  gap: 6px;
}

.auto-record-detail-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 5px 4px 4px;
  border-radius: 7px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.auto-record-detail-chip b {
  font-size: 13px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.7);
}

.auto-record-detail-chip i {
  font-style: normal;
  font-size: 11px;
  color: rgba(0, 0, 0, 0.45);
}

/* 中奖金额（+N）= 盈 → 红。与 WAP 的 em.profit-positive（mobile.css:4576）一致。
   注意：这里只改「金额数字」；chip 的浅绿底（.is-hit）保持不动 ——
   那个底色表示「这个号码中了」，属命中标记，和记录表的「赢」徽标同类，
   两边平台都是绿的，改了反而破坏一致。 */
.auto-record-detail-chip em {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: #e05252;
}

/* 开奖号码：描边标出来（不代表中奖，只表示这期开的是它） */
.auto-record-detail-chip.is-draw {
  border-color: #e0a400;
  box-shadow: inset 0 0 0 1px rgba(245, 196, 81, 0.35);
}

/* 真中奖：底色变绿 */
.auto-record-detail-chip.is-hit {
  border-color: rgba(18, 161, 80, 0.35);
  background: rgba(18, 161, 80, 0.1);
}

.auto-record-detail-note {
  margin-top: 9px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.55);
}

.auto-record-detail-note b {
  color: rgba(0, 0, 0, 0.78);
}

/* ------- 2026-11-08：并行追号 · 停止按钮 / 绿点 / 并行提示 ------- */

/* 记录面板标题下那一行：任务编号 + 状态 + 保留期倒计时 + 停止按钮 */
.auto-record-task-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.auto-record-task-line .game-muted {
  margin: 0;
}

/* 停止当前这一条追号。
   放在任务行上而不是设置区，是因为「我在看哪一条」和「我要停哪一条」是同一件事 ——
   点 chip 换记录、按钮跟着换目标，结构上不可能停错。
   2026-11-08 用户改：浅红描边太淡，换成项目原有的品牌橘 #f26522（与任务 chip 选中态同色），做实心。
   选择器必须带两个类：只写 `.auto-record-stop-btn`（0,1,0）会被
   `.authorized-game-redesign .game-button`（0,2,0）压住，背景色根本不生效
   —— 第一次改就是这么失败的（白底黑字）。`.game-button.auto-record-stop-btn`
   同为 0,2,0 且定义在本文件靠后，故稳胜；也不依赖祖先类，面板挪出游戏容器仍生效。 */
.game-button.auto-record-stop-btn {
  padding: 4px 14px;
  min-height: 28px;
  border-radius: 999px;
  border: 1px solid #f26522;
  background: #f26522;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(242, 101, 34, 0.28);
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.game-button.auto-record-stop-btn:hover {
  background: #e0571a;
  border-color: #e0571a;
  box-shadow: 0 2px 6px rgba(242, 101, 34, 0.38);
}

.game-button.auto-record-stop-btn:disabled {
  border-color: #f0b48c;
  background: #f0b48c;
  color: #fff;
  box-shadow: none;
  cursor: not-allowed;
}

/* 删除当前这一条追号（软删除：只从列表隐藏）。
   特意用灰色描边而不是红色：它没有删掉一分钱，也没删数据库里任何一行 ——
   红色会让人以为点下去资金记录就没了。橘色留给「停止」这个真影响资金的动作。
   与停止按钮同样带两个类，避免被 .authorized-game-redesign .game-button 压住。 */
.game-button.auto-record-del-btn {
  padding: 4px 14px;
  min-height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: rgba(0, 0, 0, 0.04);
  color: rgba(0, 0, 0, 0.62);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.game-button.auto-record-del-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.28);
  color: rgba(0, 0, 0, 0.78);
}

.game-button.auto-record-del-btn:disabled {
  border-color: rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.02);
  color: rgba(0, 0, 0, 0.3);
  cursor: not-allowed;
}

/* 运行中的任务 chip 前面加绿点：多条并行时一眼分出哪几条是活的 */
.auto-record-task-chip.is-running::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: #0e8a45;
  vertical-align: middle;
  transform: translateY(-1px);
}

/* 展开设置时表头右侧的「已运行 N / 5 条」 */
.auto-task-parallel-note {
  font-size: 12px;
  color: var(--game-muted);
  white-space: nowrap;
}

.auto-task-parallel-note b {
  color: #a97b00;
  font-variant-numeric: tabular-nums;
}

/* 到上限时的提示（按钮已被禁用，这里说清为什么不给点） */
.auto-task-limit-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: #d92d20;
  text-align: center;
}

/* 「看记录」跳转 / 添加成功后闪一下边框，让用户知道滚到了哪一块 */
.auto-record-panel.is-flash {
  animation: autoRecordFlash 1s ease;
}

@keyframes autoRecordFlash {
  0% { box-shadow: 0 0 0 0 rgba(224, 164, 0, 0); }
  30% { box-shadow: 0 0 0 3px rgba(224, 164, 0, 0.5); }
  100% { box-shadow: 0 0 0 0 rgba(224, 164, 0, 0); }
}
