:root {
  color-scheme: light;
  --bg: #fbf7fb;
  --ink: #17211d;
  --muted: #6d6270;
  --line: #e4d6e5;
  --panel: #ffffff;
  --soft: #f6eef6;
  --accent: #8b1b83;
  --accent-dark: #64105f;
  --accent-soft: #f4e3f2;
  --ticket: #fff5c8;
  --warning: #fff8df;
  --shadow: 0 24px 70px rgba(18, 36, 28, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Arial, Helvetica, sans-serif;
}

body.home-body {
  min-height: 100vh;
  background:
    linear-gradient(180deg, #f1e1ef 0 330px, var(--bg) 330px 100%);
}

body.report-body {
  min-height: 100vh;
  background:
    linear-gradient(180deg, #f1e1ef 0 280px, var(--bg) 280px 100%);
}

.commerce-shell,
.shell,
.report-shell,
.status-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.commerce-shell {
  padding: 22px 0 54px;
}

.report-shell,
.status-shell {
  padding: 22px 0 56px;
}

.shell {
  padding: 32px 0 56px;
}

.report {
  width: min(980px, calc(100% - 32px));
}

.commerce-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
  margin-bottom: 44px;
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
  margin-bottom: 30px;
}

.report-status {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #d7bfd8;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 700;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.brand-copy strong,
.brand-copy small {
  display: block;
}

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

.brand-domain {
  margin-top: 1px;
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 800;
}

.brand-logo {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
}

.header-note {
  color: var(--muted);
  font-size: 14px;
}

.commerce-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 42px;
  align-items: start;
}

.offer-column {
  padding-top: 22px;
}

.hero-panel {
  max-width: 710px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 36px rgba(68, 31, 68, 0.07);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 720px;
  margin: 0;
  font-size: 44px;
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

p {
  line-height: 1.5;
}

.hero-text {
  max-width: 640px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.value-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.value-strip span {
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid #dac6dc;
  border-radius: 999px;
  background: #fff;
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 700;
}

.delivery-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 18px;
  align-items: center;
  max-width: 710px;
  margin-top: 34px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff 0%, #fff9f0 100%);
  box-shadow: 0 12px 36px rgba(68, 31, 68, 0.07);
}

.delivery-preview strong {
  display: block;
  margin-bottom: 6px;
}

.delivery-preview p {
  margin: 0;
  color: var(--muted);
}

.mini-ticket {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 10px;
  border: 1px solid #eadb99;
  border-radius: 8px;
  background: var(--ticket);
}

.mini-ticket span {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 1;
  border: 1px solid #c986bf;
  border-radius: 4px;
  background: #fffaf0;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
}

.result-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 710px;
  margin-top: 16px;
}

.result-board {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff 0%, #fff9f0 100%);
  box-shadow: 0 12px 36px rgba(68, 31, 68, 0.07);
}

.result-board-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.result-board-head strong {
  color: var(--accent-dark);
  font-size: 14px;
}

.result-board-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.latest-draw-card,
.performance-card {
  padding: 14px;
  border: 1px solid #e4d6e5;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.result-label {
  display: block;
  margin-bottom: 5px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.result-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.result-card-head h2 {
  font-size: 20px;
}

.result-card-head > span {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid #d7bfd8;
  border-radius: 999px;
  color: var(--accent-dark);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
}

.performance-lead {
  margin: -2px 0 12px;
  color: #4e4051;
  font-size: 14px;
}

.draw-numbers {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  padding: 12px;
  border: 1px solid #eadb99;
  border-radius: 8px;
  background: var(--ticket);
}

.draw-numbers span {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 34px;
  border: 1px solid #c986bf;
  border-radius: 4px;
  background: #fffaf0;
  color: var(--accent-dark);
  font-family: Consolas, "Courier New", monospace;
  font-weight: 700;
}

.hit-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.hit-grid div {
  min-width: 0;
  padding: 12px 6px;
  border: 1px solid #d7bfd8;
  border-radius: 8px;
  background: linear-gradient(180deg, #fdf8fd 0%, #fff 100%);
  text-align: center;
}

.hit-grid strong,
.hit-grid span {
  display: block;
}

.hit-grid strong {
  color: var(--accent-dark);
  font-size: 26px;
  line-height: 1;
}

.hit-grid span {
  margin-top: 5px;
  color: #4e4051;
  font-size: 12px;
  font-weight: 700;
}

.result-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.checkout-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.report-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 30px;
}

.report-intro-panel,
.report-summary-card,
.status-card,
.report-panel,
.report-warning {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.report-intro-panel,
.report-summary-card {
  padding: 18px;
  box-shadow: var(--shadow);
}

.report-intro-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.report-intro-panel h1 {
  font-size: 32px;
  line-height: 1.12;
}

.report-intro-panel .hero-text {
  margin-top: 12px;
  font-size: 15px;
}

.report-summary-card p,
.status-list p {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.report-summary-card p:last-child,
.status-list p:last-child {
  border-bottom: 0;
}

.report-summary-card span,
.status-list span {
  color: var(--muted);
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.ticket-section {
  margin-bottom: 24px;
}

.section-lead {
  margin-bottom: 14px;
}

.section-lead h2 {
  font-size: 26px;
}

.ticket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.ticket-card {
  overflow: hidden;
  border: 1px solid #d7bfd8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(68, 31, 68, 0.08);
}

.ticket-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--accent);
  color: #fff;
}

.ticket-head span {
  color: #f4dff2;
  font-size: 13px;
}

.ticket-numbers {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 16px;
  background: var(--ticket);
}

.ticket-numbers span {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 34px;
  border: 1px solid #c986bf;
  border-radius: 4px;
  background: #fffaf0;
  color: var(--accent-dark);
  font-family: Consolas, "Courier New", monospace;
  font-weight: 700;
}

.ticket-notes {
  padding: 13px 16px 0;
}

.ticket-notes p {
  margin: 0 0 8px;
  color: #4e4051;
}

.ticket-balance {
  margin: 0;
  padding: 12px 16px 14px;
  color: var(--muted);
  font-size: 13px;
}

.report-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.report-panel {
  padding: 18px;
}

.report-panel p,
.report-panel li {
  color: #4e4051;
}

.report-panel ol {
  margin: 12px 0;
  padding-left: 20px;
}

.report-warning {
  padding: 18px;
  background: var(--warning);
  border-color: #e2c875;
}

.status-shell {
  max-width: 720px;
}

.status-card {
  padding: 28px;
  box-shadow: var(--shadow);
}

.status-list {
  margin: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.primary-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 48px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.primary-link:hover {
  background: var(--accent-dark);
}

.inline-link {
  width: auto;
  min-width: 150px;
  padding: 0 18px;
}

.status-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.secondary-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: #fff;
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 700;
}

.secondary-link:hover {
  background: var(--accent-soft);
}

.checkout-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.summary-label {
  margin: 0 0 6px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.live-price {
  color: var(--accent-dark);
  white-space: nowrap;
  font-size: 26px;
}

fieldset {
  min-width: 0;
  margin: 0 0 20px;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 10px;
  color: #263830;
  font-weight: 700;
}

.segmented {
  display: grid;
  gap: 10px;
}

.segmented.two {
  grid-template-columns: 1fr 1fr;
}

.segmented.three {
  grid-template-columns: repeat(3, 1fr);
}

.segmented label {
  position: relative;
  display: block;
  min-height: 86px;
  margin: 0;
  cursor: pointer;
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented label > span {
  display: block;
  height: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.segmented input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(139, 27, 131, 0.13);
}

.segmented strong,
.segmented small,
.segmented em {
  display: block;
}

.segmented strong {
  font-size: 15px;
}

.segmented small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.segmented em {
  width: fit-content;
  margin-bottom: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.field-block {
  margin: -4px 0 20px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fdf8fd;
}

.number-picker {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.number-picker label {
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
}

.number-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.number-picker span {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.number-picker input:checked + span {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(139, 27, 131, 0.13);
}

.field-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.compact-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

label {
  color: #25342e;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 44px;
  margin-top: 7px;
  padding: 10px 11px;
  border: 1px solid #bbc9c2;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

input:focus,
select:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(139, 27, 131, 0.14);
}

.checkout-total {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.checkout-total span {
  color: var(--muted);
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.check input {
  flex: 0 0 auto;
  width: auto;
  min-height: 0;
  margin-top: 2px;
}

button {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 6px;
  padding: 13px 16px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

button:hover {
  background: var(--accent-dark);
}

.notice,
.small {
  color: var(--muted);
  font-size: 13px;
}

[hidden] {
  display: none !important;
}

.intro {
  margin-bottom: 20px;
}

.panel,
.game-card {
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.numbers {
  color: var(--accent-dark);
  font-family: Consolas, "Courier New", monospace;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
}

.warning {
  background: var(--warning);
  border-color: #e0c16a;
}

@media (max-width: 980px) {
  .commerce-hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .offer-column {
    padding-top: 0;
  }

  .checkout-card {
    max-width: 620px;
  }

  .report-hero,
  .report-info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .commerce-shell,
  .shell,
  .report-shell,
  .status-shell {
    width: min(100% - 24px, 1120px);
  }

  .commerce-header,
  .report-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 26px;
  }

  h1 {
    font-size: 31px;
  }

  .hero-text {
    font-size: 16px;
  }

  .delivery-preview,
  .segmented.two,
  .segmented.three {
    grid-template-columns: 1fr;
  }

  .number-picker {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .checkout-card {
    padding: 18px;
  }

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

  .status-actions {
    grid-template-columns: 1fr;
  }

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

@media print {
  body {
    background: white;
  }

  .shell,
  .commerce-shell,
  .report-shell,
  .status-shell {
    width: 100%;
    padding: 0;
  }

  .panel,
  .game-card {
    break-inside: avoid;
  }
}
