:root {
  --navy-950: #10183a;
  --navy-900: #172554;
  --navy-800: #1e3a6d;
  --blue-700: #2456a7;
  --blue-600: #3471d0;
  --blue-100: #dbeafe;
  --sky-50: #f3f8ff;
  --gold-500: #d7a52c;
  --gold-300: #f4d47c;
  --ink: #172033;
  --muted: #687387;
  --line: #dde4ef;
  --surface: #ffffff;
  --canvas: #f5f7fb;
  --success: #16805a;
  --success-soft: #e7f8f1;
  --danger: #c43d4e;
  --danger-soft: #fff0f2;
  --warning: #9a6700;
  --warning-soft: #fff8dc;
  --shadow-sm: 0 10px 30px rgb(31 48 87 / 8%);
  --shadow-lg: 0 28px 80px rgb(16 24 58 / 18%);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --content: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 2%, rgb(74 134 222 / 10%), transparent 25rem),
    var(--canvas);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(52 113 208 / 30%);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: #fff;
  background: var(--navy-950);
  border-radius: 8px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid rgb(221 228 239 / 90%);
  background: rgb(255 255 255 / 88%);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(calc(100% - 40px), var(--content));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--navy-950);
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--gold-300);
  background: linear-gradient(145deg, var(--navy-800), var(--navy-950));
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 14px 14px 14px 4px;
  box-shadow: 0 8px 20px rgb(23 37 84 / 20%);
}

.brand-star {
  font-size: 22px;
  transform: translateY(-1px);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-copy strong {
  font-size: 14px;
  letter-spacing: 0.12em;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.3em;
}

.session-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.online-dot {
  width: 8px;
  height: 8px;
  background: #28a878;
  border: 2px solid #dff7ee;
  border-radius: 50%;
  box-sizing: content-box;
}

.header-username {
  max-width: 180px;
  overflow: hidden;
  color: #3f4b60;
  font-size: 14px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-shell {
  width: min(calc(100% - 40px), var(--content));
  min-height: calc(100vh - 156px);
  margin: 40px auto;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(390px, 0.94fr);
  overflow: hidden;
  border: 1px solid rgb(221 228 239 / 72%);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.auth-visual {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(145deg, rgb(23 37 84 / 98%), rgb(24 62 119 / 95%)),
    var(--navy-900);
}

.auth-visual::before,
.auth-visual::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.auth-visual::before {
  width: 420px;
  height: 420px;
  right: -170px;
  top: -140px;
  background: radial-gradient(circle, rgb(244 212 124 / 28%), transparent 68%);
}

.auth-visual::after {
  width: 360px;
  height: 360px;
  left: -210px;
  bottom: -170px;
  border: 1px solid rgb(255 255 255 / 14%);
  box-shadow: 0 0 0 55px rgb(255 255 255 / 3%), 0 0 0 110px rgb(255 255 255 / 2%);
}

.visual-orbit {
  position: absolute;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 50%;
  transform: rotate(-20deg);
}

.visual-orbit::after {
  content: "✦";
  position: absolute;
  color: var(--gold-300);
  filter: drop-shadow(0 0 12px rgb(244 212 124 / 55%));
}

.orbit-one {
  width: 440px;
  height: 210px;
  top: 82px;
  left: 62px;
}

.orbit-one::after {
  right: 44px;
  top: 2px;
  font-size: 24px;
}

.orbit-two {
  width: 290px;
  height: 520px;
  right: -90px;
  bottom: -35px;
  transform: rotate(36deg);
}

.orbit-two::after {
  left: 16px;
  bottom: 92px;
  font-size: 15px;
}

.visual-copy {
  position: relative;
  z-index: 2;
  max-width: 510px;
  padding: clamp(64px, 9vw, 120px) clamp(40px, 7vw, 84px);
}

.eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--blue-700);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow.light {
  color: var(--gold-300);
}

.visual-copy h1 {
  margin: 0;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: clamp(38px, 5vw, 62px);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.03em;
}

.visual-copy > p {
  max-width: 430px;
  margin: 24px 0 0;
  color: rgb(255 255 255 / 72%);
  font-size: 16px;
  line-height: 1.8;
}

.trust-list {
  margin: 38px 0 0;
  padding: 0;
  display: grid;
  gap: 15px;
  color: rgb(255 255 255 / 84%);
  font-size: 14px;
  list-style: none;
}

.trust-list li {
  display: flex;
  align-items: center;
  gap: 11px;
}

.trust-list span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  color: var(--navy-900);
  background: var(--gold-300);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: 50px clamp(30px, 5vw, 68px);
  background:
    linear-gradient(rgb(255 255 255 / 94%), rgb(255 255 255 / 94%)),
    repeating-linear-gradient(135deg, transparent 0 18px, #f4f7fb 18px 19px);
}

.auth-card {
  width: min(100%, 430px);
}

.auth-heading h2,
.section-heading h2,
.profile-intro h2,
.dashboard-header h1 {
  margin: 0;
  color: var(--navy-950);
  font-family: Georgia, "Noto Serif SC", serif;
  font-weight: 600;
}

.auth-heading h2 {
  font-size: 32px;
}

.auth-heading p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.auth-tabs {
  margin: 30px 0 24px;
  padding: 5px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: #eef2f8;
  border-radius: 12px;
}

.auth-tab {
  min-height: 42px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 700;
}

.auth-tab.is-active {
  color: var(--navy-900);
  background: #fff;
  box-shadow: 0 4px 12px rgb(31 48 87 / 10%);
}

.form-stack {
  display: grid;
  gap: 17px;
}

.form-guidance {
  margin: -3px 0 2px;
  padding: 10px 12px;
  color: #53627a;
  background: #f3f7fd;
  border-left: 3px solid var(--blue-600);
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.6;
}

.auth-switch-line {
  margin: 18px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.auth-switch-line button {
  padding: 4px 6px;
  color: var(--blue-700);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-weight: 750;
}

.auth-switch-line button:hover {
  text-decoration: underline;
}

.field {
  display: grid;
  gap: 8px;
}

.field > span {
  color: #344056;
  font-size: 13px;
  font-weight: 700;
}

.field small {
  color: #8a94a6;
  font-weight: 500;
}

.field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #d5ddea;
  border-radius: var(--radius-sm);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input::placeholder {
  color: #a1a9b7;
}

.field input:hover {
  border-color: #adb9ca;
}

.field input:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 4px rgb(52 113 208 / 10%);
  outline: 0;
}

.field input[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgb(196 61 78 / 8%);
}

.button {
  min-height: 44px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 750;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--blue-600), var(--navy-800));
  box-shadow: 0 11px 25px rgb(36 86 167 / 22%);
}

.button-primary:hover:not(:disabled) {
  box-shadow: 0 14px 30px rgb(36 86 167 / 28%);
}

