:root {
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: #111;
  background: #eee;
  --orange: #f36b05;
  --red: #e50012;
  --line: #b7b7b7;
  --cell: #cfcfcf;
  --head: #b7b7b7;
  --muted: #777;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #f1eeee;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  padding: 8px 10px;
  outline: 0;
  background: #fff;
  color: #222;
}

.auth-page,
.portal-page,
.public-results-page,
.support-page,
.member-app,
.admin-app {
  display: none;
}

.auth-page.is-visible,
.portal-page.is-visible,
.public-results-page.is-visible,
.support-page.is-visible,
.member-app.is-visible,
.admin-app.is-visible {
  display: block;
}

.portal-page,
.public-results-page,
.support-page {
  min-height: 100vh;
  background: #0d1014;
  color: #f8fafc;
}

.portal-page {
  background: #d8c6a5;
  color: #30291f;
}

.portal-header {
  position: relative;
  z-index: 5;
  border-bottom: 1px solid #bda77e;
  background: #eee2cb;
}

.portal-header-main {
  position: relative;
  display: flex;
  width: min(1180px, calc(100% - 40px));
  min-height: 150px;
  align-items: center;
  justify-content: flex-end;
  margin: 0 auto;
}

.portal-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 150px;
  height: 150px;
  place-items: center;
  overflow: hidden;
  border: 0;
  background: transparent;
  transform: translate(-50%, -50%);
}

.portal-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.portal-auth-actions {
  display: flex;
  gap: 10px;
}

.portal-auth-actions button,
.portal-section-title button,
.portal-wallet-actions button {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 7px 18px;
}

.portal-login,
.portal-member {
  background: #f8fafc;
  color: #15181f;
}

.portal-register,
.portal-wallet-actions button {
  border-color: #c9552b !important;
  background: #d96632;
  color: #fff;
}

.portal-nav {
  display: flex;
  min-height: 52px;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
}

.portal-nav button {
  display: inline-flex;
  min-width: 126px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #393126;
  font-weight: 700;
}

.portal-nav button:hover,
.portal-nav button:focus-visible {
  border-color: #8b6828;
  color: #76551d;
}

.portal-nav b {
  font-weight: inherit;
}

.portal-main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 64px;
}

.portal-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.25fr) minmax(280px, 0.85fr);
  gap: 24px;
}

.portal-carousel {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  background: #12161b;
}

.portal-carousel::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(6, 8, 12, 0.72), transparent 58%);
  content: "";
}

.portal-carousel img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  opacity: 0;
  transition: opacity 360ms ease;
}

.portal-carousel img.is-visible { opacity: 1; }

.portal-slide-copy {
  position: absolute;
  bottom: 52px;
  left: 42px;
  z-index: 1;
  display: grid;
  max-width: 390px;
  gap: 8px;
}

.portal-slide-copy span {
  color: #ebca7b;
  font-size: 13px;
}

.portal-slide-copy strong {
  overflow-wrap: anywhere;
  color: #fff;
  font-size: 34px;
}

.portal-slide-copy p {
  margin: 0;
  color: #e1e5ea;
}

.portal-dots {
  position: absolute;
  bottom: 18px;
  left: 42px;
  z-index: 2;
  display: flex;
  gap: 8px;
}

.portal-dots button {
  width: 20px;
  height: 3px;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.42);
}

.portal-dots button.active {
  background: #e5b85a;
}

.portal-account {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 15px;
  min-height: 360px;
  border: 1px solid #c7b48f;
  border-top: 2px solid #c9a663;
  background: #f5ecdc;
  padding: 24px;
}

.portal-avatar {
  position: relative;
  width: 84px;
  height: 84px;
  border: 4px solid #7b8796;
  border-radius: 50%;
}

.portal-avatar::before {
  position: absolute;
  top: 14px;
  left: 50%;
  width: 23px;
  height: 23px;
  transform: translateX(-50%);
  border: 3px solid #7b8796;
  border-radius: 50%;
  content: "";
}

