:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f7fb;
  color: #172033;
}

* {
  box-sizing: border-box;
}

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

button,
input {
  font: inherit;
}

.shell {
  width: min(960px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.eyebrow {
  margin: 0 0 4px;
  color: #53627d;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.45rem, 3.6vw, 2.45rem);
  line-height: 1.08;
}

h2 {
  font-size: 1.45rem;
  line-height: 1.2;
}

.badge {
  min-width: 88px;
  padding: 8px 12px;
  border: 1px solid #c9d4e5;
  border-radius: 8px;
  background: #ffffff;
  text-align: center;
  font-weight: 700;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.panel {
  width: min(560px, 100%);
  padding: 24px;
  border: 1px solid #d7dfeb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(42, 57, 86, 0.08);
}

.intro {
  min-height: 300px;
  display: grid;
  align-content: center;
}

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

.form-divider {
  padding-top: 12px;
  border-top: 1px solid #d7dfeb;
  color: #53627d;
  font-size: 0.9rem;
  font-weight: 800;
}

.inline-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
}

label {
  display: grid;
  gap: 8px;
  color: #384860;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #b9c6d8;
  border-radius: 6px;
  padding: 10px 12px;
  color: #172033;
  background: #ffffff;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 800;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.primary {
  background: #1864ab;
  color: #ffffff;
}

.secondary {
  border: 1px solid #b9c6d8;
  background: #ffffff;
  color: #172033;
}

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

.game-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid #d7dfeb;
  border-radius: 8px;
  background: #f9fbfe;
}

.game-card h3 {
  margin: 0;
}

.game-number {
  margin-bottom: 0;
  color: #53627d;
  font-size: 0.88rem;
  font-weight: 800;
}

.game-tags {
  margin-bottom: 0;
  color: #0b7285;
  font-size: 0.9rem;
  font-weight: 900;
}

.game-purchase-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.game-entitlement {
  margin-bottom: 0;
  color: #384860;
  font-weight: 800;
}

.game-panel {
  display: grid;
  gap: 20px;
}

.game-status {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.game-status > div {
  padding: 16px;
  border-radius: 8px;
  background: #edf7f3;
}

.label {
  display: block;
  color: #53627d;
  font-size: 0.86rem;
  font-weight: 700;
}

.game-status strong {
  display: block;
  font-size: 2rem;
}

.click-target {
  width: 100%;
  aspect-ratio: 1 / 0.42;
  background: #0b7285;
  color: #ffffff;
  font-size: 1.5rem;
}

.result-score {
  font-size: 2rem;
  font-weight: 900;
}

.order-status {
  padding: 12px;
  border-radius: 6px;
  background: #edf7f3;
  color: #172033;
  font-weight: 800;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.lobby-actions {
  margin-bottom: 16px;
}

@media (max-width: 560px) {
  .inline-action {
    grid-template-columns: 1fr;
  }
}

.message {
  min-height: 24px;
  margin: 18px 0 0;
  color: #9c2f2f;
  font-weight: 700;
}

@media (max-width: 640px) {
  .shell {
    width: min(100vw - 20px, 960px);
    padding: 20px 0;
  }

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

  .topnav {
    margin-left: 0;
  }

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

  .panel {
    padding: 18px;
  }
}


.site-footer {
  padding: 24px 16px 32px;
  text-align: center;
  color: #667085;
  font-size: 13px;
}

.footer-brand {
  margin-bottom: 10px;
  color: #475467;
  font-weight: 800;
  text-align: center;
}

.beian-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.beian-links a {
  color: #667085;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.beian-links a:hover {
  color: #344054;
  text-decoration: underline;
}

.beian-icon {
  width: 16px;
  height: 16px;
}