.button-secondary {
  color: var(--navy-800);
  background: #fff;
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.button-quiet {
  min-height: 36px;
  padding: 0 13px;
  color: #465268;
  background: #f2f5f9;
  font-size: 13px;
}

.form-submit {
  width: 100%;
  min-height: 50px;
  margin-top: 4px;
}

.button-spinner,
.loader {
  width: 17px;
  height: 17px;
  display: none;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.is-loading .button-spinner,
.loader {
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.security-note {
  margin: 24px 0 0;
  padding-top: 19px;
  display: flex;
  gap: 9px;
  color: #818a9a;
  border-top: 1px solid #e9edf3;
  font-size: 12px;
  line-height: 1.65;
}

.security-note > span {
  flex: 0 0 auto;
  color: var(--gold-500);
}

.message {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.55;
}

.message.is-error {
  color: #982c3c;
  background: var(--danger-soft);
  border-color: #f4c6cc;
}

.message.is-success {
  color: #0e6c4a;
  background: var(--success-soft);
  border-color: #bce8d8;
}

.message.is-warning {
  color: #7c5505;
  background: var(--warning-soft);
  border-color: #eddc9b;
}

.dashboard {
  width: min(calc(100% - 40px), var(--content));
  min-height: calc(100vh - 156px);
  margin: 0 auto;
  padding: 54px 0 64px;
}

.dashboard-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.dashboard-header h1 {
  font-size: clamp(34px, 5vw, 52px);
  letter-spacing: -0.035em;
}

.dashboard-header p {
  margin: 10px 0 0;
  color: var(--muted);
}

.dashboard > .message {
  margin: 24px 0 0;
}

.dashboard-loading {
  margin-top: 24px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--blue-700);
  background: var(--blue-100);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 650;
}

.dashboard-loading .loader {
  width: 18px;
  height: 18px;
}

.wallet-section {
  margin-top: 38px;
}

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

.section-heading h2,
.profile-intro h2 {
  font-size: 27px;
}

.as-of {
  color: #8993a4;
  font-size: 12px;
}

.wallet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.balance-card {
  min-height: 190px;
  padding: 25px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.balance-primary {
  color: #fff;
  background:
    radial-gradient(circle at 95% 10%, rgb(244 212 124 / 24%), transparent 10rem),
    linear-gradient(145deg, var(--navy-900), #285da7);
  border-color: transparent;
  box-shadow: 0 18px 40px rgb(23 37 84 / 22%);
}

.balance-label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #69758a;
  font-size: 13px;
  font-weight: 700;
}

.balance-primary .balance-label {
  color: rgb(255 255 255 / 75%);
}

.balance-symbol {
  color: var(--gold-300);
  font-size: 18px;
}

.balance-symbol.muted {
  color: #7990af;
}

.balance-symbol.gold {
  color: var(--gold-500);
}

.balance-value {
  margin-top: 24px;
  overflow-wrap: anywhere;
  font-family: Georgia, serif;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1;
}

.balance-value.dark {
  color: var(--navy-950);
}

.balance-card p {
  margin: 18px 0 0;
  color: #8b95a5;
  font-size: 12px;
  line-height: 1.55;
}

.balance-primary p {
  color: rgb(255 255 255 / 60%);
}

.empty-state {
  min-height: 190px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #788396;
  text-align: center;
  background: #fff;
  border: 1px dashed #cdd6e4;
  border-radius: var(--radius-md);
}

.empty-state strong {
  margin-top: 10px;
  color: #465268;
}

.empty-state p {
  max-width: 460px;
  margin: 7px 0 0;
  font-size: 13px;
  line-height: 1.6;
}

.empty-icon {
  color: #8aa2c5;
  font-size: 30px;
}

.empty-icon.small {
  font-size: 19px;
}

.games-section {
  margin-top: 42px;
}

.games-section .section-heading h2 {
  margin: 0;
  color: var(--navy-950);
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 27px;
  font-weight: 600;
}

.button-compact {
  min-height: 40px;
  padding-inline: 15px;
  font-size: 13px;
}

.games-shell {
  min-height: 420px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.game-catalog {
  min-width: 0;
  padding: 20px 16px;
  background: #f8faff;
  border-right: 1px solid var(--line);
}

.catalog-heading {
  padding: 2px 7px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.catalog-heading strong {
  color: #2b3850;
  font-size: 14px;
}

.catalog-heading span {
  color: #8792a4;
  font-size: 11px;
}

.catalog-state {
  min-height: 126px;
  padding: 20px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #778398;
  text-align: center;
  font-size: 12px;
  line-height: 1.55;
}

.catalog-state .loader,
.period-state .loader {
  flex: 0 0 auto;
  color: var(--blue-600);
}

.game-list,
.result-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.game-option {
  width: 100%;
  min-height: 68px;
  padding: 10px 11px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: #435068;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 13px;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.game-option:hover {
  color: var(--navy-900);
  background: #fff;
  border-color: #e2e8f2;
}

.game-option.is-active {
  color: var(--navy-900);
  background: #fff;
  border-color: #d9e3f2;
  box-shadow: 0 8px 22px rgb(31 48 87 / 9%);
}

.game-option-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--gold-300);
  background: linear-gradient(145deg, var(--navy-800), var(--navy-950));
  border-radius: 12px 12px 12px 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 850;
}

.game-option-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.game-option-copy strong,
.game-option-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-option-copy strong {
  font-size: 13px;
}

.game-option-copy small {
  color: #8b96a8;
  font-size: 10px;
  letter-spacing: 0.1em;
}

.game-option-arrow {
  color: #a4afbf;
  font-size: 22px;
}

.game-detail {
  min-width: 0;
  padding: clamp(24px, 4vw, 38px);
}

.game-detail-header {
  margin-bottom: 27px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.game-detail-header h3 {
  margin: 0;
  color: var(--navy-950);
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 29px;
}

.game-detail-header .eyebrow {
  margin-bottom: 5px;
}

.game-emblem {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  display: grid;
  place-content: center;
  color: #fff;
  text-align: center;
  background:
    radial-gradient(circle at 75% 18%, rgb(244 212 124 / 32%), transparent 2.4rem),
    linear-gradient(145deg, var(--navy-800), var(--navy-950));
  border-radius: 20px 20px 20px 7px;
  box-shadow: 0 12px 28px rgb(23 37 84 / 20%);
}

.game-emblem span {
  color: var(--gold-300);
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.game-emblem small {
  margin-top: 4px;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.14em;
}

.game-meta {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.game-code,
.game-status,
.period-status,
.result-count {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

.game-code {
  color: var(--blue-700);
  background: #eaf2ff;
  letter-spacing: 0.08em;
}

.game-status {
  color: var(--success);
  background: var(--success-soft);
}

.game-status.is-unavailable {
  color: var(--warning);
  background: var(--warning-soft);
}

.period-state {
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #66748a;
  font-size: 13px;
}

.period-content {
  display: grid;
  grid-template-columns: minmax(230px, 0.78fr) minmax(0, 1.35fr);
  gap: 20px;
}

.current-period,
.recent-results {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.current-period {
  min-height: 274px;
  padding: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0, rgb(244 212 124 / 26%), transparent 11rem),
    linear-gradient(150deg, var(--navy-950), #214e8f);
  border-color: transparent;
  box-shadow: 0 18px 36px rgb(23 37 84 / 18%);
}

.recent-results {
  padding: 24px;
  background: #fbfcfe;
}

.period-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.period-heading h4 {
  margin: 3px 0 0;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 19px;
  font-weight: 600;
}

.period-kicker {
  color: rgb(255 255 255 / 54%);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.results-heading .period-kicker {
  color: #8a96a9;
}

.results-heading h4 {
  color: var(--navy-950);
}

.period-status {
  color: #0f6f4c;
  background: #dff8ed;
}

.period-status.status-closed,
.period-status.status-awaiting-result,
.period-status.status-cancelled,
.period-status.is-muted {
  color: #7b5b18;
  background: #fff3cc;
}

.period-status.status-scheduled {
  color: #1e5a9d;
  background: #e2efff;
}

.period-code {
  margin-top: 35px;
  overflow-wrap: anywhere;
  color: var(--gold-300);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 780;
  line-height: 1.15;
}

.period-facts {
  margin: 30px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.period-facts div {
  min-width: 0;
}

.period-facts dt {
  color: rgb(255 255 255 / 54%);
  font-size: 10px;
}

.period-facts dd {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
  color: rgb(255 255 255 / 92%);
  font-size: 12px;
  font-weight: 700;
}

#current-period-countdown {
  color: var(--gold-300);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  letter-spacing: 0.04em;
}

.result-count {
  color: #687891;
  background: #edf1f7;
}

.compact-empty {
  min-height: 145px;
  display: grid;
  place-items: center;
  color: rgb(255 255 255 / 58%);
  text-align: center;
  font-size: 12px;
}

.recent-results .compact-empty {
  color: #8792a3;
}

.result-list {
  max-height: 330px;
  margin-top: 14px;
  overflow: auto;
}

.result-item {
  padding: 13px 0;
  display: grid;
  grid-template-columns: minmax(118px, 0.7fr) minmax(0, 1.5fr);
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid #e8edf4;
}

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

.result-issue {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.result-issue strong {
  overflow: hidden;
  color: #344158;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-issue time {
  color: #929cac;
  font-size: 9px;
}

.result-balls {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}
.result-balls.ssc-result-balls { gap: 9px; }

.result-ball {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #66758c;
  border-radius: 7px 7px 7px 3px;
  box-shadow: inset 0 -2px 0 rgb(0 0 0 / 12%);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  font-weight: 850;
}

.result-ball[data-number="1"] { background: #d7a400; }
.result-ball[data-number="2"] { background: #2b79d1; }
.result-ball[data-number="3"] { background: #5c6572; }
.result-ball[data-number="4"] { background: #e17b20; }
.result-ball[data-number="5"] { background: #27a7a4; }
.result-ball[data-number="6"] { background: #665bd4; }
.result-ball[data-number="7"] { background: #8a8f98; }
.result-ball[data-number="8"] { background: #d94a47; }
.result-ball[data-number="9"] { background: #9c2c55; }
.result-ball[data-number="10"] { background: #21884f; }

.game-detail-empty {
  min-height: 420px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #7f8b9e;
  text-align: center;
}

.game-detail-empty > span {
  color: var(--gold-500);
  font-size: 28px;
}

.game-detail-empty strong {
  margin-top: 12px;
  color: #46536a;
}

.game-detail-empty p {
  max-width: 390px;
  margin: 7px 0 0;
  font-size: 12px;
  line-height: 1.6;
}

/* JSSC trading desk: familiar information density with a clean V2 visual system. */
.games-shell {
  grid-template-columns: 1fr;
  background: #edf1f6;
  border-radius: 16px;
}

.game-catalog {
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  background: linear-gradient(90deg, #17589b, #2476bd 60%, #1f68ad);
  border-right: 0;
  border-bottom: 1px solid #0f4d88;
}

.catalog-heading {
  min-width: 116px;
  padding: 0 13px 0 2px;
  border-right: 1px solid rgb(255 255 255 / 20%);
}

.catalog-heading strong {
  color: #fff;
}

.catalog-heading span {
  color: rgb(255 255 255 / 65%);
}

.game-catalog .catalog-state {
  min-height: 48px;
  padding: 5px 10px;
  color: rgb(255 255 255 / 80%);
}

.game-catalog .catalog-state .loader {
  color: #fff;
}

.game-list {
  flex: 1;
  display: flex;
  gap: 7px;
  overflow-x: auto;
}

.game-list > li {
  flex: 0 0 auto;
}

.game-option {
  width: auto;
  min-width: 155px;
  min-height: 50px;
  padding: 6px 10px;
  color: rgb(255 255 255 / 80%);
}

.game-option:hover,
.game-option.is-active {
  color: #fff;
  background: rgb(255 255 255 / 14%);
  border-color: rgb(255 255 255 / 25%);
  box-shadow: none;
}

.game-option-icon {
  width: 34px;
  height: 34px;
  color: #173a65;
  background: var(--gold-300);
  border-radius: 6px;
}

.game-option-copy small,
.game-option-arrow {
  color: rgb(255 255 255 / 58%);
}

.game-detail {
  padding: 0;
  background: #edf1f6;
}

.draw-stage {
  padding: 22px 24px 24px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 4%, rgb(77 145 220 / 25%), transparent 28rem),
    linear-gradient(125deg, #0d2345, #153c6c 58%, #102b50);
  border-bottom: 3px solid #d2a431;
}

.game-detail-header {
  margin: 0 0 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgb(255 255 255 / 13%);
}

.game-detail-header h3 {
  color: #fff;
  font-family: inherit;
  font-size: 24px;
  font-weight: 760;
}

.game-detail-header .eyebrow {
  color: var(--gold-300);
}

.game-detail-header .game-emblem {
  background: rgb(255 255 255 / 9%);
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 10px;
  box-shadow: none;
}

.game-detail-header .game-code {
  color: #d7eaff;
  background: rgb(80 151 226 / 22%);
}

.game-detail-header .game-status {
  color: #aef0d5;
  background: rgb(35 170 115 / 18%);
}

.draw-stage .period-state {
  min-height: 165px;
  color: #dbe9f8;
}

.draw-stage > .message {
  color: #fff1c5;
  background: rgb(255 193 72 / 10%);
  border-color: rgb(255 215 135 / 25%);
}

.draw-stage .period-content {
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.65fr);
  gap: 14px;
}

.draw-stage .current-period,
.draw-stage .recent-results {
  min-height: 218px;
  background: rgb(255 255 255 / 6%);
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 10px;
  box-shadow: none;
}

.draw-stage .current-period,
.draw-stage .recent-results {
  padding: 18px;
}

.draw-stage .results-heading h4,
.draw-stage .result-issue strong {
  color: #fff;
}

.draw-stage .results-heading .period-kicker,
.draw-stage .result-issue time {
  color: rgb(255 255 255 / 48%);
}

.draw-stage .result-count {
  color: #dcecff;
  background: rgb(255 255 255 / 10%);
}

.draw-stage .result-list {
  max-height: 145px;
  scrollbar-color: rgb(255 255 255 / 25%) transparent;
}

.draw-stage .result-item {
  padding: 10px 0;
  border-color: rgb(255 255 255 / 10%);
}

.draw-stage .period-code {
  margin-top: 24px;
}

.draw-stage .period-facts {
  margin-top: 22px;
}

.betting-console {
  background: #f5f7fa;
}

.betting-topbar {
  min-height: 74px;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #fff;
  border-bottom: 1px solid #d8e0eb;
}

.betting-topbar h3 {
  margin: 0;
  color: #16355d;
  font-size: 20px;
}

.betting-topbar .eyebrow {
  margin-bottom: 4px;
}

.bet-period-summary {
  margin: 0;
  display: flex;
  gap: 28px;
}

.bet-period-summary div {
  min-width: 112px;
}

.bet-period-summary dt {
  color: #8792a3;
  font-size: 10px;
}

.bet-period-summary dd {
  margin: 4px 0 0;
  color: #1c4779;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  font-weight: 800;
}

.play-tabs {
  padding: 0 17px;
  display: flex;
  overflow-x: auto;
  color: #fff;
  background: #1663a8;
  border-bottom: 1px solid #0c4b84;
}

.play-tab {
  min-width: 116px;
  min-height: 47px;
  padding: 0 18px;
  color: rgb(255 255 255 / 76%);
  background: transparent;
  border: 0;
  border-right: 1px solid rgb(255 255 255 / 10%);
  cursor: pointer;
  font-weight: 730;
}

.play-tab:hover,
.play-tab.is-active {
  color: #fff;
  background: #0e4f89;
  box-shadow: inset 0 -3px 0 var(--gold-300);
}

.market-message {
  margin: 12px 16px 0;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #516178;
  background: #fff;
  border: 1px solid #d9e1ec;
  border-left: 4px solid #8da0b7;
  border-radius: 5px;
  font-size: 12px;
}

.market-message-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  background: currentColor;
  border-radius: 50%;
}

.market-message.is-ready {
  color: #126b4a;
  background: #effaf6;
  border-left-color: #1c9a6d;
}

.market-message.is-warning {
  color: #815b0c;
  background: #fffaf0;
  border-left-color: #d6a528;
}

.market-message.is-loading .market-message-dot {
  animation: pulse 1.1s ease-in-out infinite alternate;
}

@keyframes pulse {
  to { opacity: 0.25; }
}

.bet-workspace {
  padding: 14px 16px 16px;
  display: grid;
  grid-template-columns: 184px minmax(570px, 1fr) 224px;
  align-items: start;
  gap: 12px;
  overflow-x: auto;
}

.member-shortcuts,
.trend-panel,
.market-group {
  overflow: hidden;
  background: #fff;
  border: 1px solid #d8e0ea;
  border-radius: 7px;
  box-shadow: 0 4px 14px rgb(28 54 90 / 6%);
}

.member-shortcuts {
  position: sticky;
  left: 0;
}

.member-shortcuts-heading {
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  background: #153b68;
}

.member-shortcuts-heading > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #173c68;
  background: var(--gold-300);
  border-radius: 50%;
  font-weight: 850;
}

.member-shortcuts-heading div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.member-shortcuts-heading small {
  color: rgb(255 255 255 / 58%);
  font-size: 9px;
}

.member-shortcuts-heading strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shortcut-balance {
  padding: 14px 15px;
  display: grid;
  gap: 5px;
  background: #f4f8fd;
  border-bottom: 1px solid #dfe6ef;
}

.shortcut-balance span {
  color: #7f8b9c;
  font-size: 10px;
}

.shortcut-balance strong {
  overflow-wrap: anywhere;
  color: #173d6a;
  font-size: 16px;
}

.shortcut-links {
  display: grid;
}

.shortcut-links a,
.shortcut-links button {
  min-height: 43px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #44546b;
  text-decoration: none;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #edf0f4;
  font: inherit;
  font-size: 12px;
  text-align: left;
}

.shortcut-links a:hover {
  color: #155b9b;
  background: #f2f7fc;
}

.shortcut-links button:disabled {
  color: #9aa4b3;
}

.shortcut-links small {
  margin-left: auto;
  color: #a1aab8;
  font-size: 8px;
}

.member-shortcuts > p {
  margin: 0;
  padding: 12px 13px;
  color: #919bab;
  font-size: 9px;
  line-height: 1.55;
}

.market-board {
  min-width: 570px;
  display: grid;
  gap: 12px;
}

.market-group-heading {
  min-height: 53px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #fff;
  background: linear-gradient(90deg, #174e85, #1e67a7);
}

.market-group-heading > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.market-group-heading h4 {
  margin: 0;
  font-size: 13px;
}

.market-group-heading p {
  margin: 2px 0 0;
  color: rgb(255 255 255 / 60%);
  font-size: 9px;
}

.market-index {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #173c68;
  background: var(--gold-300);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 850;
}

.market-badge {
  padding: 4px 7px;
  color: rgb(255 255 255 / 73%);
  background: rgb(255 255 255 / 10%);
  border-radius: 3px;
  font-size: 9px;
}

.market-options {
  display: grid;
}

.market-options-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.market-options-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.market-table-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  border-top: 1px solid #dfe5ed;
}

.market-table-row:first-child {
  border-top: 0;
}

.market-row-label {
  padding: 9px 8px;
  display: grid;
  place-items: center;
  color: #41516a;
  background: #eef3f8;
  border-right: 1px solid #dfe5ed;
  font-size: 11px;
  font-weight: 780;
}

.market-option-button {
  min-width: 0;
  min-height: 43px;
  padding: 5px 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #435269;
  background: #fff;
  border: 0;
  border-left: 1px solid #e0e6ee;
  cursor: pointer;
  font-size: 11px;
}

.market-option-button:first-child {
  border-left: 0;
}

.market-option-button strong {
  color: #d15a36;
  font-size: 11px;
}

.market-option-button:hover:not(:disabled) {
  color: #104f89;
  background: #edf7ff;
}

.market-option-button.is-selected {
  color: #fff;
  background: #1767aa;
  box-shadow: inset 0 0 0 2px #0f4d83;
}

.market-option-button.is-selected strong {
  color: #ffe29a;
}

.market-option-button:disabled {
  color: #9aa4b2;
  background: #fafbfc;
  cursor: not-allowed;
}

.market-option-button:disabled strong {
  color: #aeb6c1;
}

.trend-panel {
  position: sticky;
  right: 0;
}

.trend-heading {
  min-height: 59px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #fff;
  background: #153b68;
}

.trend-heading .eyebrow {
  margin-bottom: 2px;
  color: #9fc7ed;
  font-size: 8px;
}

.trend-heading h4 {
  margin: 0;
  font-size: 13px;
}

.trend-heading > span {
  padding: 4px 6px;
  color: #dcecff;
  background: rgb(255 255 255 / 9%);
  border-radius: 3px;
  font-size: 9px;
}

.trend-counters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid #dfe5ed;
}

.trend-counters div {
  padding: 9px 4px;
  display: grid;
  gap: 3px;
  text-align: center;
  border-left: 1px solid #e8ecf1;
}

.trend-counters div:first-child {
  border-left: 0;
}

.trend-counters span {
  color: #8993a2;
  font-size: 9px;
}

.trend-counters strong {
  color: #1d5488;
  font-size: 12px;
}

.trend-chart {
  height: 224px;
  padding: 13px 10px 13px 27px;
  position: relative;
  background:
    repeating-linear-gradient(to bottom, transparent 0 32px, #e8edf3 32px 33px),
    #fbfcfe;
}

.trend-axis {
  position: absolute;
  inset: 12px auto 12px 7px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #a0a9b6;
  font-size: 8px;
}

.trend-sequence {
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  gap: 2px;
  list-style: none;
}

.trend-sequence li {
  width: 18px;
  position: relative;
}

.trend-sequence li::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc((10 - var(--trend-value)) * 10%);
  bottom: 0;
  width: 1px;
  background: rgb(40 105 166 / 16%);
}

.trend-sequence li > span {
  width: 18px;
  height: 18px;
  position: absolute;
  z-index: 1;
  left: 0;
  top: calc((10 - var(--trend-value)) * 10% - 5px);
  display: grid;
  place-items: center;
  color: #fff;
  background: #286ba8;
  border-radius: 50%;
  font-size: 7px;
  font-weight: 800;
}

.trend-note {
  margin: 0;
  padding: 10px 11px;
  color: #929baa;
  border-top: 1px solid #e2e7ed;
  font-size: 8px;
  line-height: 1.5;
}

.bet-slip {
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 130px 140px 210px minmax(210px, 1fr) 130px 130px;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-top: 2px solid #1a5e9b;
  box-shadow: 0 -6px 18px rgb(24 61 101 / 8%);
}

.bet-slip-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.bet-slip-heading .eyebrow {
  margin-bottom: 2px;
  font-size: 8px;
}

.bet-slip-heading h4 {
  margin: 0;
  color: #173d69;
  font-size: 14px;
}

.text-button {
  padding: 3px;
  color: #2267a4;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 10px;
}

.text-button:disabled {
  color: #a1a9b4;
}

.stake-field {
  display: grid;
  gap: 5px;
  color: #68758a;
  font-size: 9px;
}

.stake-input-wrap {
  min-height: 39px;
  display: flex;
  align-items: center;
  color: #174d7e;
  background: #fff;
  border: 1px solid #bdc9d8;
  border-radius: 4px;
}

.stake-input-wrap > span {
  padding-left: 9px;
  font-weight: 800;
}

.stake-input-wrap input {
  min-width: 0;
  width: 100%;
  padding: 0 8px;
  color: #25374d;
  background: transparent;
  border: 0;
  outline: 0;
}

.stake-input-wrap:focus-within {
  border-color: #2876b9;
  box-shadow: 0 0 0 3px rgb(40 118 185 / 11%);
}

.quick-stakes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.quick-stakes button {
  min-height: 37px;
  padding: 0 4px;
  color: #1d5f99;
  background: #edf5fc;
  border: 1px solid #ccdeef;
  border-radius: 4px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
}

.quick-stakes button:hover:not(:disabled) {
  color: #fff;
  background: #1a67a7;
}

.quick-stakes button:disabled {
  color: #a5adb8;
  background: #f6f7f9;
  border-color: #e2e5e9;
}

.stake-help,
.bet-safety-note {
  display: none;
}

.bet-slip-empty {
  min-height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #8b95a4;
  text-align: center;
  font-size: 9px;
}

.bet-slip-empty > span,
.bet-slip-empty p {
  display: none;
}

.bet-slip-empty strong {
  font-weight: 600;
}

.bet-selection-list {
  max-height: 82px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.bet-selection-item {
  padding: 5px 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  border-bottom: 1px solid #edf0f4;
}

.bet-selection-item div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.bet-selection-item strong,
.bet-selection-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bet-selection-item strong {
  color: #3d4e65;
  font-size: 9px;
}

.bet-selection-item span {
  color: #d05b38;
  font-size: 8px;
}

.bet-selection-item button {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  color: #8c98a8;
  background: #f1f3f6;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.bet-totals {
  display: grid;
  gap: 5px;
}

.bet-totals div {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.bet-totals span {
  color: #8792a2;
  font-size: 9px;
}

.bet-totals strong {
  color: #173f6c;
  font-size: 10px;
}

.bet-message {
  grid-column: 1 / -1;
  padding: 8px 10px;
  color: #79570f;
  background: #fff7df;
  border: 1px solid #eedca2;
  border-radius: 4px;
  font-size: 10px;
}

.bet-message.is-error {
  color: #942f40;
  background: #fff0f2;
  border-color: #f1c3ca;
}

.bet-message.is-success {
  color: #126b4a;
  background: #eaf8f2;
  border-color: #bfe6d7;
}

.bet-submit {
  min-height: 42px;
  border-radius: 4px;
  box-shadow: none;
}

.pending-play {
  min-height: 330px;
  margin: 16px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #7c899a;
  background: #fff;
  border: 1px dashed #c5cfdb;
  border-radius: 7px;
  text-align: center;
}

.pending-play > span {
  color: #246aa8;
  font-size: 28px;
}

.pending-play strong {
  margin-top: 10px;
  color: #304661;
}

.pending-play p {
  max-width: 460px;
  margin: 7px 0 0;
  font-size: 11px;
  line-height: 1.6;
}

.profile-card {
  margin-top: 24px;
  padding: clamp(24px, 4vw, 40px);
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.5fr);
  gap: 45px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.profile-intro {
  display: flex;
  align-items: center;
  gap: 18px;
}

.profile-intro p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.profile-avatar {
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--gold-300);
  background: linear-gradient(145deg, var(--navy-800), var(--navy-950));
  border: 4px solid #edf3fb;
  border-radius: 22px 22px 22px 8px;
  font-family: Georgia, serif;
  font-size: 27px;
  font-weight: 700;
}

.profile-details {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 30px;
}

.profile-details > div {
  min-width: 0;
  padding: 13px 0;
  border-bottom: 1px solid #edf0f5;
}

.profile-details .detail-wide {
  grid-column: 1 / -1;
}

.profile-details dt {
  color: #8a94a5;
  font-size: 12px;
}

.profile-details dd {
  min-height: 23px;
  margin: 7px 0 0;
  color: #263249;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 650;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px !important;
}

.status-pill,
.role-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  color: var(--success);
  background: var(--success-soft);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
}

.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 6px;
  background: currentColor;
  border-radius: 50%;
}

.status-pill.is-inactive {
  color: var(--danger);
  background: var(--danger-soft);
}

.role-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.role-chip {
  color: var(--blue-700);
  background: #eaf2ff;
}

.site-footer {
  min-height: 80px;
  padding: 20px;
  display: grid;
  place-items: center;
  color: #8b94a3;
  border-top: 1px solid var(--line);
  background: #fff;
  text-align: center;
  font-size: 12px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 960px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: auto;
  }

  .visual-copy {
    max-width: 700px;
    padding: 54px;
  }

  .visual-copy h1 {
    font-size: 43px;
  }

  .trust-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }

  .trust-list li {
    align-items: flex-start;
  }

  .auth-panel {
    padding-block: 48px;
  }

  .wallet-grid {
    grid-template-columns: 1fr 1fr;
  }

  .period-content {
    grid-template-columns: 1fr;
  }

  .current-period {
    min-height: 250px;
  }

  .balance-card:last-child {
    grid-column: 1 / -1;
  }

  .profile-card {
    grid-template-columns: 1fr;
    gap: 25px;
  }
}

@media (max-width: 640px) {
  .header-inner,
  .auth-shell,
  .dashboard {
    width: min(calc(100% - 28px), var(--content));
  }

  .header-inner {
    min-height: 66px;
  }

  .brand-mark {
    width: 37px;
    height: 37px;
  }

  .brand-copy strong {
    font-size: 12px;
  }

  .brand-copy small,
  .online-dot,
  .header-username {
    display: none;
  }

  .button-quiet {
    min-height: 38px;
  }

  .auth-shell {
    min-height: auto;
    margin: 18px auto 30px;
    border-radius: 22px;
  }

  .auth-visual {
    display: none;
  }

  .auth-panel {
    padding: 35px 22px;
  }

  .auth-heading h2 {
    font-size: 28px;
  }

  .dashboard {
    min-height: calc(100vh - 146px);
    padding: 36px 0 48px;
  }

  .dashboard-header,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-header h1 {
    font-size: 36px;
  }

  .dashboard-header .button,
  .section-heading .as-of {
    width: 100%;
  }

  .as-of {
    margin-top: -9px;
  }

  .wallet-grid {
    grid-template-columns: 1fr;
  }

  .games-shell {
    grid-template-columns: 1fr;
  }

  .game-catalog {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .game-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-detail {
    padding: 24px 18px;
  }

  .game-detail-empty {
    min-height: 260px;
  }

  .result-item {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .result-balls {
    justify-content: flex-start;
  }

  .balance-card:last-child {
    grid-column: auto;
  }

  .profile-card {
    padding: 24px 20px;
    border-radius: 18px;
  }

  .profile-intro {
    align-items: flex-start;
  }

  .profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 18px 18px 18px 7px;
    font-size: 23px;
  }

  .profile-details {
    grid-template-columns: 1fr;
  }

  .profile-details .detail-wide {
    grid-column: auto;
  }
}

@media (max-width: 440px) {
  .game-list {
    grid-template-columns: 1fr;
  }

  .game-detail-header {
    align-items: flex-start;
  }

  .game-emblem {
    width: 56px;
    height: 56px;
    border-radius: 17px 17px 17px 6px;
  }

  .game-detail-header h3 {
    font-size: 24px;
  }

  .period-facts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .bet-workspace {
    grid-template-columns: 170px minmax(540px, 1fr) 210px;
  }

  .bet-slip {
    grid-template-columns: 115px 130px 190px minmax(180px, 1fr) 120px 120px;
  }
}

@media (max-width: 760px) {
  .game-catalog {
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
  }

  .catalog-heading {
    min-width: 0;
    padding: 2px 0 8px;
    border-right: 0;
    border-bottom: 1px solid rgb(255 255 255 / 18%);
  }

  .game-list {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-list > li,
  .game-option {
    width: 100%;
    min-width: 0;
  }

  .game-detail {
    padding: 0;
  }

  .draw-stage {
    padding: 18px 14px;
  }

  .draw-stage .period-content {
    grid-template-columns: 1fr;
  }

  .betting-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .bet-period-summary {
    width: 100%;
    gap: 12px;
  }

  .bet-period-summary div {
    min-width: 0;
    flex: 1;
  }

  .play-tabs {
    padding-inline: 0;
  }

  .play-tab {
    min-width: 104px;
    padding-inline: 12px;
  }

  .market-message {
    margin: 10px 10px 0;
  }

  .bet-workspace {
    padding: 10px;
    grid-template-columns: 1fr;
    gap: 10px;
    overflow: visible;
  }

  .member-shortcuts,
  .trend-panel {
    position: static;
  }

  .shortcut-links {
    grid-template-columns: 1fr 1fr;
  }

  .market-board {
    min-width: 0;
  }

  .market-table-row {
    grid-template-columns: 66px minmax(0, 1fr);
  }

  .market-option-button {
    padding-inline: 4px;
    flex-direction: column;
    gap: 2px;
  }

  .trend-chart {
    height: 180px;
  }

  .bet-slip {
    padding: 13px 10px;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .bet-slip-heading,
  .bet-selection-list,
  .bet-slip-empty,
  .bet-message,
  .bet-safety-note {
    grid-column: 1 / -1;
  }

  .bet-slip-heading {
    padding-bottom: 8px;
    border-bottom: 1px solid #e1e6ed;
  }

  .stake-help {
    display: block;
    grid-column: 1 / -1;
    margin: -5px 0 0;
    color: #8994a4;
    font-size: 9px;
  }

  .bet-selection-list {
    max-height: 140px;
  }

  .bet-safety-note {
    display: block;
    margin: 0;
    color: #8994a4;
    font-size: 9px;
    line-height: 1.5;
  }

  .pending-play {
    margin: 10px;
  }
}

@media (max-width: 440px) {
  .game-list,
  .shortcut-links {
    grid-template-columns: 1fr;
  }

  .draw-stage .current-period,
  .draw-stage .recent-results {
    padding: 15px;
  }

  .market-group-heading p,
  .market-badge {
    display: none;
  }

  .market-table-row {
    grid-template-columns: 55px minmax(0, 1fr);
  }

  .market-row-label {
    padding-inline: 4px;
    font-size: 9px;
  }

  .market-option-button {
    min-height: 47px;
    font-size: 10px;
  }

  .quick-stakes {
    grid-template-columns: repeat(2, 1fr);
  }

  .bet-slip {
    grid-template-columns: 1fr;
  }

  .bet-slip > * {
    grid-column: 1;
  }
}

/* Dense desktop betting layout aligned with the familiar JSSC desk. */
.is-authenticated {
  background: #e9e9e9;
}

.is-authenticated .site-header {
  background: #fff;
  border-bottom-color: #cfd6de;
  backdrop-filter: none;
}

.is-authenticated .header-inner {
  width: calc(100% - 24px);
  min-height: 48px;
}

.is-authenticated .brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 3px;
}

.is-authenticated .brand-copy strong {
  font-size: 13px;
}

.is-authenticated .brand-copy small {
  display: none;
}

.is-authenticated .dashboard {
  width: 100%;
  min-width: 1200px;
  min-height: calc(100vh - 48px);
  padding: 0;
}

.is-authenticated .dashboard-header,
.is-authenticated .games-section > .section-heading,
.is-authenticated .site-footer {
  display: none;
}

.is-authenticated .dashboard > .message,
.is-authenticated .dashboard-loading {
  margin: 6px 10px;
}

.is-authenticated .games-section {
  margin: 0;
}

.is-authenticated .games-shell {
  min-height: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.is-authenticated .game-detail {
  width: 100%;
}

.is-authenticated .draw-stage {
  min-height: 116px;
  padding: 8px 14px;
  display: grid;
  grid-template-columns: clamp(220px, 16vw, 320px) minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
  background: #073c70;
  border-bottom: 0;
}

.is-authenticated .game-detail-header {
  min-width: 0;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 2px;
}

.is-authenticated .game-emblem {
  width: 48px;
  height: 48px;
  border-radius: 2px;
}

.is-authenticated .game-detail-header h3 {
  font-size: 18px;
}

.is-authenticated .draw-stage .period-content {
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 8px;
}

.is-authenticated .draw-stage .current-period,
.is-authenticated .draw-stage .recent-results {
  min-height: 98px;
  padding: 9px 12px;
  border-radius: 2px;
}

.is-authenticated .draw-stage .period-heading h4 {
  font-family: inherit;
  font-size: 13px;
}

.is-authenticated .draw-stage .period-kicker {
  display: none;
}

.is-authenticated .draw-stage .period-code {
  margin-top: 10px;
  font-size: 18px;
}

.is-authenticated .draw-stage .period-facts {
  margin-top: 8px;
  grid-template-columns: 1fr 1fr;
}

.is-authenticated .draw-stage .period-facts dt,
.is-authenticated .draw-stage .period-facts dd {
  font-size: 9px;
}

.is-authenticated .draw-stage .result-list {
  max-height: 60px;
  margin-top: 5px;
  overflow: hidden;
}

.is-authenticated .draw-stage .result-item {
  min-height: 45px;
  padding: 4px 0;
  grid-template-columns: 150px minmax(0, 1fr);
}

.is-authenticated .draw-stage .result-item:not(:first-child) {
  display: none;
}

.is-authenticated .draw-stage .result-ball {
  width: 28px;
  height: 28px;
  border-radius: 3px;
  font-size: 10px;
}

.is-authenticated .draw-stage .result-balls {
  justify-content: flex-start;
}

.is-authenticated .game-catalog {
  min-height: 48px;
  padding: 4px 12px;
  background: #1764ad;
  border-bottom: 1px solid #0d4e88;
  border-radius: 0;
}

.is-authenticated .catalog-heading {
  min-width: 145px;
}

.is-authenticated .game-option {
  min-width: 150px;
  min-height: 38px;
  border-radius: 1px;
}

.is-authenticated .game-option.is-active {
  color: #1764ad;
  background: #fff;
  border-color: #fff;
}

.is-authenticated .game-option.is-active .game-option-copy small,
.is-authenticated .game-option.is-active .game-option-arrow {
  color: #5c7fa2;
}

.is-authenticated .play-tabs {
  min-height: 44px;
  padding: 0 12px;
  background: #dedede;
  border-bottom: 1px solid #bfc5cb;
}

.is-authenticated .play-tab {
  min-height: 44px;
  color: #485461;
  background: #eee;
  border-right-color: #c5cbd1;
}

.is-authenticated .play-tab:hover,
.is-authenticated .play-tab.is-active {
  color: #fff;
  background: #ff7043;
  box-shadow: none;
}

.is-authenticated .betting-topbar {
  min-height: 48px;
  padding: 7px 16px;
  color: #fff;
  background: #064781;
  border-bottom-color: #04345f;
}

.is-authenticated .betting-topbar .eyebrow {
  display: none;
}

.is-authenticated .betting-topbar h3 {
  color: #fff;
  font-size: 16px;
}

.is-authenticated .bet-period-summary dt {
  color: rgb(255 255 255 / 65%);
}

.is-authenticated .bet-period-summary dd {
  color: #fff;
}

.is-authenticated #bet-period-countdown {
  color: #ffdf44;
}

.is-authenticated .market-message {
  margin: 5px 8px 0;
  padding: 6px 10px;
  border-radius: 1px;
}

.is-authenticated .bet-workspace {
  padding: 6px 8px;
  grid-template-columns: clamp(230px, 16vw, 390px) minmax(760px, 1fr) clamp(210px, 12.3vw, 305px);
  gap: 6px;
  overflow: visible;
}

.is-authenticated .member-shortcuts,
.is-authenticated .trend-panel,
.is-authenticated .market-group {
  border-color: #b8c5d2;
  border-radius: 1px;
  box-shadow: none;
}

.is-authenticated .member-shortcuts-heading,
.is-authenticated .trend-heading {
  border-radius: 0;
  background: #064781;
}

.is-authenticated .shortcut-balance {
  min-height: 74px;
  padding: 14px 16px;
}

.is-authenticated .shortcut-balance strong {
  font-size: 20px;
}

.is-authenticated .shortcut-links {
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #b8c5d2;
}

.is-authenticated .shortcut-links a,
.is-authenticated .shortcut-links button {
  min-height: 48px;
  color: #fff;
  background: #1764ad;
  border: 0;
}

.is-authenticated .shortcut-links a:hover {
  color: #fff;
  background: #0f528e;
}

.is-authenticated .shortcut-links button:disabled {
  color: rgb(255 255 255 / 58%);
  background: #397bad;
}

.is-authenticated .member-shortcuts > p {
  display: none;
}

.is-authenticated .market-board {
  min-width: 760px;
  gap: 6px;
}

.is-authenticated .market-group-heading {
  min-height: 34px;
  padding: 4px 8px;
  background: #1764ad;
}

.is-authenticated .market-group-heading p,
.is-authenticated .market-index,
.is-authenticated .market-badge {
  display: none;
}

.is-authenticated .market-group-heading h4 {
  font-size: 13px;
}

.is-authenticated .market-options-four {
  grid-template-columns: repeat(4, 1fr);
}

.is-authenticated .rank-market-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.is-authenticated .rank-market-column,
.is-authenticated .dragon-market-column {
  min-width: 0;
  border-right: 1px solid #b8c5d2;
  border-bottom: 1px solid #b8c5d2;
}

.is-authenticated .rank-market-column:nth-child(5n),
.is-authenticated .dragon-market-column:last-child {
  border-right: 0;
}

.is-authenticated .rank-market-column:nth-child(n+6) {
  border-bottom: 0;
}

.is-authenticated .market-row-label {
  min-height: 28px;
  padding: 4px;
  color: #263a4f;
  background: #ddd;
  border-right: 0;
  border-bottom: 1px solid #b8c5d2;
  font-size: 11px;
}

.is-authenticated .rank-column-options,
.is-authenticated .dragon-column-options {
  display: grid;
}

.is-authenticated .dragon-market-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.is-authenticated .market-option-cell {
  min-height: 38px;
  padding: 3px 4px;
  display: grid;
  grid-template-columns: 28px minmax(35px, 1fr) minmax(46px, 0.9fr);
  align-items: center;
  gap: 3px;
  background: #fff;
  border-right: 1px solid #b8c5d2;
  border-bottom: 1px solid #b8c5d2;
}

.is-authenticated .market-options-four .market-option-cell:last-child,
.is-authenticated .rank-column-options .market-option-cell,
.is-authenticated .dragon-column-options .market-option-cell {
  border-right: 0;
}

.is-authenticated .rank-column-options .market-option-cell:last-child,
.is-authenticated .dragon-column-options .market-option-cell:last-child {
  border-bottom: 0;
}

.is-authenticated .market-option-name {
  color: #344559;
  text-align: center;
  font-size: 11px;
}

.is-authenticated .market-option-odds {
  color: #f00;
  text-align: center;
  font-size: 11px;
}

.is-authenticated .market-option-cell input {
  min-width: 0;
  width: 100%;
  height: 27px;
  padding: 2px 4px;
  color: #28394c;
  background: #fff;
  border: 1px solid #9eabb8;
  border-radius: 1px;
  font: inherit;
  font-size: 11px;
  text-align: center;
}

.is-authenticated .market-option-cell input:focus {
  border-color: #ff7043;
  box-shadow: 0 0 0 1px #ff7043;
  outline: 0;
}

.is-authenticated .market-option-cell input:disabled {
  color: #a8b0ba;
  background: #eee;
}

.is-authenticated .market-option-cell.has-stake {
  background: #fff5ef;
}

.is-authenticated .trend-panel {
  position: static;
}

.is-authenticated .trend-heading {
  min-height: 38px;
  padding: 5px 8px;
  background: #e77727;
}

.is-authenticated .trend-heading .eyebrow {
  display: none;
}

.is-authenticated .long-streak-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.is-authenticated .long-streak-list li {
  min-height: 31px;
  padding: 0 8px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  color: #405064;
  background: #fff;
  border-bottom: 1px solid #d7dde3;
  font-size: 10px;
}

.is-authenticated .long-streak-list li:nth-child(even) {
  background: #f2f2f2;
}

.is-authenticated .long-streak-list li > span {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #1764ad;
  border-radius: 50%;
  font-size: 8px;
}

.is-authenticated .long-streak-list strong {
  font-weight: 600;
}

.is-authenticated .long-streak-list em {
  color: #e45828;
  font-style: normal;
  font-weight: 800;
}

.is-authenticated .trend-note {
  padding: 7px;
}

.is-authenticated .bet-slip {
  min-height: 58px;
  padding: 7px 16px;
  grid-template-columns: 110px 250px minmax(180px, 1fr) 120px 100px 92px;
  justify-content: center;
  border-top: 1px solid #b8c5d2;
  box-shadow: none;
}

.is-authenticated .bet-slip-heading .eyebrow,
.is-authenticated .stake-help,
.is-authenticated .bet-safety-note,
.is-authenticated .bet-slip-empty,
.is-authenticated .bet-selection-list {
  display: none;
}

.is-authenticated .quick-stakes button {
  min-height: 34px;
  border-radius: 1px;
}

.is-authenticated .bet-submit,
.is-authenticated .bet-reset {
  min-height: 38px;
  border-radius: 2px;
  box-shadow: none;
}

.is-authenticated .bet-submit {
  background: #1764ad;
}

.is-authenticated .bet-reset {
  color: #fff;
  background: #1764ad;
  border-color: #0f528f;
}

@media (max-width: 760px) {
  .is-authenticated .dashboard {
    min-width: 320px;
  }

  .is-authenticated .draw-stage {
    grid-template-columns: 1fr;
  }

  .is-authenticated .draw-stage .period-content {
    grid-template-columns: 1fr;
  }

  .is-authenticated .bet-workspace {
    grid-template-columns: 1fr;
    overflow: hidden;
  }

  .is-authenticated .market-board {
    min-width: 0;
    overflow-x: auto;
  }

  .is-authenticated .rank-market-list,
  .is-authenticated .dragon-market-list {
    min-width: 720px;
  }

  .is-authenticated .bet-slip {
    grid-template-columns: 1fr 1fr;
  }
}

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

/* JSSC first-release skin: retain the old red member-console visual language
   while keeping the new server-rendered structure and accessibility hooks. */
.legacy-skin.is-authenticated { background: #f4f4f4; }
.legacy-skin.is-authenticated .site-header {
  color: #fff; border: 0; background: linear-gradient(135deg,#b62d4d,#8d1732);
}
.legacy-skin.is-authenticated .header-inner { max-width: 1440px; min-height: 92px; }
.legacy-skin.is-authenticated .brand { color: #fff; }
.legacy-skin.is-authenticated .brand-mark { color: #ffe57b; background: transparent; border: 0; box-shadow: none; }
.legacy-skin.is-authenticated .brand-copy strong { font-size: 24px; letter-spacing: .08em; }
.legacy-skin.is-authenticated .brand-copy small { color: #ffd9df; }
.legacy-skin.is-authenticated .button-quiet { color: #fff; border-color: rgb(255 255 255 / 35%); }
.legacy-skin.is-authenticated .dashboard { width: min(1440px,calc(100% - 32px)); margin: 18px auto 40px; }
.legacy-skin.is-authenticated .dashboard-header { padding: 18px 24px; color: #fff; background: #9d2340; border-radius: 8px 8px 0 0; }
.legacy-skin.is-authenticated .dashboard-header h1 { color: #fff; }
.legacy-skin.is-authenticated .dashboard-header p { color: #ffd9df; }
.legacy-skin.is-authenticated .games-section { border: 1px solid #e7b4bd; border-radius: 0 0 8px 8px; box-shadow: 0 8px 22px rgb(102 17 37 / 10%); }
.legacy-skin.is-authenticated .game-card,
.legacy-skin.is-authenticated .betting-console,
.legacy-skin.is-authenticated .market-group,
.legacy-skin.is-authenticated .trend-panel,
.legacy-skin.is-authenticated .bet-slip { border-radius: 4px; border-color: #e8b8c0; }
.legacy-skin.is-authenticated .game-card { background: #fff; }
.legacy-skin.is-authenticated .game-card.is-active { border-color: #b62d4d; box-shadow: inset 0 3px #b62d4d; }
.legacy-skin.is-authenticated .betting-topbar { color: #fff; background: #b62d4d; }
.legacy-skin.is-authenticated .market-group-heading,
.legacy-skin.is-authenticated .trend-heading,
.legacy-skin.is-authenticated .bet-slip-heading { background: #f4e6e8; }
.legacy-skin.is-authenticated .market-option.is-selected { color: #fff; background: #b62d4d; border-color: #b62d4d; }
.legacy-skin.is-authenticated .button-primary { background: linear-gradient(#c74b62,#921d39); border-color: #921d39; }
.legacy-skin.is-authenticated .button-secondary { color: #9d2340; border-color: #d58a99; background: #fff; }
.legacy-skin.is-authenticated .shortcut-balance strong,
.legacy-skin.is-authenticated .balance-value { color: #b62d4d; }
.legacy-skin.is-authenticated .trend-panel { background: #fff; }
.legacy-skin.is-authenticated .draw-stage { background: #fff; }
.legacy-skin.is-authenticated .game-detail-header { padding: 14px 22px; background: #b62d4d; color: #fff; }
.legacy-skin.is-authenticated .game-detail-header h3,
.legacy-skin.is-authenticated .game-detail-header .eyebrow { color: #fff; }
.legacy-skin.is-authenticated .game-emblem { background: #f6c842; color: #7c1730; border-color: #ffe9a4; }
.legacy-skin.is-authenticated .period-code { color: #a51e3d; font-size: 1.65rem; }
.legacy-skin.is-authenticated .current-period,
.legacy-skin.is-authenticated .recent-results { background: #fff9fa; border-color: #efc8ce; }
.legacy-skin.is-authenticated .bet-workspace { grid-template-columns: 180px minmax(0,1fr) 210px; gap: 10px; padding: 12px; background: #fff; }
.legacy-skin.is-authenticated .member-shortcuts { background: linear-gradient(#d65a70,#b62d4d); color: #fff; }
.legacy-skin.is-authenticated .member-shortcuts-heading strong,
.legacy-skin.is-authenticated .member-shortcuts-heading small,
.legacy-skin.is-authenticated .member-shortcuts > p { color: #fff; }
.legacy-skin.is-authenticated .shortcut-links a,
.legacy-skin.is-authenticated .shortcut-links button { color: #fff; border-color: rgb(255 255 255 / 35%); }
.legacy-skin.is-authenticated .market-board { gap: 8px; }
.legacy-skin.is-authenticated .market-group-heading h4 { color: #8b293c; }
.legacy-skin.is-authenticated .market-group-heading p { color: #9d6971; }
.legacy-skin.is-authenticated .trend-heading h4 { color: #8b293c; }
.legacy-skin.is-authenticated .bet-slip { background: #fff9fa; }
.legacy-skin.is-authenticated .quick-stakes button { color: #9d2340; border-color: #d58a99; }

/* Compact blue skin requested for the first JSSC frontend pass. */
.legacy-skin.is-authenticated { background: #eef3f9; font-size: 14px; }
.legacy-skin.is-authenticated .site-header { background: linear-gradient(135deg,#245a9a,#123b70); }
.legacy-skin.is-authenticated .header-inner { min-height: 70px; }
.legacy-skin.is-authenticated .brand-copy strong { font-size: 19px; }
.legacy-skin.is-authenticated .brand-copy small { font-size: 10px; letter-spacing: .18em; color: #c9dcf6; }
.legacy-skin.is-authenticated .dashboard { width: min(1240px,calc(100% - 24px)); margin: 12px auto 28px; }
.legacy-skin.is-authenticated .dashboard-header { padding: 12px 18px; background: #1f5592; border-radius: 5px 5px 0 0; }
.legacy-skin.is-authenticated .dashboard-header h1 { font-size: 23px; }
.legacy-skin.is-authenticated .dashboard-header p { font-size: 12px; }
.legacy-skin.is-authenticated .games-section { border-color: #b7cce5; border-radius: 0 0 5px 5px; }
.legacy-skin.is-authenticated .game-detail-header { padding: 10px 16px; background: #2b66a8; }
.legacy-skin.is-authenticated .game-detail-header h3 { font-size: 18px; }
.legacy-skin.is-authenticated .game-emblem { width: 42px; height: 42px; font-size: 18px; }
.legacy-skin.is-authenticated .play-tabs { gap: 0; border-bottom: 1px solid #b7cce5; }
.legacy-skin.is-authenticated .play-tab { min-height: 42px; padding: 8px 20px; color: #234f80; background: #e4edf8; border: 0; border-right: 1px solid #b7cce5; font-size: 14px; font-weight: 700; }
.legacy-skin.is-authenticated .play-tab.is-active { color: #fff; background: #2e6eb4; }
.legacy-skin.is-authenticated .betting-topbar { padding: 10px 14px; background: #2e6eb4; }
.legacy-skin.is-authenticated .betting-topbar h3 { font-size: 16px; }
.legacy-skin.is-authenticated .bet-workspace { grid-template-columns: 155px minmax(0,1fr) 175px; gap: 8px; padding: 8px; }
.legacy-skin.is-authenticated .member-shortcuts { padding: 10px; background: linear-gradient(#397fc1,#245a9a); }
.legacy-skin.is-authenticated .member-shortcuts-heading strong { font-size: 14px; }
.legacy-skin.is-authenticated .shortcut-links a,
.legacy-skin.is-authenticated .shortcut-links button { padding: 7px 6px; font-size: 12px; }
.legacy-skin.is-authenticated .market-group-heading { padding: 8px 10px; }
.legacy-skin.is-authenticated .market-group-heading h4 { font-size: 14px; color: #245a9a; }
.legacy-skin.is-authenticated .market-group-heading p { font-size: 11px; }
.legacy-skin.is-authenticated .market-option { min-height: 34px; padding: 6px 8px; font-size: 13px; }
.legacy-skin.is-authenticated .trend-heading { padding: 8px 10px; }
.legacy-skin.is-authenticated .trend-heading h4 { font-size: 14px; color: #245a9a; }
.legacy-skin.is-authenticated .bet-slip { padding: 10px; }
.legacy-skin.is-authenticated .bet-submit { min-height: 36px; font-size: 14px; }
.legacy-skin.is-authenticated .button-primary { background: linear-gradient(#3478bd,#1f5592); border-color: #1f5592; }
.legacy-skin.is-authenticated .button-secondary { color: #245a9a; border-color: #8eafd2; }
.legacy-skin.is-authenticated .shortcut-balance strong,
.legacy-skin.is-authenticated .balance-value { color: #245a9a; }
.legacy-top-nav { display: flex; flex-wrap: wrap; gap: 0; background: #163e72; border: 1px solid #255b95; }
.legacy-top-nav a { flex: 1 1 auto; min-width: 110px; padding: 9px 12px; color: #fff; text-align: center; text-decoration: none; border-right: 1px solid rgb(255 255 255 / 18%); font-size: 13px; }
.legacy-top-nav a:hover { background: #2e6eb4; }
.legacy-skin.is-authenticated .shortcut-links { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.legacy-skin.is-authenticated .shortcut-links a,
.legacy-skin.is-authenticated .shortcut-links button { min-height: 32px; justify-content: center; text-align: center; }
.legacy-skin.is-authenticated .wallet-section { margin: 6px 0; }
.legacy-skin.is-authenticated .wallet-section .section-heading { min-height: 28px; margin-bottom: 5px; }
.legacy-skin.is-authenticated .wallet-section .section-heading h2 { font-size: 15px; }
.legacy-skin.is-authenticated .wallet-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; }
.legacy-skin.is-authenticated .balance-card { padding: 7px 10px; }
.legacy-skin.is-authenticated .balance-card p { display: none; }
.legacy-skin.is-authenticated .games-shell { grid-template-columns: 1fr; }
.legacy-skin.is-authenticated .game-catalog { padding: 5px 8px; }
.legacy-skin.is-authenticated .catalog-heading { min-height: 24px; font-size: 12px; }
.legacy-skin.is-authenticated .game-list { display: flex; gap: 5px; overflow-x: auto; }
.legacy-skin.is-authenticated .game-list li { min-width: 100px; padding: 5px 8px; }
.legacy-skin.is-authenticated .betting-console { order: 2; }
.legacy-skin.is-authenticated .bet-workspace { grid-template-columns: 125px minmax(0,1fr) 145px; }
.legacy-skin.is-authenticated .market-board { min-width: 0; }
.legacy-skin.is-authenticated .market-group { overflow: hidden; }
.legacy-skin.is-authenticated .rank-market-list,
.legacy-skin.is-authenticated .dragon-market-list { max-height: none; }
.legacy-skin.is-authenticated .trend-panel { padding: 5px; }
.legacy-skin.is-authenticated .long-streak-list { font-size: 11px; }

/* Expand the canvas again so future games can share the same shell. */
.legacy-skin.is-authenticated .dashboard { width: min(1480px,calc(100% - 28px)); }
.legacy-skin.is-authenticated .header-inner { max-width: 1480px; min-height: 78px; }
.legacy-skin.is-authenticated .legacy-draw-strip { grid-template-columns: 220px 165px minmax(360px,1fr) 400px; min-height: 72px; padding: 10px 20px; }
.legacy-skin.is-authenticated .legacy-logo { font-size: 28px; }
.legacy-skin.is-authenticated .legacy-draw-numbers i { width: 29px; height: 29px; font-size: 15px; }
.legacy-skin.is-authenticated .legacy-top-nav a { min-width: 125px; padding: 11px 14px; font-size: 14px; }
.legacy-skin.is-authenticated .dashboard-header { padding: 16px 22px; }
.legacy-skin.is-authenticated .dashboard-header h1 { font-size: 27px; }
.legacy-skin.is-authenticated .game-detail-header { padding: 14px 20px; }
.legacy-skin.is-authenticated .game-detail-header h3 { font-size: 21px; }
.legacy-skin.is-authenticated .play-tab { min-height: 50px; padding: 11px 28px; font-size: 16px; }
.legacy-skin.is-authenticated .betting-topbar { padding: 13px 18px; }
.legacy-skin.is-authenticated .betting-topbar h3 { font-size: 19px; }
.legacy-skin.is-authenticated .bet-workspace { grid-template-columns: 185px minmax(0,1fr) 210px; gap: 12px; padding: 12px; }
.legacy-skin.is-authenticated .member-shortcuts { padding: 14px; }
.legacy-skin.is-authenticated .shortcut-links a,
.legacy-skin.is-authenticated .shortcut-links button { min-height: 38px; padding: 9px 7px; font-size: 13px; }
.legacy-skin.is-authenticated .market-group-heading { padding: 11px 14px; }
.legacy-skin.is-authenticated .market-group-heading h4 { font-size: 16px; }
.legacy-skin.is-authenticated .market-group-heading p { font-size: 12px; }
.legacy-skin.is-authenticated .market-option { min-height: 42px; padding: 9px 11px; font-size: 14px; }
.legacy-skin.is-authenticated .trend-panel { padding: 9px; }
.legacy-skin.is-authenticated .long-streak-list { font-size: 13px; }

/* Keep the betting terminal above the fold; supporting information follows it. */
.legacy-skin.is-authenticated .games-shell { display: flex; flex-direction: column; }
.legacy-skin.is-authenticated #betting-console { order: 1; width: 100%; }
.legacy-skin.is-authenticated #game-detail { order: 1; width: 100%; display: flex; flex-direction: column; }
.legacy-skin.is-authenticated #game-detail .betting-console { order: 1; }
.legacy-skin.is-authenticated #game-detail .draw-stage { order: 2; }
.legacy-skin.is-authenticated #game-detail .game-catalog { order: 3; }
.legacy-skin.is-authenticated .betting-console .play-tabs { position: relative; z-index: 2; }
.legacy-skin.is-authenticated .betting-console .betting-topbar { min-height: 54px; }
.legacy-skin.is-authenticated .betting-console .market-message { padding: 5px 10px; }
.legacy-skin.is-authenticated .betting-console .bet-workspace { min-height: 520px; }
.legacy-skin.is-authenticated .game-detail { margin-top: 8px; }
.legacy-skin.is-authenticated .game-detail-header { min-height: 48px; }
.legacy-skin.is-authenticated .game-catalog { margin-top: 6px; }
.legacy-skin.is-authenticated .profile-card { display: none; }

/* Match the legacy JSSC console shell: no card dashboard, one dense betting table. */
.legacy-skin.is-authenticated .dashboard-header { display: none; }
.legacy-skin.is-authenticated .site-header { background: linear-gradient(#c64761,#9e203c); }
.legacy-skin.is-authenticated .site-header { display: none; }
.legacy-skin.is-authenticated .legacy-draw-strip { grid-template-columns: 260px 165px minmax(360px,1fr) 420px; background: linear-gradient(#c64761,#9e203c); border-bottom: 1px solid #8a1932; }
.legacy-skin.is-authenticated .legacy-logo { color: #ffe35f; font-family: SimSun,"宋体",serif; font-size: 31px; }
.legacy-skin.is-authenticated .legacy-top-nav { background: #701b2f; border: 0; }
.legacy-skin.is-authenticated .legacy-top-nav { display: none; }

.legacy-skin.is-authenticated .legacy-live-info{display:flex;align-items:center;gap:24px;flex-wrap:wrap;min-height:30px;padding:4px max(18px,calc((100% - 1480px)/2));color:#214b76;background:#e5f1fb;border-bottom:1px solid #bed7eb;font-size:12px}.legacy-skin.is-authenticated .legacy-live-info strong{color:#103d71;font-size:13px}.legacy-skin.is-authenticated #today-net.negative{color:#bc3838}.legacy-skin.is-authenticated #today-net.positive{color:#137943}
@media(max-width:700px){.legacy-skin.is-authenticated .legacy-live-info{gap:6px 15px}}
.legacy-skin.is-authenticated .legacy-top-nav a { min-width: 130px; border-color: #4f1222; font-weight: 700; }
.legacy-skin.is-authenticated .legacy-top-nav a:first-child { background: #d87588; color: #5d1727; }
.legacy-skin.is-authenticated .games-section { border: 0; box-shadow: none; background: #fff; }
.legacy-skin.is-authenticated .section-heading { display: none; }
.legacy-skin.is-authenticated #game-detail { display: flex; width: 100%; margin: 0; border: 0; box-shadow: none; background: #fff; }
.legacy-skin.is-authenticated #game-detail .draw-stage,
.legacy-skin.is-authenticated #game-detail .game-catalog { display: none; }
.legacy-skin.is-authenticated #betting-console { width: 100%; margin: 0; border: 0; box-shadow: none; }
.legacy-skin.is-authenticated .play-tabs { padding-left: 285px; background: #d6788a; border: 0; }
.legacy-skin.is-authenticated .play-tab { color: #fff; background: transparent; border: 0; font-size: 16px; }
.legacy-skin.is-authenticated .play-tab.is-active { color: #672033; background: #e3a0ab; }
.legacy-skin.is-authenticated .betting-topbar { margin: 7px 285px 0 285px; background: #b83250; border-radius: 4px 4px 0 0; }
.legacy-skin.is-authenticated .market-message { margin: 0 285px; }
.legacy-skin.is-authenticated .bet-workspace { grid-template-columns: 270px minmax(0,1fr) 220px; padding: 0 0 0 0; gap: 8px; background: #fff; }
.legacy-skin.is-authenticated .member-shortcuts { border-radius: 0; background: #fff; color: #682035; border: 1px solid #e8b0bc; }
.legacy-skin.is-authenticated .member-shortcuts-heading { color: #fff; background: linear-gradient(#d36a7d,#b83752); margin: -10px -10px 10px; padding: 12px; justify-content: center; }
.legacy-skin.is-authenticated .member-shortcuts-heading small,
.legacy-skin.is-authenticated .member-shortcuts-heading strong { color: #fff; }
.legacy-skin.is-authenticated .shortcut-links { gap: 2px; }
.legacy-skin.is-authenticated .shortcut-links a,
.legacy-skin.is-authenticated .shortcut-links button { color: #fff; background: #d46b7b; border: 1px solid #efb0ba; font-size: 15px; }
.legacy-skin.is-authenticated .shortcut-links a:nth-child(3n),
.legacy-skin.is-authenticated .shortcut-links button:nth-child(4n) { background: #ff5d1b; }
.legacy-skin.is-authenticated .market-board { gap: 5px; padding: 0; }
.legacy-skin.is-authenticated .market-group { border: 1px solid #edb3bd; border-radius: 0; }
.legacy-skin.is-authenticated .market-group-heading { justify-content: center; background: #e4e4e4; border-bottom: 1px solid #edb3bd; }
.legacy-skin.is-authenticated .market-group-heading > div { justify-content: center; }
.legacy-skin.is-authenticated .market-index,
.legacy-skin.is-authenticated .market-group-heading p,
.legacy-skin.is-authenticated .market-badge { display: none; }
.legacy-skin.is-authenticated .market-group-heading h4 { color: #70321f; font-size: 17px; }
.legacy-skin.is-authenticated .market-option { border-color: #edb3bd; border-radius: 0; color: #70321f; background: #fff; }
.legacy-skin.is-authenticated .trend-panel { border: 1px solid #edb3bd; border-radius: 0; }
.legacy-skin.is-authenticated .trend-heading { background: #f5e3e5; }
.legacy-skin.is-authenticated .trend-heading h4 { color: #70321f; }
.legacy-skin.is-authenticated .legacy-draw-strip { position: relative; grid-template-columns: 260px 165px minmax(360px,1fr) 470px; padding-right: 190px; }
.legacy-skin.is-authenticated .legacy-draw-links { justify-content: flex-end; line-height: 1.5; }
.legacy-session { position: absolute; top: 13px; right: 16px; display: flex; align-items: center; gap: 10px; }
.legacy-session span { color: #fbe5e8; font-size: 13px; }
.legacy-session button { padding: 7px 13px; color: #fff; background: #861b34; border: 1px solid #dc8090; border-radius: 4px; cursor: pointer; }

/* Final brand pass: blue house style, with the legacy two-row quick links. */
.legacy-skin.is-authenticated .legacy-draw-strip { background: linear-gradient(#285f9f,#164579); border-bottom-color: #12375f; }
.legacy-skin.is-authenticated .legacy-logo { color: #f7d56c; }
.legacy-skin.is-authenticated .legacy-top-nav { background: #173f73; }
.legacy-skin.is-authenticated .play-tabs { background: #dce9f8; border-bottom: 1px solid #a9c5e4; }
.legacy-skin.is-authenticated .play-tab { color: #1c4c80; }
.legacy-skin.is-authenticated .play-tab.is-active { color: #fff; background: #2d6bad; }
.legacy-skin.is-authenticated .betting-topbar { background: #245a98; }
.legacy-skin.is-authenticated .member-shortcuts-heading { background: linear-gradient(#397fc1,#245a98); }
.legacy-skin.is-authenticated .shortcut-links a,
.legacy-skin.is-authenticated .shortcut-links button { color: #fff; background: #397fc1; border-color: #8db6dd; }
.legacy-skin.is-authenticated .shortcut-links a:nth-child(3n),
.legacy-skin.is-authenticated .shortcut-links button:nth-child(4n) { background: #2d6bad; }
.legacy-skin.is-authenticated .market-group-heading { background: #e1ebf7; border-color: #a9c5e4; }
.legacy-skin.is-authenticated .market-group-heading h4,
.legacy-skin.is-authenticated .trend-heading h4 { color: #214f82; }
.legacy-skin.is-authenticated .market-group,
.legacy-skin.is-authenticated .market-option,
.legacy-skin.is-authenticated .trend-panel { border-color: #b5cde6; }
.legacy-skin.is-authenticated .market-option { color: #214f82; }
.legacy-skin.is-authenticated .trend-heading { background: #e1ebf7; }
.legacy-skin.is-authenticated .legacy-draw-links { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 2px 13px; align-items: center; }
.legacy-skin.is-authenticated .legacy-draw-links a { padding: 1px 4px; text-align: center; border-right: 1px solid rgb(255 255 255 / 38%); }
.legacy-skin.is-authenticated .legacy-session button { background: #173f73; border-color: #8db6dd; }
.legacy-draw-strip { display: grid; grid-template-columns: 190px 150px minmax(260px,1fr) 320px; align-items: center; gap: 10px; min-height: 62px; padding: 8px 14px; color: #fff; background: linear-gradient(135deg,#245a9a,#163e72); }
.legacy-logo { color: #f8d66d; font-size: 24px; font-weight: 800; letter-spacing: .08em; }
.legacy-draw-title { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.legacy-draw-title span { color: #d6e6fa; font-size: 11px; }
.legacy-draw-numbers { display: flex; gap: 5px; }
.legacy-draw-numbers i { display: grid; place-items: center; width: 25px; height: 25px; color: #18365e; background: #eef5ff; border-radius: 3px; font-style: normal; font-weight: 800; }
.legacy-draw-numbers i:nth-child(3n) { background: #ffe17e; }
.legacy-draw-numbers i:nth-child(4n) { background: #ff9e70; }
.legacy-draw-links { display: flex; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.legacy-draw-links a { color: #fff; font-size: 12px; text-decoration: none; }
@media (max-width: 920px) { .legacy-draw-strip { grid-template-columns: 1fr 1fr; } .legacy-draw-links { justify-content: flex-start; } }

/* Final blue console pass.  This keeps the old betting-terminal hierarchy
   while leaving the game catalog as the extension point for later lotteries. */
.legacy-skin.is-authenticated {
  --console-blue-950: #12365f;
  --console-blue-900: #164778;
  --console-blue-800: #1e5d96;
  --console-blue-700: #2d75b7;
  --console-line: #c3d5e8;
  --console-bg: #edf4fb;
  background: var(--console-bg);
  color: #263b55;
  font-size: 13px;
}

.legacy-skin.is-authenticated .dashboard {
  width: 100%;
  max-width: none;
  margin: 0;
}

.legacy-skin.is-authenticated .legacy-draw-strip {
  position: relative;
  min-height: 92px;
  grid-template-columns: 150px 150px minmax(310px, 1fr);
  gap: 14px;
  padding: 10px 180px 10px max(18px, calc((100% - 1480px) / 2));
  background: linear-gradient(115deg, var(--console-blue-950), var(--console-blue-800));
  border-bottom: 3px solid #f1c85b;
}

.legacy-skin.is-authenticated .legacy-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffdc76;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 23px;
  letter-spacing: .04em;
  text-shadow: 0 2px 8px rgb(0 0 0 / 18%);
}
.legacy-skin.is-authenticated .legacy-logo img { width: 132px; height: auto; display: block; }
.legacy-skin.is-authenticated .legacy-logo span { display: none; }

.legacy-skin.is-authenticated .legacy-draw-title strong { font-size: 16px; }
.legacy-skin.is-authenticated .legacy-draw-title span { color: #d9ebff; }
.legacy-skin.is-authenticated .legacy-draw-numbers { gap: 6px; }
.legacy-skin.is-authenticated .legacy-draw-numbers i {
  width: 31px;
  height: 31px;
  color: var(--console-blue-950);
  background: #f7fbff;
  border: 2px solid rgb(255 255 255 / 38%);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgb(0 0 0 / 12%);
}
.legacy-skin.is-authenticated .legacy-draw-numbers i:nth-child(3n) { background: #ffdc76; }
.legacy-skin.is-authenticated .legacy-draw-numbers i:nth-child(4n) { background: #ffad78; }
.legacy-skin.is-authenticated .legacy-draw-links { gap: 2px 8px; }
.legacy-skin.is-authenticated .legacy-draw-links a {
  padding: 3px 7px;
  color: #f4f9ff;
  border-right: 1px solid rgb(255 255 255 / 20%);
  transition: background .15s ease;
}
.legacy-skin.is-authenticated .legacy-draw-links a:hover { background: rgb(255 255 255 / 12%); }

/* The legacy header owns these links. Keep only one copy and place it under
   the logo/title area instead of rendering a second middle navigation row. */
.legacy-skin.is-authenticated .legacy-draw-links {
  position: absolute;
  left: max(18px, calc((100% - 1480px) / 2));
  bottom: 7px;
  width: min(660px, calc(100% - 36px));
  justify-content: flex-start;
}
.legacy-skin.is-authenticated .legacy-top-nav { display: none; }

/* The issue, close time and result time already live in the top draw bar. */
.legacy-skin.is-authenticated .betting-topbar { display: none; }

.legacy-skin.is-authenticated .legacy-session { top: 50%; right: 18px; bottom: auto; transform: translateY(-50%); }
.legacy-skin.is-authenticated .legacy-session button {
  padding: 3px 9px;
  color: #dceeff;
  background: rgb(10 40 75 / 40%);
  border-color: rgb(255 255 255 / 35%);
  font-size: 11px;
}

.legacy-skin.is-authenticated .legacy-top-nav {
  display: flex;
  padding: 0 max(18px, calc((100% - 1480px) / 2));
  background: #f8fbff;
  border: 0;
  border-bottom: 1px solid var(--console-line);
  box-shadow: 0 2px 8px rgb(30 74 118 / 7%);
}
.legacy-skin.is-authenticated .legacy-top-nav a {
  flex: 0 0 auto;
  min-width: 104px;
  padding: 9px 14px;
  color: var(--console-blue-900);
  border-right: 1px solid #dbe7f3;
  font-size: 12px;
}
.legacy-skin.is-authenticated .legacy-top-nav a:hover { color: #fff; background: var(--console-blue-700); }
.legacy-skin.is-authenticated .legacy-top-nav a:first-child:not(.is-active) { background: transparent; color: var(--console-blue-900); }
.legacy-skin.is-authenticated .legacy-top-nav a.is-active { background: #d87588; color: #5d1727; }
.legacy-skin.is-authenticated #dashboard-view.member-panel-open > :not(.legacy-draw-strip):not(.legacy-live-info):not(.games-section):not(#dashboard-message):not(.mobile-appbar):not(.mobile-balance-strip):not(.mobile-detail-tabs):not(.mobile-section-hero) { display: none !important; }
.legacy-skin.is-authenticated .member-panel { max-width: 1480px; margin: 0 auto; width: 100%; min-height: 70vh; background: #fff; }
.legacy-skin.is-authenticated .member-panel[hidden] { display: none; }
.member-panel iframe { display: block; width: 100%; height: calc(100vh - 210px); min-height: 600px; border: 0; background: #fff; }

.legacy-skin.is-authenticated .games-section {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: var(--console-bg);
}
.legacy-skin.is-authenticated .games-shell {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.legacy-skin.is-authenticated #game-detail {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
  padding: 0 max(18px, calc((100% - 1480px) / 2)) 26px;
  border: 0;
  background: transparent;
}
.legacy-skin.is-authenticated .game-detail-header {
  min-height: 52px;
  margin: 0;
  padding: 9px 16px;
  color: #fff;
  background: linear-gradient(100deg, var(--console-blue-800), var(--console-blue-700));
  border-radius: 0 0 4px 4px;
}
.legacy-skin.is-authenticated .game-detail-header h3 { font-size: 18px; }
.legacy-skin.is-authenticated .game-emblem {
  width: 38px;
  height: 38px;
  color: var(--console-blue-950);
  background: #ffdb70;
  border: 0;
  border-radius: 7px;
}

.legacy-skin.is-authenticated .draw-stage {
  order: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  padding: 8px 0;
  background: transparent;
}
.legacy-skin.is-authenticated .draw-stage .current-period,
.legacy-skin.is-authenticated .draw-stage .recent-results {
  min-height: 0;
  padding: 10px 14px;
  color: #2c4866;
  background: #fff;
  border: 1px solid var(--console-line);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgb(29 74 118 / 6%);
}
.legacy-skin.is-authenticated .draw-stage .period-heading { min-height: 28px; }
.legacy-skin.is-authenticated .draw-stage .period-heading h4,
.legacy-skin.is-authenticated .draw-stage .results-heading h4 { color: var(--console-blue-900); font-size: 14px; }
.legacy-skin.is-authenticated .draw-stage .period-kicker { color: #7e9cba; }
.legacy-skin.is-authenticated .draw-stage .period-code { margin-top: 7px; color: var(--console-blue-800); font-size: 21px; }
.legacy-skin.is-authenticated .draw-stage .period-facts { margin-top: 7px; }
.legacy-skin.is-authenticated .draw-stage .result-list { max-height: 82px; }
.legacy-skin.is-authenticated .draw-stage .result-item { padding: 5px 0; border-color: #e5eef7; }

.legacy-skin.is-authenticated .game-catalog {
  order: 2;
  display: block;
  padding: 0;
  background: #fff;
  border: 1px solid var(--console-line);
  border-radius: 4px;
}
.legacy-skin.is-authenticated .catalog-heading {
  min-height: 35px;
  padding: 0 12px;
  color: var(--console-blue-900);
  background: #e4eef8;
  border-bottom: 1px solid var(--console-line);
}
.legacy-skin.is-authenticated .catalog-heading strong { color: var(--console-blue-900); }
.legacy-skin.is-authenticated .catalog-heading span { color: #6688a8; }
.legacy-skin.is-authenticated .game-list {
  display: flex;
  gap: 5px;
  padding: 6px;
  overflow-x: auto;
}
.legacy-skin.is-authenticated .game-option {
  flex: 0 0 150px;
  min-height: 42px;
  padding: 5px 8px;
  grid-template-columns: 29px minmax(0, 1fr) auto;
  gap: 7px;
  border: 1px solid #dbe7f3;
  border-radius: 4px;
}
.legacy-skin.is-authenticated .game-option.is-active { border-color: var(--console-blue-700); box-shadow: inset 0 -2px var(--console-blue-700); }
.legacy-skin.is-authenticated .game-option-icon { width: 29px; height: 29px; border-radius: 4px; font-size: 10px; }
.legacy-skin.is-authenticated .game-option-copy strong { font-size: 12px; }

.legacy-skin.is-authenticated #betting-console {
  order: 0;
  width: 100%;
  margin: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--console-line);
  border-radius: 4px;
  box-shadow: 0 3px 12px rgb(29 74 118 / 8%);
}
.legacy-skin.is-authenticated .play-tabs {
  padding: 0;
  background: #e2edf8;
  border-bottom: 1px solid #b8cfe6;
}
.legacy-skin.is-authenticated .play-tab {
  min-width: 120px;
  min-height: 43px;
  padding: 0 18px;
  color: #35658e;
  border-right: 1px solid #c6d9eb;
  font-size: 13px;
}
.legacy-skin.is-authenticated .play-tab.is-active {
  color: #fff;
  background: var(--console-blue-700);
  box-shadow: inset 0 -3px #f5cd60;
}
.legacy-skin.is-authenticated .betting-topbar {
  min-height: 51px;
  padding: 8px 15px;
  color: #fff;
  background: linear-gradient(100deg, var(--console-blue-900), var(--console-blue-800));
}
.legacy-skin.is-authenticated .betting-topbar h3 { color: #fff; font-size: 16px; }
.legacy-skin.is-authenticated .bet-period-summary dd { color: #ffdb70; }
.legacy-skin.is-authenticated .market-message { margin: 8px 12px 0; }
.legacy-skin.is-authenticated .bet-workspace {
  grid-template-columns: 190px minmax(0, 1fr) 220px;
  gap: 9px;
  padding: 9px;
  background: #f8fbfe;
}
.legacy-skin.is-authenticated .member-shortcuts,
.legacy-skin.is-authenticated .trend-panel,
.legacy-skin.is-authenticated .market-group { border-color: var(--console-line); border-radius: 4px; box-shadow: 0 2px 7px rgb(29 74 118 / 6%); }
.legacy-skin.is-authenticated .member-shortcuts { background: #fff; }
.legacy-skin.is-authenticated .member-shortcuts-heading { background: linear-gradient(120deg, var(--console-blue-800), var(--console-blue-700)); }
.legacy-skin.is-authenticated .shortcut-links { grid-template-columns: 1fr 1fr; gap: 3px; padding: 4px; }
.legacy-skin.is-authenticated .shortcut-links a,
.legacy-skin.is-authenticated .shortcut-links button { min-height: 34px; padding: 5px 4px; color: var(--console-blue-900); background: #f3f8fd; border: 1px solid #dbe7f3; border-radius: 3px; font-size: 11px; }
.legacy-skin.is-authenticated .shortcut-links a:hover { color: #fff; background: var(--console-blue-700); }
.legacy-skin.is-authenticated .shortcut-links button:disabled { opacity: .58; }
.legacy-skin.is-authenticated .market-board { gap: 8px; }
.legacy-skin.is-authenticated .market-group-heading { min-height: 42px; padding: 7px 10px; background: #e7f0fa; border-bottom: 1px solid var(--console-line); }
.legacy-skin.is-authenticated .market-group-heading h4 { color: var(--console-blue-900); font-size: 14px; }
.legacy-skin.is-authenticated .market-group-heading p { color: #7290ad; }
.legacy-skin.is-authenticated .market-index { width: 25px; height: 25px; background: #ffda70; }
.legacy-skin.is-authenticated .market-option { min-height: 38px; color: #3d5873; border-color: #dbe7f3; border-radius: 2px; }
.legacy-skin.is-authenticated .market-option:hover { background: #eef7ff; }
.legacy-skin.is-authenticated .market-option.is-selected { color: #fff; background: var(--console-blue-700); border-color: var(--console-blue-800); }
.legacy-skin.is-authenticated .trend-heading { min-height: 47px; padding: 8px 10px; background: var(--console-blue-900); }
.legacy-skin.is-authenticated .trend-panel { background: #fff; }
.legacy-skin.is-authenticated .trend-heading h4 { color: #fff; }
.legacy-skin.is-authenticated .long-streak-list { min-height: 150px; }
.legacy-skin.is-authenticated .bet-slip { border-top-color: var(--console-blue-700); background: #fff; }
.legacy-skin.is-authenticated .bet-submit { background: linear-gradient(#3b8cca, #1c5b99); border-color: #174d83; }

@media (max-width: 980px) {
  .legacy-skin.is-authenticated .legacy-draw-strip { grid-template-columns: 1fr 1fr; padding: 9px 130px 9px 12px; }
  .legacy-skin.is-authenticated .legacy-draw-numbers { grid-column: 1 / -1; }
  .legacy-skin.is-authenticated .legacy-draw-links { grid-column: 1 / -1; justify-content: flex-start; }
  .legacy-skin.is-authenticated .legacy-top-nav { overflow-x: auto; }
  .legacy-skin.is-authenticated #game-detail { padding-inline: 8px; }
  .legacy-skin.is-authenticated .bet-workspace { grid-template-columns: 160px minmax(430px, 1fr) 180px; overflow-x: auto; }
}

@media (max-width: 700px) {
  .legacy-skin.is-authenticated .legacy-draw-strip { display: block; }
  .legacy-skin.is-authenticated .legacy-draw-title,
  .legacy-skin.is-authenticated .legacy-draw-links,
  .legacy-skin.is-authenticated .legacy-session { margin-top: 6px; }
  .legacy-skin.is-authenticated .legacy-session { position: static; }
  .legacy-skin.is-authenticated .legacy-session { transform: none; }
  .legacy-skin.is-authenticated .draw-stage { grid-template-columns: 1fr; }
  .legacy-skin.is-authenticated .bet-workspace { grid-template-columns: 150px minmax(380px, 1fr) 170px; }
}

.legacy-bet-tools {
  min-height: 55px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #31547a;
  background: #fff;
  border-bottom: 1px solid #c3d5e8;
}
.preset-toggle { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; }
.preset-toggle input { width: 16px; height: 16px; accent-color: #2d75b7; }
.preset-amount { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; }
.preset-amount input {
  width: 108px;
  height: 34px;
  padding: 4px 9px;
  color: #263b55;
  background: #fff;
  border: 1px solid #b5c8dc;
  border-radius: 2px;
  font-size: 16px;
}
.preset-amount input:focus { outline: 2px solid rgb(45 117 183 / 25%); border-color: #2d75b7; }
.preset-action {
  min-width: 82px;
  height: 34px;
  padding: 0 18px;
  color: #fff;
  background: linear-gradient(#4389c9, #2463a4);
  border: 1px solid #1b548e;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}
.preset-action:hover { filter: brightness(1.08); }
.trend-action {
  min-height: 34px;
  padding: 7px 12px;
  color: #fff;
  background: #ff7540;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 700;
}
.preset-help { color: #879bb2; font-size: 11px; }
.market-option-cell.is-active-input { outline: 2px solid #efb42e; outline-offset: -2px; }
.market-option-cell input:focus { outline: 2px solid #2d75b7; outline-offset: -2px; }
.legacy-play-options { display: grid; gap: 5px; padding: 10px; background: #f7fbff; }
.market-subheading { display: flex; justify-content: space-between; align-items: center; margin: 8px 0 4px; padding: 5px 7px; color: #31547a; background: #edf5fc; border-left: 3px solid #2d75b7; font-size: 12px; font-weight: 700; }
.market-subheading small { color: #7d95ad; font-size: 11px; font-weight: 400; }
.market-options-sum-numbers { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.market-options-sum-numbers .market-option-cell { border: 1px solid #b8c5d2; }
.legacy-position-row { display: grid; grid-template-columns: 70px repeat(10, minmax(54px, 1fr)); gap: 3px; align-items: stretch; }
.legacy-position-row > strong { display: grid; place-items: center; color: #31547a; background: #e4eef8; border: 1px solid #c3d5e8; font-size: 12px; }
.legacy-position-row .market-option-cell { min-width: 0; display: grid; grid-template-columns: 1fr; padding: 3px; background: #fff; border: 1px solid #c3d5e8; }
.legacy-position-row .market-option-name { text-align: center; color: #31547a; font-size: 11px; }
.legacy-position-row .market-option-odds { text-align: center; color: #e24c30; font-size: 11px; }
.legacy-position-row input { width: 100%; min-width: 0; height: 25px; padding: 2px 3px; text-align: center; border: 1px solid #b5c8dc; }
.legacy-play-header { padding: 10px 12px; display: flex; justify-content: space-between; color: #31547a; background: #e4eef8; border-bottom: 1px solid #c3d5e8; }
.legacy-play-header span { color: #7d95ad; font-size: 11px; }
.pending-play > p { margin: 0; padding: 8px 12px; color: #879bb2; font-size: 11px; }

@media (max-width: 700px) {
  .market-options-sum-numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legacy-bet-tools { justify-content: flex-start; overflow-x: auto; white-space: nowrap; }
  .preset-help { display: none; }
  .legacy-position-row { grid-template-columns: 58px repeat(10, 52px); overflow-x: auto; }
}

/* One blue header: result properties beside the balls, account menu 4 × 2. */
.legacy-skin.is-authenticated .legacy-draw-strip {
  display: grid;
  grid-template-columns: 145px 125px minmax(330px, 420px) minmax(350px, 1fr);
  grid-template-rows: 38px auto;
  gap: 7px 14px;
  min-height: 120px;
  padding: 8px max(18px, calc((100% - 1480px) / 2));
}
.legacy-skin.is-authenticated .legacy-logo,
.legacy-skin.is-authenticated .legacy-draw-title { grid-row: 1 / 3; }
.legacy-skin.is-authenticated .legacy-draw-numbers { grid-column: 3; grid-row: 1; gap: 4px; align-items: center; }
.legacy-skin.is-authenticated .legacy-draw-numbers i { width: 29px; height: 29px; }
.legacy-skin.is-authenticated .legacy-draw-numbers i[hidden] { display: none !important; }
.legacy-skin.is-authenticated .legacy-game-nav {
  display: none !important;
}

/* The game switcher belongs to the betting desk, not the result header. */
.legacy-skin.is-authenticated .game-catalog {
  display: none !important;
}
.legacy-skin.is-authenticated .betting-game-nav {
  display: flex;
  align-items: stretch;
  gap: 10px;
  min-height: 52px;
  padding: 7px 10px;
  color: #fff;
  background: linear-gradient(100deg, #0b4f91, #176daf);
  border-bottom: 1px solid #073b70;
}
.legacy-skin.is-authenticated .betting-game-nav-heading {
  min-width: 108px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 10px;
  border-right: 1px solid rgb(255 255 255 / 28%);
}
.legacy-skin.is-authenticated .betting-game-nav-heading strong { font-size: 14px; letter-spacing: .04em; }
.legacy-skin.is-authenticated .betting-game-nav-heading span { margin-top: 2px; color: #bedcf5; font-size: 10px; }
.legacy-skin.is-authenticated .betting-game-list {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  list-style: none;
}
.legacy-skin.is-authenticated .betting-game-option {
  min-width: 142px;
  min-height: 36px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 12px;
  align-items: center;
  gap: 7px;
  padding: 4px 9px;
  color: #eaf5ff;
  background: rgb(255 255 255 / 10%);
  border: 1px solid rgb(255 255 255 / 30%);
  border-radius: 3px;
  text-align: left;
  cursor: pointer;
}
.legacy-skin.is-authenticated .betting-game-option:hover,
.legacy-skin.is-authenticated .betting-game-option.is-active {
  color: #153f70;
  background: #ffdc76;
  border-color: #fff0a8;
  box-shadow: inset 0 -2px #d99d20;
}
.legacy-skin.is-authenticated .betting-game-icon {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  color: #174b82;
  background: #d9edff;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 800;
}
.legacy-skin.is-authenticated .betting-game-copy { min-width: 0; display: flex; flex-direction: column; }
.legacy-skin.is-authenticated .betting-game-copy strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.legacy-skin.is-authenticated .betting-game-copy small { margin-top: 1px; opacity: .75; font-size: 9px; letter-spacing: .08em; }
.legacy-skin.is-authenticated .betting-game-arrow { opacity: .7; font-size: 18px; line-height: 1; }

@media (max-width: 700px) {
  .legacy-skin.is-authenticated .betting-game-nav { gap: 6px; padding: 6px; }
  .legacy-skin.is-authenticated .betting-game-nav-heading { min-width: 78px; padding-inline: 6px; }
  .legacy-skin.is-authenticated .betting-game-nav-heading strong { font-size: 12px; }
  .legacy-skin.is-authenticated .betting-game-option { min-width: 125px; }
}

.legacy-skin.is-authenticated .legacy-game-nav {
  grid-column: 3; grid-row: 2; display: flex; align-items: center; gap: 8px; min-width: 0;
}
.legacy-skin.is-authenticated .legacy-game-nav strong { color: #d7eaff; font-size: 12px; white-space: nowrap; }
.legacy-skin.is-authenticated .legacy-game-nav a {
  display: inline-block; padding: 7px 14px; border: 1px solid #ffdc76; border-radius: 3px;
  color: #183f72; background: #ffdc76; font-size: 13px; font-weight: 700; text-decoration: none;
}
.legacy-skin.is-authenticated .legacy-game-nav a:hover,
.legacy-skin.is-authenticated .legacy-game-nav a:focus-visible { background: #fff0b0; outline: 2px solid #fff; outline-offset: 2px; }
.legacy-skin.is-authenticated .member-panel-open .legacy-draw-strip { position: sticky; top: 0; z-index: 30; }
.legacy-skin.is-authenticated .member-panel-open #member-panel { scroll-margin-top: 140px; }
.legacy-skin.is-authenticated .legacy-top-nav {
  grid-column: 4; grid-row: 1 / 3; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); grid-template-rows: repeat(2,34px);
  align-content: end; gap: 4px; min-width: 0; margin: 0; padding: 24px 0 0; background: transparent; border: 0; box-shadow: none;
}
.legacy-skin.is-authenticated .legacy-top-nav a { display: grid; place-items: center; min-width: 0; padding: 3px 2px; color: #e8f4ff; background: rgb(255 255 255 / 10%); border: 1px solid rgb(255 255 255 / 25%); border-radius: 3px; font-size: 12px; }
.legacy-skin.is-authenticated .legacy-top-nav a:first-child:not(.is-active) { color: #e8f4ff; background: rgb(255 255 255 / 10%); }
.legacy-skin.is-authenticated .legacy-top-nav a.is-active { color: #173f73; background: #ffdc76; }
.legacy-skin.is-authenticated .legacy-top-nav a.return-betting-tab:first-child:not(.is-active) { color: #173f73; background: #ffdc76; font-weight: 800; }
.legacy-skin.is-authenticated .legacy-top-nav .return-betting-tab:hover,
.legacy-skin.is-authenticated .legacy-top-nav .return-betting-tab:focus-visible { background: #fff0b0; outline: 2px solid #fff; }
.legacy-skin.is-authenticated .legacy-session { position: absolute; top: 5px; right: max(18px, calc((100% - 1480px) / 2)); transform: none; display: flex; gap: 8px; align-items: center; }
.legacy-betting-link { color: #fff; text-decoration: none; border: 1px solid rgb(255 255 255 / 35%); border-radius: 3px; padding: 3px 8px; }

/* Each rank stays on one compact horizontal line; narrow screens scroll the
   betting grid without moving the account or results rails. */
.legacy-skin.is-authenticated .legacy-play-options { display: block; overflow-x: auto; padding: 6px; }
.legacy-skin.is-authenticated .legacy-position-row { display: grid; grid-template-columns: 58px repeat(10,minmax(59px,1fr)); gap: 2px; min-width: 690px; margin-bottom: 4px; border: 1px solid #b9cee1; }
.legacy-skin.is-authenticated .legacy-position-row > strong { min-height: 44px; background: #dcebf8; font-size: 12px; }
.legacy-skin.is-authenticated .legacy-position-row .market-option-cell { display: grid; grid-template-columns: 18px minmax(0,1fr); grid-template-rows: 16px 21px; align-items: center; gap: 1px; min-width: 0; min-height: 40px; border: 0; border-left: 1px solid #d9e6f1; padding: 2px; }
.legacy-skin.is-authenticated .legacy-position-row .market-option-name { font-size: 12px; font-weight: 700; }
.legacy-skin.is-authenticated .legacy-position-row .market-option-odds { font-size: 11px; }
.legacy-skin.is-authenticated .legacy-position-row input { grid-column: 1 / -1; justify-self: center; width: min(45px,100%); height: 19px; padding: 1px; font-size: 10px; }
.legacy-skin.is-authenticated .ssc-market-section { margin: 0 0 7px; border: 1px solid #b9cee1; background: #fff; }
.legacy-skin.is-authenticated .ssc-market-section h4 { margin: 0; padding: 6px 9px; color: #31547a; background: #dcebf8; font-size: 12px; }
.legacy-skin.is-authenticated .ssc-market-options { display: grid; grid-template-columns: repeat(7,minmax(72px,1fr)); gap: 3px; padding: 5px; }
.legacy-skin.is-authenticated .ssc-market-section:not(.ssc-digits) .ssc-market-options { grid-template-columns: repeat(4,minmax(90px,1fr)); }
.legacy-skin.is-authenticated .ssc-digits .ssc-market-options { grid-template-columns: repeat(10,minmax(60px,1fr)); }
.legacy-skin.is-authenticated .ssc-market-options .market-option-cell { min-width: 0; display: grid; grid-template-columns: 20px 1fr; gap: 1px; align-items: center; padding: 2px 4px; border: 1px solid #d9e6f1; }
.legacy-skin.is-authenticated .ssc-market-options .market-option-cell input { grid-column: 1 / -1; width: min(50px,100%); height: 21px; justify-self: center; padding: 1px; text-align: center; font-size: 11px; }
@media (max-width: 1100px) {
  .legacy-skin.is-authenticated .legacy-draw-strip { grid-template-columns: 140px 130px minmax(330px,1fr); grid-template-rows: 38px auto auto; }
  .legacy-skin.is-authenticated .legacy-top-nav { grid-column: 1 / -1; grid-row: 3; padding: 0; }
  .legacy-skin.is-authenticated .legacy-position-row { min-width: 690px; }
}
@media (max-width: 700px) {
  .legacy-skin.is-authenticated .legacy-draw-strip { display: block; padding: 10px; }
  .legacy-skin.is-authenticated .legacy-game-nav { margin: 8px 0; }
  .legacy-skin.is-authenticated .legacy-top-nav { margin-top: 8px; grid-template-rows: repeat(2,32px); }
  .legacy-skin.is-authenticated .legacy-session { position: static; transform: none; }
  .legacy-skin.is-authenticated .legacy-position-row { min-width: 690px; }
}

/* Only the middle betting surface changes tabs; the account and streak rails stay put. */
.legacy-skin.is-authenticated .bet-workspace { grid-template-columns: 190px minmax(0,1fr) 220px; align-items: start; }
.legacy-skin.is-authenticated .betting-center { grid-column: 2; min-width: 0; display: grid; gap: 10px; }
.legacy-skin.is-authenticated .member-shortcuts { grid-column: 1; }
.legacy-skin.is-authenticated .trend-panel { grid-column: 3; }
.legacy-skin.is-authenticated .market-board[hidden],
.legacy-skin.is-authenticated .pending-play[hidden] { display: none !important; }
.legacy-skin.is-authenticated .pending-play { grid-column: auto; min-width: 0; padding: 0; background: #fff; border: 1px solid var(--console-line); }
.legacy-skin.is-authenticated .betting-center .bet-slip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--console-line); box-shadow: none; }
.legacy-skin.is-authenticated .betting-center .bet-slip-heading,
.legacy-skin.is-authenticated .betting-center .stake-help,
.legacy-skin.is-authenticated .betting-center .bet-safety-note { display: none; }
/* The legacy account/game rail remains fixed while only the middle surface changes. */
.legacy-skin.is-authenticated .betting-left-rail { grid-column: 1; display: grid; align-content: start; gap: 8px; min-width: 0; }
.legacy-skin.is-authenticated #game-detail .betting-left-rail .game-catalog { display: block; order: 0; margin: 0; }
.legacy-skin.is-authenticated .betting-left-rail .member-shortcuts { grid-column: auto; }
.legacy-skin.is-authenticated .betting-center .member-panel { max-width: none; width: 100%; min-height: 0; margin: 0; border: 1px solid var(--console-line); }
.legacy-skin.is-authenticated .betting-center .member-panel iframe { height: calc(100vh - 260px); min-height: 500px; }
.legacy-skin.is-authenticated .member-panel-open .market-board,
.legacy-skin.is-authenticated .member-panel-open .pending-play,
.legacy-skin.is-authenticated .member-panel-open .bet-slip,
.legacy-skin.is-authenticated .member-panel-open .play-tabs,
.legacy-skin.is-authenticated .member-panel-open .legacy-bet-tools { display: none !important; }
.legacy-skin.is-authenticated .pending-play {
  max-height: calc(100vh - 290px);
  min-height: 440px;
  overflow-y: auto;
  overscroll-behavior: contain;
  align-items: stretch;
  justify-content: flex-start;
  text-align: left;
}
.legacy-skin.is-authenticated .betting-center .bet-selection-list { flex: 1 0 100%; }
.legacy-skin.is-authenticated .betting-center .bet-selection-list:not([hidden]) { display: block; }
.legacy-skin.is-authenticated .betting-center .bet-totals { flex: 1 1 200px; }
.legacy-skin.is-authenticated .betting-center .bet-submit { flex: 1 1 180px; width: auto; min-width: 150px; }
.legacy-skin.is-authenticated .betting-center .bet-reset { flex: 0 0 100px; width: auto; }
@media (max-width: 980px) {
  .legacy-skin.is-authenticated .bet-workspace { grid-template-columns: 160px minmax(430px,1fr) 180px; }
}
@media (max-width: 700px) {
  .legacy-skin.is-authenticated .bet-workspace { grid-template-columns: 150px minmax(380px,1fr) 170px; }
}

.legacy-skin.is-authenticated .shortcut-balance { gap: 0; padding: 8px 10px; }
.legacy-skin.is-authenticated .shortcut-balance > div { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 4px; align-items: baseline; padding: 5px 0; border-bottom: 1px solid #dce8f3; }
.legacy-skin.is-authenticated .shortcut-balance > div:last-child { border-bottom: 0; }
.legacy-skin.is-authenticated .shortcut-balance span { font-size: 11px; white-space: nowrap; }
.legacy-skin.is-authenticated .shortcut-balance strong { min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.legacy-skin.is-authenticated #sidebar-account-name { font-size: 12px; }
.legacy-skin.is-authenticated #sidebar-available-balance { font-size: 17px; }
.legacy-skin.is-authenticated .shortcut-links .shortcut-feedback { grid-column: 1 / -1; }

/* Keep the old header clean: game selection is now shown above the betting tabs. */
.legacy-skin.is-authenticated .legacy-game-nav { display: none !important; }
.legacy-skin.is-authenticated .game-catalog { display: none !important; }
.hk6-market-section .ssc-market-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(86px,1fr));gap:6px}.hk6-number-grid .ssc-market-options{grid-template-columns:repeat(7,minmax(0,1fr))}.hk6-market-section{border-color:#9fc8e6}.hk6-market-section h4{color:#175b8d}
.hk6-market-section summary{cursor:pointer;padding:6px 9px;color:#175b8d;background:#dcebf8;font-size:12px;font-weight:700;list-style-position:inside}.hk6-market-section details[open] summary{border-bottom:1px solid #9fc8e6}
.hk6-combo-nav,.hk6-combo-market-nav{display:flex;flex-wrap:wrap;gap:6px;padding:8px;background:#e6f1fa;border:1px solid #bfd4e6}.hk6-combo-nav{margin:8px 0}.hk6-combo-tab,.hk6-combo-market{border:1px solid #9dbbd4;background:#fff;color:#275477;border-radius:4px;padding:7px 13px;cursor:pointer;font-weight:700}.hk6-combo-tab.is-active,.hk6-combo-market.is-active{background:#22669e;color:#fff;border-color:#22669e}.hk6-combo-section h4{margin:0;padding:10px 12px;font-size:15px}.hk6-combo-note{margin:6px 12px 12px;color:#52708a}.hk6-combo-choices{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:6px;padding:10px 12px}.hk6-combo-zodiac{grid-template-columns:repeat(6,minmax(0,1fr))}.hk6-combo-choice{min-height:32px;border:1px solid #b5cde0;border-radius:4px;background:#fff;color:#234b6d;cursor:pointer;font-weight:700}.hk6-combo-choice[aria-pressed="true"]{background:#ffe39d;border-color:#dbad38;color:#4a3713}.hk6-combo-choice:disabled{opacity:.48;cursor:not-allowed}.hk6-combo-controls{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:12px;border-top:1px solid #d9e7f2}.hk6-combo-controls input{width:130px;height:36px;padding:6px 9px;border:1px solid #a9c1d6;border-radius:4px}.hk6-combo-add{min-height:36px}.hk6-combo-section{margin-top:8px}@media(max-width:850px){.hk6-combo-choices{grid-template-columns:repeat(7,minmax(0,1fr))}.hk6-combo-zodiac{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(max-width:520px){.hk6-combo-choices{grid-template-columns:repeat(5,minmax(0,1fr))}.hk6-combo-zodiac{grid-template-columns:repeat(3,minmax(0,1fr))}}
.pc28-market-section{border-color:#9fc8e6}
.pc28-market-section h4{color:#175b8d}
.legacy-skin.is-authenticated .pc28-sum-grid .ssc-market-options{grid-template-columns:repeat(7,minmax(0,1fr))}
.result-ball.is-special,.result-ball.is-total{box-shadow:0 0 0 2px #f2b94b;background:#ffe5a3;color:#68440c}
.member-limit-panel{margin:10px 0;border:1px solid #bcd4e8;border-radius:8px;background:#f7fbff;color:#214967}.member-limit-panel summary{cursor:pointer;padding:10px 14px;font-weight:700}.member-limit-panel p{margin:0;padding:0 14px 8px;color:#647e94;font-size:12px}.member-limit-scroll{max-height:320px;overflow:auto}.member-limit-panel table{width:100%;min-width:620px;border-collapse:collapse;font-size:12px}.member-limit-panel th,.member-limit-panel td{padding:7px 10px;border-top:1px solid #dbe8f2;text-align:center;white-space:nowrap}.member-limit-panel th{position:sticky;top:0;background:#eaf3fa}.member-limit-panel td:first-child,.member-limit-panel th:first-child{text-align:left}
.referral-preview{display:block;min-height:18px;margin-top:5px;color:#71859a;font-size:12px;line-height:1.45}
.referral-preview.is-success{color:#177a58}
.referral-preview.is-error{color:#b24747}