.portal-avatar::after {
  position: absolute;
  right: 13px;
  bottom: 12px;
  left: 13px;
  height: 25px;
  border: 3px solid #7b8796;
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  content: "";
}

.portal-account p {
  margin: 0;
  color: #675c4b;
}

.portal-account p strong {
  color: #30291f;
}

.portal-account-total {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.portal-account-total span,
.portal-account-stats span {
  color: #8a6a2e;
  font-size: 12px;
}

.portal-account-total strong {
  color: #30291f;
  font-size: 24px;
}

.portal-account-stats {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid #cdbb99;
  border-bottom: 1px solid #cdbb99;
}

.portal-account-stats div {
  display: grid;
  gap: 5px;
  padding: 13px 8px;
  text-align: center;
}

.portal-account-stats div + div {
  border-left: 1px solid #cdbb99;
}

.portal-wallet-actions {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.portal-games-section {
  padding-top: 44px;
}

.portal-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.portal-section-title span {
  font-size: 20px;
  font-weight: 700;
}

.portal-section-title button {
  background: transparent;
  color: #77571f;
}

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

.portal-game-card {
  display: grid;
  min-width: 0;
  min-height: 160px;
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr) 46%;
  border: 1px solid #c7b48f;
  border-radius: 6px;
  padding: 0;
  background: #f5ecdc;
  color: #30291f;
  text-align: left;
}

.portal-game-card > span {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 9px;
  padding: 20px;
}

.portal-game-card strong {
  overflow-wrap: anywhere;
  font-size: 17px;
}

.portal-game-card em {
  color: #675c4b;
  font-size: 11px;
  font-style: normal;
  line-height: 1.5;
}

.portal-game-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portal-game-card:hover {
  border-color: #9d7938;
  background: #fbf5ea;
  transform: translateY(-2px);
}

.portal-footer {
  display: grid;
  gap: 20px;
  border-top: 1px solid #bda77e;
  padding: 34px max(20px, calc((100% - 1180px) / 2));
  background: #eee2cb;
  color: #675c4b;
}

.portal-footer p {
  margin: 0;
  border-top: 1px solid #cdbb99;
  padding-top: 20px;
  font-size: 12px;
  line-height: 1.75;
}

.footer-languages { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 0; }
.footer-languages button { border: 0; padding: 4px 2px; background: transparent; color: #4f473d; }
.footer-languages button:hover, .footer-languages button.active { color: #77571f; }
.footer-languages span { color: #9a896c; }
.portal-legal-text { color: #675c4b; font-size: 13px !important; }

.results-header {
  display: grid;
  min-height: 62px;
  align-items: center;
  grid-template-columns: 72px 1fr 96px;
  border-bottom: 1px solid rgba(212, 169, 79, 0.28);
  padding: 0 max(12px, calc((100% - 1180px) / 2));
  background: #080c12;
}

.results-header strong {
  text-align: center;
}

.results-header button {
  min-height: 38px;
  border: 0;
  background: transparent;
  color: #f3d99a;
}

.results-header button:first-child {
  font-size: 32px;
}

.results-main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 38px 0 82px;
}

.results-intro span {
  color: #e1bd69;
  font-size: 13px;
}

.results-intro h1 {
  margin: 8px 0;
  font-size: 30px;
}

.results-intro p {
  margin: 0;
  color: #aeb7c4;
}

.public-results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.public-result-card {
  overflow: hidden;
  border: 1px solid #303949;
  border-radius: 6px;
  background: #f5f6f8;
  color: #12151a;
}

.public-result-card > header {
  display: grid;
  align-items: center;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  min-height: 72px;
  background: #111927;
  color: #fff;
}

.public-result-card header img {
  width: 92px;
  height: 72px;
  object-fit: cover;
}

.public-result-card header div {
  display: grid;
  gap: 4px;
}

.public-result-card header span {
  color: #d8bd72;
  font-size: 11px;
}

.public-result-row {
  display: grid;
  min-height: 56px;
  align-items: center;
  grid-template-columns: 94px minmax(0, 1fr) 120px;
  gap: 8px;
  border-top: 1px solid #d9dde3;
  padding: 8px 12px;
}

.public-result-row > span {
  color: #df1326;
  font-size: 12px;
}

.public-result-row .balls {
  flex-wrap: wrap;
}

.public-result-row .ball {
  width: 24px;
  height: 24px;
  font-size: 11px;
}

.public-result-row time {
  color: #737b87;
  font-size: 10px;
  text-align: right;
}

.empty-results {
  margin: 0;
  padding: 26px;
  color: #777;
}

.support-page {
  min-height: 100vh;
  background: #eef1f5;
  color: #20242c;
}

.support-header {
  display: grid;
  min-height: 58px;
  align-items: center;
  grid-template-columns: 74px 1fr 90px;
  border-bottom: 1px solid rgba(212, 169, 79, 0.32);
  padding: 0 max(10px, calc((100% - 920px) / 2));
  background: #080c12;
  color: #fff;
}

.support-header button {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: #f1d48d;
  font-size: 32px;
}

.support-header strong {
  text-align: center;
}

.support-header > span {
  color: #d8bd72;
  font-size: 12px;
  text-align: right;
}

.support-main {
  width: min(920px, 100%);
  min-height: calc(100vh - 58px);
  margin: 0 auto;
  padding: 18px;
}

.support-chat-shell {
  display: grid;
  height: calc(100vh - 94px);
  min-height: 520px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #d6dae0;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(21, 28, 39, 0.1);
}

.support-agent {
  display: flex;
  min-height: 70px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #e3e6eb;
  padding: 10px 18px;
  background: #fff;
}

.support-agent-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #17243a;
  color: #f0d48f;
  font-weight: 700;
}

.support-agent div {
  display: grid;
  gap: 5px;
}

.support-agent small {
  color: #7a828e;
}

.support-agent small i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-radius: 50%;
  background: #18a66a;
}

.support-messages {
  display: flex;
  overflow-y: auto;
  flex-direction: column;
  gap: 15px;
  padding: 22px;
  background: #f3f5f8;
}

.support-message {
  display: flex;
  max-width: 76%;
  flex-direction: column;
  gap: 5px;
}

.support-message-agent {
  align-self: flex-start;
  align-items: flex-start;
}

.support-message-player {
  align-self: flex-end;
  align-items: flex-end;
}

.support-bubble {
  border-radius: 4px 12px 12px 12px;
  padding: 11px 14px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(20, 29, 42, 0.09);
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.support-message-player .support-bubble {
  border-radius: 12px 4px 12px 12px;
  background: #d96632;
  color: #fff;
}

.support-message time {
  color: #9299a4;
  font-size: 10px;
}

.support-composer {
  display: grid;
  align-items: end;
  grid-template-columns: minmax(0, 1fr) 84px;
  gap: 10px;
  border-top: 1px solid #dde1e6;
  padding: 13px;
  background: #fff;
}

.support-composer textarea {
  width: 100%;
  min-height: 44px;
  max-height: 110px;
  resize: vertical;
  border: 1px solid #cfd4db;
  border-radius: 4px;
  padding: 11px 12px;
  font: inherit;
  outline: 0;
}

.support-composer textarea:focus {
  border-color: #c9552b;
}

.support-composer button {
  min-height: 44px;
  border: 0;
  border-radius: 4px;
  background: #d96632;
  color: #fff;
  font-weight: 700;
}

.phone-page {
  width: min(750px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  background: #f4f4f4;
}

.mobile-title {
  display: grid;
  height: 38px;
  align-items: center;
  grid-template-columns: 42px 1fr auto;
  padding: 0 4px;
  background:
    radial-gradient(circle at 58% 0%, rgba(54, 125, 255, 0.66), transparent 24%),
    radial-gradient(circle at 68% 20%, rgba(255, 255, 255, 0.3), transparent 2px),
    linear-gradient(90deg, #060b17, #101629 52%, #070712);
  color: #fff;
}

.mobile-title strong {
  text-align: center;
  font-size: 16px;
}

.title-icons {
  display: flex;
  gap: 2px;
}

.icon-btn {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 28px;
  line-height: 1;
}

.title-icons .icon-btn {
  font-size: 20px;
}

.view {
  display: none;
}

.view.is-visible {
  display: block;
}

.auth-phone {
  background:
    linear-gradient(rgba(15, 20, 36, 0.76), rgba(15, 20, 36, 0.9)),
    radial-gradient(circle at 50% 0, rgba(255, 210, 88, 0.32), transparent 45%),
    #0a1020;
  color: #fff;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.auth-tabs button {
  min-height: 46px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #ddd;
  font-weight: 700;
}

.auth-tabs button.is-active {
  border-color: var(--orange);
  color: #ffd37a;
}

.auth-form {
  display: none;
  gap: 10px;
  padding: 0 24px 28px;
}

.auth-form.is-visible {
  display: grid;
}

.input-row {
  display: grid;
  align-items: center;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  min-height: 48px;
  border-radius: 5px;
  background: #fff;
  padding: 0 10px;
}

.input-row input {
  border: 0;
  background: transparent;
}

.captcha-row {
  grid-template-columns: 28px minmax(0, 1fr) 72px;
}

.captcha-row b {
  color: #333;
  letter-spacing: 3px;
}

.agree-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ddd;
  font-size: 13px;
}

.agree-row input {
  width: 18px;
  min-height: 18px;
}

.field-tip,
.muted {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.orange-btn,
.plain-btn {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 8px 14px;
  font-weight: 700;
}

.orange-btn {
  border: 1px solid #d34200;
  background: var(--orange);
  color: #fff;
}

.plain-btn {
  border: 1px solid #bbb;
  background: #fff;
  color: #222;
}

.plain-btn:disabled,
.orange-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.full {
  width: 100%;
}

.small {
  min-height: 30px;
  padding: 4px 8px;
  font-size: 12px;
}

.home-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px;
  background: #fff;
}

.home-top div {
  display: grid;
  gap: 4px;
  border: 1px solid #eee;
  border-radius: 4px;
  padding: 10px;
}

.home-top span {
  color: #888;
  font-size: 12px;
}

.home-top strong {
  color: var(--red);
  font-size: 18px;
}

.home-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  padding: 8px;
  background: #fff;
}

.home-actions button,
.game-card {
  border: 0;
  background: #fff;
  color: #333;
}

.home-actions button {
  min-height: 50px;
}

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

.game-card {
  display: grid;
  min-height: 82px;
  align-content: center;
  gap: 5px;
  border-left: 4px solid var(--orange);
  padding: 12px;
  text-align: left;
}

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

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

.game-card em {
  color: #777;
  font-size: 12px;
  font-style: normal;
}

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

.room-card {
  display: grid;
  height: 171px;
  overflow: hidden;
  border: 0;
  border-radius: 2px;
  padding: 0;
  background: #fff;
  text-align: left;
}

.room-card p {
  height: 21px;
  margin: 0;
  padding: 3px 8px;
  background: #fff;
  color: #777;
  font-size: 12px;
}

.room-art {
  position: relative;
  height: 150px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 45%),
    linear-gradient(135deg, #d96bf5, #e94cd0);
}

.room-card.rose .room-art {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 45%),
    linear-gradient(135deg, #ff78b8, #f05b6b);
}

.room-card.lime .room-art {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 45%),
    linear-gradient(135deg, #d3e222, #a4d749);
}

.room-card.purple .room-art {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 45%),
    linear-gradient(135deg, #f597f4, #c62fea);
}

.room-art::after {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 96% 28%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 98% 34%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 95% 38%, #fff 0 2px, transparent 3px);
  content: "";
  opacity: 0.85;
}

.crown {
  position: absolute;
  left: 140px;
  top: 20px;
  width: 170px;
  height: 78px;
  transform: rotate(-12deg) skewX(-12deg);
  border-radius: 14px 14px 20px 20px;
  background: linear-gradient(#ffdf63, #f07a00 65%, #d64d00);
  box-shadow: 0 10px 0 #ffb21a inset, 0 4px 16px rgba(0, 0, 0, 0.2);
}

.crown::before {
  position: absolute;
  left: 18px;
  top: -36px;
  width: 128px;
  height: 52px;
  background:
    radial-gradient(circle at 10% 95%, #ffc327 0 8px, transparent 9px),
    radial-gradient(circle at 28% 80%, #ffc327 0 8px, transparent 9px),
    radial-gradient(circle at 48% 55%, #ffc327 0 9px, transparent 10px),
    radial-gradient(circle at 68% 78%, #ffc327 0 8px, transparent 9px),
    radial-gradient(circle at 88% 94%, #ffc327 0 8px, transparent 9px);
  content: "";
}

.lottery-ball {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff, #ff70b8 35%, #e1006d 72%);
  color: #111;
  font-weight: 900;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

.lottery-ball::before {
  position: absolute;
  width: 36%;
  height: 36%;
  border-radius: 50%;
  background: #fff;
  content: "";
  z-index: 0;
}

.lottery-ball {
  z-index: 1;
}

.b1 {
  left: 52px;
  top: 70px;
  width: 64px;
  height: 64px;
  font-size: 30px;
}

.b2 {
  left: 26px;
  top: 52px;
  width: 42px;
  height: 42px;
  background: radial-gradient(circle at 32% 28%, #fff, #7931d9 38%, #491187 72%);
}

.coin {
  position: absolute;
  width: 42px;
  height: 15px;
  border-radius: 50%;
  background: linear-gradient(#ffe56d, #ffb300);
  box-shadow: 0 3px 0 #e68300;
}

.c1 {
  left: 72px;
  top: 18px;
  transform: rotate(32deg);
}

.c2 {
  right: 80px;
  top: 44px;
  transform: rotate(-24deg);
}

.c3 {
  right: 190px;
  top: 96px;
  transform: rotate(24deg);
}

.play-view {
  padding-bottom: 78px;
}

.last-result {
  min-height: 86px;
  padding: 8px;
  background: #eee;
}

.result-line {
  display: grid;
  align-items: start;
  grid-template-columns: auto minmax(0, 1fr) 56px;
  gap: 6px;
}

.result-line > span,
.round-row > span {
  color: var(--red);
  font-size: 14px;
  white-space: nowrap;
}

.balls {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ball {
  display: inline-grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 3px;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px rgba(0, 0, 0, 0.35);
}

.ball.n1 {
  background: #ffef00;
  color: #1d1d1d;
}

.ball.n2 {
  background: #2da7ff;
}

.ball.n3 {
  background: #252525;
}

.ball.n4 {
  background: #ff8b21;
}

.ball.n5 {
  background: #18e4bf;
  color: #111;
}

.ball.n6 {
  background: #5967dc;
}

.ball.n7 {
  background: #d8e8e8;
  color: #111;
}

.ball.n8 {
  background: #ff6468;
}

.ball.n9 {
  background: #e40017;
}

.ball.n10 {
  background: #16eb37;
  color: #111;
}

.ball.lucky,
.ball.sum {
  border-radius: 50%;
  background: #ff8b21;
}

.ball.sum {
  background: #ffbf2d;
  color: #b40000;
}

.balance-mini {
  display: grid;
  place-items: center;
  color: var(--red);
  font-size: 12px;
}

.balance-mini span {
  color: #ffc400;
  font-size: 20px;
}

.result-summary {
  min-height: 22px;
  padding-top: 3px;
  color: #ff4a00;
  font-size: 13px;
}

.result-summary b {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: #ff9b20;
  color: #fff;
}

.round-row {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  background: #fff;
}

.round-row b {
  border-radius: 6px;
  padding: 3px 8px;
  background: var(--red);
  color: #fff;
  font-size: 14px;
}

.round-row em {
  color: #111;
  font-style: normal;
  font-weight: 700;
}

.round-row button {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #ff3e00;
}

.history-panel {
  display: none;
  max-height: 260px;
  overflow: auto;
  border-top: 1px solid #ddd;
  background: #fff;
}

.history-panel.is-open {
  display: grid;
}

.history-panel article {
  display: grid;
  align-items: center;
  gap: 6px;
  grid-template-columns: 90px 1fr;
  padding: 7px 8px;
  border-bottom: 1px solid #eee;
  font-size: 12px;
}

.history-panel em {
  grid-column: 2;
  color: #ff4a00;
  font-style: normal;
}

.bet-table-wrap {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
  background: #c6c6c6;
}

.play-tabs {
  display: grid;
  align-content: start;
}

.play-tabs button {
  min-height: 51px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #c6c6c6;
  color: #555;
  font-size: 30px;
}

.play-tabs button.is-active {
  background: #df5d00;
  color: #fff;
  font-weight: 700;
}

.odds-table {
  min-height: 700px;
  overflow: hidden;
}

.odds-table h3 {
  height: 31px;
  margin: 0;
  display: grid;
  place-items: center;
  background: var(--head);
  color: var(--red);
  font-size: 16px;
}

.odds-row {
  display: grid;
  border-bottom: 1px solid var(--line);
}

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

.odds-row.nums {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.odds-cell {
  display: grid;
  min-height: 73px;
  place-items: center;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--cell);
  color: #111;
}

.odds-cell strong {
  font-size: 16px;
  font-weight: 500;
}

.odds-cell span {
  color: #7d858e;
  font-size: 13px;
}

.odds-cell.is-selected {
  background: #ffe2bc;
  outline: 2px solid var(--orange);
  outline-offset: -2px;
}

.odds-cell.is-locked {
  opacity: 0.55;
}

.bet-drawer {
  display: grid;
  gap: 8px;
  padding: 8px;
  background: #fff;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-head button {
  border: 0;
  background: transparent;
  color: var(--red);
}

.slip-item {
  display: grid;
  align-items: center;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) 42px 90px 30px;
  padding: 6px;
  border-bottom: 1px solid #eee;
}

.slip-item input {
  min-height: 32px;
}

.slip-item button {
  border: 0;
  background: #eee;
}

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

.chip-row button {
  min-height: 30px;
  border: 1px solid #ff8a2a;
  border-radius: 18px;
  background: #fff8ef;
  color: #e35b00;
  padding: 4px 14px;
}

.amount-row {
  display: grid;
  align-items: center;
  grid-template-columns: 42px 1fr;
  gap: 6px;
}

.slip-total {
  color: var(--red);
  font-weight: 700;
}

.back-orange {
  position: fixed;
  right: max(48px, calc((100vw - 750px) / 2 + 74px));
  bottom: 4px;
  left: max(48px, calc((100vw - 750px) / 2 + 74px));
  z-index: 10;
  height: 36px;
  border: 1px solid #f04400;
  border-radius: 20px;
  background: #ff6908;
  color: #fff;
  font-weight: 700;
}

.panel {
  display: grid;
  gap: 10px;
  margin: 8px;
  padding: 12px;
  background: #fff;
}

.panel h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

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

.record-row {
  display: grid;
  gap: 5px;
  border-bottom: 1px solid #eee;
  padding: 8px 0;
}

.record-row span,
.record-row time {
  color: #666;
  font-size: 12px;
}

.stat-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.stat-grid div {
  display: grid;
  gap: 3px;
  padding: 10px;
  background: #f6f6f6;
}

.stat-grid span {
  color: #777;
  font-size: 12px;
}

.mobile-tabbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: none;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid #ddd;
  background: #fff;
}

.mobile-tabbar button {
  display: grid;
  min-height: 50px;
  place-items: center;
  border: 0;
  background: transparent;
  color: #555;
}

.mobile-tabbar span {
  font-size: 11px;
}

.mobile-tabbar button.is-active {
  color: var(--orange);
}

dialog {
  width: min(420px, calc(100% - 28px));
  border: 0;
  padding: 0;
  background: transparent;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.dialog-card {
  position: relative;
  display: grid;
  gap: 10px;
  border-radius: 6px;
  padding: 18px;
  background: #fff;
}

.dialog-card h2,
.dialog-card p {
  margin: 0;
}

.close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  background: transparent;
  font-size: 24px;
}

.admin-app.is-visible {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 210px minmax(0, 1fr);
}

.admin-sidebar {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 16px;
  background: #172033;
  color: #fff;
}

.admin-brand {
  padding: 8px 4px 14px;
  font-size: 20px;
}

.admin-nav-group {
  margin-top: 8px;
  color: #8fa2c8;
  font-size: 12px;
}

.admin-sidebar button {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.admin-sidebar button.is-active {
  border-color: #df4b36;
  background: #bf2b21;
}

.admin-main {
  padding: 12px;
  min-width: 0;
  background: #f2f3f5;
}

.admin-login {
  width: min(430px, 100%);
  margin: 60px auto;
}

#adminContent {
  display: none;
  gap: 12px;
}

#adminContent.is-visible {
  display: grid;
}

.admin-topbar,
.admin-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-topbar {
  min-height: 54px;
  padding: 0 14px;
  border-bottom: 2px solid #bd2c21;
  background: #fff;
}

.admin-topbar div {
  display: grid;
  gap: 2px;
}

.admin-topbar span {
  color: #777;
  font-size: 12px;
}

.admin-workspace {
  min-width: 0;
}

.admin-panel {
  min-width: 0;
  background: #fff;
  border: 1px solid #dfe2e7;
}

.admin-panel-head {
  min-height: 50px;
  padding: 8px 12px;
  border-bottom: 1px solid #e1e3e8;
  flex-wrap: wrap;
}

.admin-panel-head h2 {
  margin: 0;
  font-size: 16px;
}

.admin-panel-head input,
.admin-panel-head select,
.admin-panel-head button {
  min-height: 32px;
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
}

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

.admin-data-table th,
.admin-data-table td {
  padding: 9px 10px;
  border-right: 1px solid #e4e6ea;
  border-bottom: 1px solid #e4e6ea;
  text-align: left;
}

.admin-data-table th {
  background: #f3f4f6;
  color: #444;
}

.admin-data-table tbody tr:hover {
  background: #fff8f6;
}

.admin-data-table button {
  min-height: 28px;
  border: 1px solid #c9cdd4;
  background: #fff;
  color: #333;
}

.admin-data-table button:hover:not(:disabled) {
  border-color: #bd2c21;
  color: #bd2c21;
}

.admin-actions {
  display: flex;
  gap: 5px;
}

.admin-number {
  width: 76px;
  min-height: 28px;
}

.admin-settings-form {
  display: grid;
  gap: 14px;
  max-width: 720px;
  padding: 18px;
}

.admin-settings-form label {
  display: grid;
  gap: 6px;
}

.admin-settings-form input,
.admin-settings-form select {
  min-height: 38px;
}

.admin-settings-form .admin-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-settings-form .admin-check input {
  min-height: auto;
}

.admin-stats {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, 1fr);
}

.admin-stats div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #fff;
}

.admin-table {
  display: grid;
  gap: 6px;
}

.admin-row {
  display: grid;
  align-items: center;
  gap: 7px;
  grid-template-columns: 1.1fr 0.8fr 0.8fr 0.8fr 0.8fr auto auto;
  padding: 8px;
  border: 1px solid #eee;
}

.admin-row span {
  color: #555;
  font-size: 12px;
}

.admin-row input {
  min-height: 30px;
}

@media (max-width: 780px) {
  .mobile-tabbar.is-visible {
    display: grid;
  }

  .portal-page,
  .public-results-page,
  .support-page,
  .member-app {
    padding-bottom: 50px;
  }

  .portal-header-main {
    width: calc(100% - 24px);
    min-height: 88px;
  }

  .portal-logo {
    width: 86px;
    height: 86px;
  }

  .portal-auth-actions button {
    min-height: 34px;
    padding: 5px 11px;
    font-size: 12px;
  }

  .portal-nav {
    min-height: 46px;
    gap: 0;
  }

  .portal-nav button {
    min-width: 0;
    flex: 1;
    gap: 4px;
    padding: 0 5px;
    font-size: 12px;
  }

  .portal-main {
    width: 100%;
    padding: 0 0 36px;
  }

  .portal-hero-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .portal-carousel,
  .portal-carousel img {
    min-height: 245px;
  }

  .portal-slide-copy {
    bottom: 38px;
    left: 20px;
    max-width: calc(100% - 40px);
  }

  .portal-slide-copy strong {
    font-size: 25px;
  }

  .portal-dots {
    bottom: 14px;
    left: 20px;
  }

  .portal-account {
    min-height: auto;
    grid-template-columns: 72px 1fr;
    justify-items: stretch;
    gap: 10px 16px;
    padding: 18px 20px;
  }

  .portal-avatar {
    grid-row: 1 / 3;
    width: 68px;
    height: 68px;
  }

  .portal-account > p,
  .portal-account-total {
    justify-self: stretch;
    justify-items: start;
  }

  .portal-account-total strong {
    font-size: 20px;
  }

  .portal-account-stats,
  .portal-wallet-actions {
    grid-column: 1 / -1;
  }

  .portal-games-section {
    padding: 30px 14px 0;
  }

  .portal-game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .portal-game-card {
    min-height: 184px;
    grid-template-columns: 1fr;
    grid-template-rows: 105px 1fr;
  }

  .portal-game-card > span {
    grid-row: 2;
    gap: 4px;
    padding: 12px;
  }

  .portal-game-card img {
    grid-row: 1;
  }

  .portal-game-card strong {
    font-size: 14px;
  }

  .portal-game-card em {
    font-size: 10px;
  }

  .portal-footer {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 28px 20px;
  }

  .portal-footer p {
    grid-column: auto;
  }

  .results-main {
    width: calc(100% - 24px);
    padding-top: 24px;
  }

  .public-results-grid {
    grid-template-columns: 1fr;
  }

  .public-result-row {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .public-result-row time {
    display: none;
  }

  .support-page {
    padding-bottom: 0;
  }

  .support-main {
    min-height: calc(100vh - 58px);
    padding: 0;
  }

  .support-chat-shell {
    height: calc(100vh - 58px);
    min-height: 460px;
    border: 0;
    border-radius: 0;
  }

  .support-message {
    max-width: 88%;
  }

  .phone-page {
    width: 100%;
  }

  .bet-table-wrap {
    grid-template-columns: 145px minmax(0, 1fr);
  }

  .admin-app.is-visible {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    grid-template-columns: repeat(14, max-content);
    overflow-x: auto;
  }

  .admin-nav-group,
  .admin-brand {
    display: none;
  }

  .admin-stats,
  .admin-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .portal-header-main {
    min-height: 80px;
  }

  .portal-logo {
    width: 76px;
    height: 76px;
  }

  .portal-auth-actions {
    gap: 6px;
  }

  .portal-auth-actions button {
    min-height: 32px;
    padding: 4px 8px;
    font-size: 11px;
  }

  .portal-nav button span {
    display: none;
  }

  .portal-carousel,
  .portal-carousel img {
    min-height: 220px;
  }

  .portal-slide-copy p {
    font-size: 12px;
  }

  .play-tabs button {
    font-size: 28px;
  }

  .bet-table-wrap {
    grid-template-columns: 145px minmax(0, 1fr);
  }

  .odds-row.nums {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .back-orange {
    right: 48px;
    left: 48px;
  }
}
