:root {
  color: #e5e7eb;
  background: #0f172a;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  color: #0f172a;
  background: #facc15;
  font-weight: 800;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

button.secondary {
  color: #e5e7eb;
  background: #334155;
}

button.ghost {
  width: 100%;
  margin-top: 18px;
  color: #cbd5e1;
  background: transparent;
  border: 1px solid #334155;
}

.hidden {
  display: none !important;
}

.app-shell {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 20px;
}

.hero {
  padding: 28px 0 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #facc15;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(2.4rem, 12vw, 4.8rem);
  line-height: 0.95;
}

h2 {
  margin-bottom: 18px;
  font-size: 1.2rem;
}

.hero p {
  max-width: 680px;
  color: #cbd5e1;
  font-size: 1.05rem;
  line-height: 1.6;
}

.panel,
.status-card,
.summary-card {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.panel {
  margin: 16px 0;
  padding: 20px;
}

.login-card {
  display: grid;
  gap: 14px;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border: 1px solid #334155;
  border-radius: 999px;
  padding: 7px 12px;
  color: #facc15;
  background: #111827;
  font-size: 0.82rem;
  font-weight: 800;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  color: #cbd5e1;
  font-size: 0.9rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 0 14px;
  color: #f8fafc;
  background: #111827;
  outline: none;
}

input:focus,
select:focus {
  border-color: #facc15;
}

.summary-card {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 16px;
  color: #cbd5e1;
}

.summary-card strong {
  color: #facc15;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.round-card {
  display: grid;
  gap: 8px;
  border: 1px solid #334155;
  border-radius: 18px;
  padding: 16px;
  background: #020617;
}

.round-card p {
  margin: 0;
  color: #cbd5e1;
}

.strategy-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.strategy-list article {
  display: grid;
  gap: 4px;
  border: 1px solid #334155;
  border-radius: 18px;
  padding: 14px;
  background: #111827;
}

.strategy-list article.active {
  border-color: #facc15;
}

.strategy-list span,
.ticket-card span,
.muted {
  color: #94a3b8;
}

.action-bar {
  position: sticky;
  bottom: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0), #0f172a 28%);
}

.status-card {
  padding: 16px;
}

.status-card p {
  margin: 6px 0 0;
  color: #cbd5e1;
}

.ticket-list {
  display: grid;
  gap: 10px;
}

.ticket-list.compact {
  margin-top: 14px;
}

.ticket-card {
  display: grid;
  gap: 8px;
  border: 1px solid #334155;
  border-radius: 18px;
  padding: 14px;
  background: #020617;
}

.ticket-card div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ticket-card strong {
  color: #f8fafc;
  font-size: 1.12rem;
  letter-spacing: 0.08em;
}

.ticket-card p {
  margin: 0;
  color: #cbd5e1;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.stats-grid article {
  display: grid;
  gap: 5px;
  border-radius: 18px;
  padding: 14px;
  background: #111827;
}

.stats-grid span {
  color: #94a3b8;
  font-size: 0.8rem;
}

.stats-grid strong {
  color: #facc15;
  font-size: 1.1rem;
}

#actionGuide ol {
  margin: 10px 0 0;
  padding-left: 20px;
  color: #cbd5e1;
}

#actionGuide li {
  margin-bottom: 8px;
  line-height: 1.5;
}

#actionGuide li strong {
  color: #facc15;
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.workflow-step {
  display: grid;
  gap: 6px;
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 10px 8px;
  background: #111827;
  text-align: center;
}

.workflow-step span {
  color: #94a3b8;
  font-size: 0.72rem;
  line-height: 1.3;
}

.workflow-step.done {
  border-color: #166534;
  background: rgba(22, 101, 52, 0.18);
}

.workflow-step.current {
  border-color: #facc15;
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.25);
}

.workflow-step.done span,
.workflow-step.current span {
  color: #e2e8f0;
}

.sync-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.sync-row label {
  display: grid;
  gap: 6px;
  min-width: 160px;
  color: #cbd5e1;
  font-size: 0.9rem;
}

.sync-row select {
  min-height: 48px;
  border: 1px solid #334155;
  border-radius: 999px;
  padding: 0 16px;
  color: #e5e7eb;
  background: #111827;
}

.bankroll-panel {
  display: grid;
  gap: 12px;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid #334155;
  border-radius: 18px;
  background: #111827;
}

.bankroll-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
  gap: 8px;
  align-items: end;
  min-height: 140px;
  padding-top: 8px;
}

.bankroll-bar {
  display: grid;
  gap: 6px;
  justify-items: center;
}

.bankroll-bar-column {
  width: 100%;
  max-width: 36px;
  min-height: 4px;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #facc15, #ca8a04);
}

.bankroll-bar-column.expected {
  opacity: 0.35;
  background: linear-gradient(180deg, #94a3b8, #64748b);
}

.bankroll-bar small {
  color: #94a3b8;
  font-size: 0.65rem;
  text-align: center;
  line-height: 1.2;
}

.bankroll-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  color: #cbd5e1;
  font-size: 0.92rem;
}

.section-note {
  margin: 0 0 12px;
}

.rules-list {
  margin: 0 0 12px;
  padding-left: 20px;
  color: #cbd5e1;
}

.rules-list li {
  margin-bottom: 8px;
  line-height: 1.45;
}

.ticket-card.hit-jackpot {
  border-color: #facc15;
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.35);
}

.game-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.game-tabs .tab {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  color: #e5e7eb;
  background: #334155;
  font-weight: 700;
}

.game-tabs .tab.active {
  color: #0f172a;
  background: #facc15;
}

.nav-links a {
  color: #facc15;
}

@media (max-width: 720px) {
  .app-shell {
    padding: 16px;
  }

  .grid,
  .action-bar,
  .stats-grid,
  .button-row,
  .workflow-steps {
    grid-template-columns: 1fr;
  }

  .button-row,
  .top-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .panel {
    padding: 16px;
  }
}
