:root {
  color-scheme: light;
  --bg: #f6f5ef;
  --surface: #fffefa;
  --border: #dcded4;
  --text: #24392f;
  --muted: #68736a;
  --mint: #235e46;
  --soft: #e9eddf;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Arial,
    sans-serif;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
select,
input {
  touch-action: manipulation;
}
a {
  color: var(--mint);
  text-underline-offset: 4px;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.4;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #c3652c;
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
.wrap {
  width: min(1280px, calc(100% - 96px));
  margin-inline: auto;
}
.site-header {
  height: 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -1px;
  text-decoration: none;
  color: var(--text);
}
.brand-mark {
  font-size: 37px;
  color: #c65b31;
  line-height: 1;
}
.brand-light {
  font-weight: 450;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 30px;
}
.guide-link {
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
}
.language-label {
  display: flex;
  align-items: center;
  gap: 8px;
}
select {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 24px 10px 12px;
  max-width: 100%;
  min-height: 44px;
}
.language-label select {
  font-size: 13px;
  max-width: 140px;
}
.intro {
  padding: 48px 0 35px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 1.7px;
  color: #9b502e;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
}
.eyebrow span {
  height: 6px;
  width: 6px;
  background: #c86d43;
  border-radius: 50%;
}
h1 {
  font-size: clamp(34px, 4.5vw, 62px);
  font-weight: 650;
  letter-spacing: -2.4px;
  line-height: 1.2;
  margin: 0 0 20px;
  max-width: 1000px;
}
.intro-copy {
  color: var(--muted);
  margin: 0;
  font-size: 15px;
  max-width: 850px;
}
.game-picker {
  padding: 22px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(230px, 1fr) 1fr auto;
  gap: 28px;
  align-items: center;
  margin-bottom: 26px;
}
.game-field {
  display: grid;
  gap: 8px;
}
.game-field label {
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
}
.game-field select {
  font-weight: 600;
  background: var(--surface);
  width: 100%;
  font-size: 14px;
  min-height: 48px;
}
.game-formula > span {
  font-size: 23px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}
.game-formula p {
  font-size: 11px;
  line-height: 1.6;
  margin: 5px 0 0;
  max-width: 340px;
  color: var(--muted);
}
.game-odds {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 10px;
  color: var(--muted);
  text-align: right;
}
.game-odds strong {
  font-size: 15px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.game-odds a {
  font-size: 11px;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 1fr);
  gap: 36px;
  align-items: start;
}
.machine-panel {
  min-width: 0;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: radial-gradient(ellipse at 50% 40%, #fffef9 0%, #edf0e4 75%);
  border: 1px solid #e2e5d9;
}
.machine-top,
.machine-bottom {
  position: absolute;
  left: 27px;
  right: 27px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #6b7b70;
  font-size: 10px;
  letter-spacing: 1px;
  z-index: 1;
  pointer-events: none;
}
.machine-top {
  top: 24px;
  align-items: center;
}
.machine-label {
  font-weight: 650;
  color: #344d3f;
  font-size: 14px;
  letter-spacing: 0.2px;
}
.machine-tag {
  font-size: 8px;
  letter-spacing: 1.6px;
  color: #778b7d;
}
.machine-bottom {
  bottom: 23px;
  font-size: 10px;
  letter-spacing: 0.5px;
}
#scene-container {
  height: 620px;
  width: 100%;
}
#scene-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.scene-notice {
  position: absolute;
  inset: 95px 30px auto;
  text-align: center;
  pointer-events: none;
}
.scene-notice p:not([hidden]) {
  padding: 20px;
  background: #fffef8f2;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
}
.scene-notice button {
  pointer-events: auto;
}
.control-column {
  min-width: 0;
  padding: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.side-kicker {
  color: #9e704d;
  font-size: 9px;
  letter-spacing: 1.7px;
  margin-bottom: 25px;
}
.draw-panel {
  padding: 0 0 26px;
  border-bottom: 1px solid var(--border);
}
.section-label {
  font-size: 10px;
  letter-spacing: 0.6px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.status-dot {
  width: 6px;
  height: 6px;
  background: var(--mint);
  border-radius: 50%;
}
h2 {
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.5px;
  line-height: 1.4;
  margin: 0 0 12px;
}
#draw-status {
  min-height: 62px;
  font-size: 25px;
  letter-spacing: -0.8px;
}
.progress-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
}
#progress-count {
  font-weight: 600;
  color: var(--mint);
  font-variant-numeric: tabular-nums;
}
progress {
  width: 100%;
  height: 3px;
  border: 0;
  border-radius: 5px;
  display: block;
  margin: 12px 0 23px;
  background: #dce3d5;
}
progress::-webkit-progress-bar {
  background: #dce3d5;
  border-radius: 5px;
}
progress::-webkit-progress-value {
  background: var(--mint);
  border-radius: 5px;
}
progress::-moz-progress-bar {
  background: var(--mint);
}
.button {
  border-radius: 7px;
  border: 1px solid var(--border);
  padding: 11px 16px;
  min-height: 44px;
  color: var(--text);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  transition:
    background 0.15s,
    border-color 0.15s;
  overflow-wrap: anywhere;
}
.button:not(:disabled):hover {
  background: #e9eddf;
  border-color: #a9b9a6;
}
.button.primary {
  width: 100%;
  background: var(--mint);
  color: #fff;
  border-color: var(--mint);
  font-size: 15px;
  padding: 15px 20px;
  display: flex;
  justify-content: center;
  gap: 20px;
}
.button.primary:not(:disabled):hover {
  background: #174b36;
}
.secondary-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 5px;
}
.subtle {
  color: #526457;
  border-color: transparent;
}
.tiny {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.75;
  margin: 8px 0 0;
}
.result-panel {
  padding: 25px 0 12px;
}
.result-panel h2 {
  margin-bottom: 3px;
}
.result-panel > .section-label {
  display: none;
}
.pool-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  margin: 18px 0 0;
}
.number-row {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin: 10px 0 18px;
}
.number-ball {
  height: 44px;
  width: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #26362e;
  font-weight: 750;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 -2px 0 #00000008;
}
.empty-ball {
  background: #eaece2;
  color: #a0a99d;
  box-shadow: none;
}
.color-0 {
  background: #f1c568;
}
.color-1 {
  background: #a8ccee;
}
.color-2 {
  background: #efb4a8;
}
.color-3 {
  background: #cdc9de;
}
.color-4 {
  background: #b6d1b3;
}
.extra-ball {
  background: #c26542;
  color: #fff;
  box-shadow: 0 0 0 4px #f5e6df;
}
.copy-button {
  width: 100%;
  background: var(--surface);
  color: var(--mint);
  border-color: #c8d0c1;
  display: flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
}
.complete .copy-button {
  background: #e3ead8;
  border-color: #b6c7a8;
}
.settings {
  padding: 16px 0;
}
.settings summary {
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  min-height: 32px;
}
.settings-content {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  font-size: 12px;
}
.checkbox {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  min-height: 44px;
}
.checkbox input {
  accent-color: var(--mint);
  width: 18px;
  height: 18px;
}
.feedback {
  color: var(--mint);
  font-size: 14px;
  margin: 12px 0;
  min-height: 24px;
}
.manual-copy {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 16px 0;
}
.manual-copy label {
  display: block;
}
textarea {
  width: 100%;
  margin-top: 10px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  resize: vertical;
}
.history-section {
  padding: 28px 0 44px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.section-heading h2 {
  margin-bottom: 0;
}
.history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex-shrink: 0;
}
.empty-history {
  padding: 25px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 0;
}
.history-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fffefa80;
  min-width: 0;
}
.history-item > div {
  min-width: 0;
}
.history-item time {
  font-size: 10px;
  color: var(--muted);
}
.history-numbers {
  font-size: 14px;
  margin: 5px 0 0;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.history-item .button {
  flex-shrink: 0;
  font-size: 11px;
}
.guide-section {
  padding: 56px 0;
}
.guide-section > h2,
.faq-section > h2 {
  font-size: 28px;
  margin-bottom: 28px;
}
.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}
.article-number {
  font-size: 12px;
  color: #aa6340;
}
h3 {
  font-size: 16px;
  margin: 12px 0;
}
article p,
.faq-section p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.95;
  margin: 0;
}
article p + p {
  margin-top: 10px;
}
.faq-section {
  max-width: 850px;
  margin-bottom: 56px;
}
.faq-section details {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.faq-section summary {
  cursor: pointer;
  font-size: 14px;
  padding: 4px 0;
  min-height: 36px;
}
.faq-section details p {
  margin-top: 14px;
}
.about-section {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 50px;
  padding: 36px 0;
  border-top: 1px solid var(--border);
}
.about-section h2 {
  font-size: 16px;
}
.about-section a {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px;
}
.about-section p {
  font-size: 12px;
}
footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 22px 0;
}
footer nav a {
  color: var(--muted);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.footer-bottom a {
  color: var(--muted);
}
.warning {
  color: #98532c;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 20;
  padding: 10px;
  background: var(--bg);
}
.skip-link:focus {
  top: 10px;
}
@media (max-width: 1100px) {
  .wrap {
    width: calc(100% - 56px);
  }
  .workspace {
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, 1fr);
    gap: 26px;
  }
  .number-ball {
    height: 39px;
    width: 39px;
    flex-basis: 39px;
  }
  .number-row {
    gap: 8px;
  }
  .game-picker {
    gap: 20px;
    grid-template-columns: 1.1fr 1fr;
  }
  .game-odds {
    grid-column: 1/-1;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    text-align: left;
  }
  .game-formula > span {
    font-size: 20px;
  }
  .history-list {
    grid-template-columns: 1fr;
  }
  .machine-tag {
    display: none;
  }
}
@media (max-width: 720px) {
  .wrap {
    width: calc(100% - 36px);
  }
  .site-header {
    height: 76px;
  }
  .guide-link {
    display: none;
  }
  .header-actions {
    gap: 10px;
  }
  .brand {
    font-size: 21px;
    gap: 8px;
  }
  .brand-mark {
    font-size: 30px;
  }
  .intro {
    padding: 32px 0 27px;
  }
  .eyebrow {
    font-size: 9px;
    letter-spacing: 0.7px;
    line-height: 1.8;
    margin-bottom: 13px;
  }
  h1 {
    font-size: 36px;
    letter-spacing: -1.5px;
  }
  .intro-copy {
    font-size: 13px;
  }
  .game-picker {
    grid-template-columns: 1fr;
    gap: 13px;
    padding: 18px 0;
    margin-bottom: 18px;
  }
  .game-formula {
    display: flex;
    align-items: center;
    gap: 18px;
  }
  .game-formula > span {
    font-size: 18px;
    flex-shrink: 0;
  }
  .game-formula p {
    font-size: 10px;
    margin: 0;
  }
  .game-odds {
    gap: 10px;
    flex-wrap: wrap;
  }
  .game-odds strong {
    font-size: 13px;
  }
  .workspace {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  #scene-container {
    height: 400px;
  }
  .machine-top {
    left: 18px;
    right: 18px;
    top: 18px;
  }
  .machine-bottom {
    left: 18px;
    right: 18px;
    bottom: 16px;
    font-size: 9px;
  }
  .machine-label {
    font-size: 12px;
  }
  .control-column {
    padding: 0;
  }
  .side-kicker {
    margin-bottom: 16px;
    font-size: 8px;
  }
  .draw-panel {
    padding-bottom: 20px;
  }
  #draw-status {
    min-height: 0;
    font-size: 23px;
    margin-bottom: 18px;
  }
  .result-panel {
    padding-top: 22px;
  }
  .number-row {
    gap: 12px;
  }
  .number-ball {
    height: 43px;
    width: 43px;
    flex-basis: 43px;
  }
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .history-actions {
    margin-left: -12px;
  }
  .history-item {
    padding: 14px;
    gap: 4px;
  }
  .history-numbers {
    font-size: 12px;
  }
  .history-item .button {
    padding: 9px;
    font-size: 11px;
  }
  .guide-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .guide-section {
    padding: 40px 0;
  }
  .guide-section > h2,
  .faq-section > h2 {
    font-size: 23px;
  }
  .about-section {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .scene-notice {
    inset: 80px 20px auto;
  }
  .scene-notice p:not([hidden]) {
    font-size: 12px;
  }
  .language-label select {
    max-width: 120px;
  }
}
@media (max-width: 380px) {
  .wrap {
    width: calc(100% - 28px);
  }
  .number-row {
    gap: 8px;
  }
  .number-ball {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }
  #scene-container {
    height: 350px;
  }
  .history-item {
    flex-wrap: wrap;
  }
  .language-label {
    gap: 4px;
  }
  .language-label select {
    max-width: 110px;
  }
  .brand {
    font-size: 18px;
  }
  h1 {
    font-size: 32px;
  }
  .game-formula {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
.batch-picker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  font-size: 12px;
}
.batch-picker select {
  margin-left: auto;
  min-width: 85px;
}
.batch-picker > span {
  font-variant-numeric: tabular-nums;
  font-size: 11px;
}
.batch-section {
  margin: 28px 0;
  padding: 24px;
  background: #e9eddf;
  border-radius: 10px;
}
.batch-section .copy-button {
  width: auto;
}
.batch-section .history-item {
  background: var(--surface);
}
h1 {
  word-break: keep-all;
  text-wrap: balance;
}
.batch-picker label {
  min-width: 0;
}
.batch-picker select {
  flex-shrink: 0;
}
.batch-picker > span:empty {
  display: none;
}

/* Reserve space without clipping Google's responsive creative or overlaying controls. */
.guide-ad { width: 100%; margin: 3rem 0; padding: 1.5rem 0; border-block: 1px solid #d5dcd5; }
.ad-label { margin: 0 0 1rem; color: #50645a; font-size: .75rem; text-align: center; }
.guide-ad .adsbygoogle { width: 100%; min-height: 280px; }
.ad-preview { min-height: 280px; display: grid; place-items: center; padding: 1rem; background: #edf0e9; color: #50645a; text-align: center; }
