* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #faf7ee;
  color: #292c24;
  font-family: system-ui, sans-serif;
  line-height: 1.6;
}
main {
  max-width: 1120px;
  margin: auto;
  padding: 32px 24px;
}
a {
  color: inherit;
}
h1 {
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.3;
  margin: 12px 0;
}
h2 {
  font-size: 22px;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.15em;
  margin-top: 36px;
}
nav {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding: 16px 0;
  margin: 20px 0;
  border-bottom: 1px solid #d5cbb9;
}
button,
select,
input {
  font: inherit;
}
button,
select {
  min-height: 44px;
  border: 1px solid #35392d;
  border-radius: 12px;
  background: #fffdf8;
  padding: 9px 14px;
  color: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
button[aria-selected="true"],
.primary {
  background: #f5d943;
  font-weight: 700;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 3px solid #325cbb;
  outline-offset: 3px;
}
nav button {
  white-space: nowrap;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 32px;
}
form,
aside,
section:not(#generate) {
  background: #fffdf8;
  border: 1px solid #d5cbb9;
  border-radius: 20px;
  padding: 24px;
}
section[hidden] {
  display: none;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 24px 0;
}
.modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.modes label {
  border: 1px solid #d5cbb9;
  padding: 12px;
  border-radius: 12px;
}
.numbers {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin-top: 16px;
}
.numbers button {
  padding: 0;
  min-width: 0;
  border-radius: 50%;
  aspect-ratio: 1;
  min-height: 44px;
}
.numbers button[data-state="include"] {
  background: #f5d943;
  font-weight: bold;
}
.numbers button[data-state="exclude"] {
  background: #e5e1d7;
  text-decoration: line-through;
  border-style: dashed;
}
.hint {
  font-size: 13px;
  color: #696b60;
}
.filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}
.filters input,
.filters select {
  display: block;
  width: 100%;
  padding: 8px;
  min-height: 44px;
}
details {
  margin-bottom: 24px;
}
summary {
  cursor: pointer;
  min-height: 44px;
}
.actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}
.primary {
  flex: 1;
}
.result {
  border-bottom: 1px solid #d5cbb9;
  padding: 16px 0;
}
.balls {
  display: flex;
  gap: 6px;
  margin: 12px 0;
}
.ball {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f5d943;
  font-weight: bold;
}
.result button {
  font-size: 14px;
}
footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #d5cbb9;
  font-size: 13px;
  color: #696b60;
}
@media (max-width: 760px) {
  main {
    padding: 20px 12px;
  }
  .layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  form,
  aside,
  section:not(#generate) {
    padding: 16px;
  }
  .numbers {
    gap: 2px;
  }
  .modes {
    font-size: 14px;
  }
  nav {
    margin: 16px 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto;
  }
}
@media (max-width: 400px) {
  main {
    padding: 20px 8px;
  }
  form,
  aside,
  section:not(#generate) {
    padding: 12px;
  }
  .numbers {
    gap: 1px;
  }
  .modes label {
    padding: 8px;
  }
}
/* Product design pass: editorial hierarchy, compact controls, a ticket-like result. */
body {
  background: #f7f5ed;
  color: #263b32;
}
main {
  max-width: 1160px;
  padding: 28px 36px;
}
.topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  font-weight: 850;
  text-decoration: none;
  font-size: 20px;
  letter-spacing: -0.7px;
}
.brand span {
  font-weight: 400;
  color: #747d71;
  font-size: 13px;
  letter-spacing: 0;
  margin-left: 12px;
}
.preview-tag {
  font-size: 10px;
  letter-spacing: 1.4px;
  border: 1px solid #cbd0c2;
  padding: 5px 9px;
  border-radius: 5px;
}
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 44px 0 24px;
}
.eyebrow {
  margin: 0 0 16px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 2px;
  color: #687b62;
}
h1 {
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -2px;
  line-height: 1.23;
  margin: 0;
}
.intro {
  color: #717a6c;
  font-size: 15px;
  margin: 20px 0 0;
  line-height: 1.8;
}
.hero-art {
  position: relative;
  width: 270px;
  height: 190px;
  flex-shrink: 0;
}
.hero-art i {
  position: absolute;
  display: grid;
  place-items: center;
  font-size: 56px;
  font-weight: 800;
  font-style: normal;
  border-radius: 50%;
  box-shadow: inset -10px -12px 0 #00000009;
}
.hero-art i:nth-of-type(1) {
  background: #e6cb55;
  width: 114px;
  height: 114px;
  left: 20px;
  top: 6px;
  transform: rotate(-15deg);
}
.hero-art i:nth-of-type(2) {
  background: #315647;
  color: #fffef4;
  width: 90px;
  height: 90px;
  right: 23px;
  bottom: 25px;
  font-size: 36px;
  transform: rotate(12deg);
}
.hero-art small {
  position: absolute;
  bottom: 0;
  left: 22px;
  font-size: 9px;
  letter-spacing: 3px;
}
.orbit {
  position: absolute;
  width: 250px;
  height: 100px;
  border: 1px solid #c7cdba;
  border-radius: 50%;
  transform: rotate(-25deg);
  top: 45px;
  left: 0;
}
nav {
  gap: 26px;
  margin: 0 0 30px;
  padding: 0;
  border-bottom: 1px solid #d3d7ca;
}
nav button {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 16px 0;
  color: #7a8275;
  font-size: 14px;
}
nav button[aria-selected="true"] {
  background: transparent;
  color: #263b32;
  border-bottom: 3px solid #263b32;
}
.layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 32px;
  align-items: start;
}
form {
  border: 0;
  background: transparent;
  padding: 0;
}
h2 {
  font-size: 22px;
  letter-spacing: -0.7px;
  margin: 0 0 20px;
}
.step {
  font-size: 10px;
  letter-spacing: 1.8px;
  color: #778474;
  margin: 0 0 8px;
  font-weight: 700;
}
.modes {
  gap: 8px;
}
.modes label {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  background: #fffef9;
  border: 1px solid #d6d9cc;
  padding: 16px 12px;
  cursor: pointer;
}
.modes label:has(input:checked) {
  border-color: #315647;
  background: #eaf0e4;
  box-shadow: inset 0 0 0 1px #315647;
}
.modes label:has(input:disabled) {
  background: transparent;
  color: #7c8174;
  cursor: default;
}
.modes input {
  accent-color: #315647;
  margin-top: 5px;
}
.modes b {
  display: block;
  font-size: 14px;
}
.modes small {
  display: block;
  font-size: 11px;
  margin-top: 4px;
  color: #737f6e;
}
.hint {
  font-size: 12px;
}
.modes + .hint {
  margin: 10px 0 24px;
}
details {
  border-top: 1px solid #d6d9cc;
  margin: 0;
}
summary {
  padding: 16px 0;
  font-size: 14px;
  font-weight: 650;
}
.summary-note {
  float: right;
  color: #7b8376;
  font-size: 11px;
  font-weight: 400;
  padding-top: 3px;
}
fieldset {
  margin: 8px 0 20px;
}
.count-label {
  border-top: 1px solid #d6d9cc;
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}
.count-label select {
  width: 95px;
}
button,
select {
  border-color: #c6cebd;
  border-radius: 9px;
}
.actions {
  margin-top: 16px;
}
.primary {
  background: #315647;
  color: #fffef4;
  border: 0;
  min-height: 56px;
  text-align: left;
  padding: 16px 20px;
  font-size: 16px;
  box-shadow: 0 3px 0 #203d31;
}
.primary span {
  float: right;
}
.ticket {
  background: #fffef9;
  border: 1px solid #d4d8c9;
  border-radius: 16px;
  padding: 26px 28px;
  box-shadow: 0 8px 0 -3px #e6e8dc;
  min-height: 450px;
}
.ticket-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed #cbd1be;
  padding-bottom: 16px;
}
.ticket-head h2 {
  margin: 0;
}
.ticket-mark {
  font-size: 24px;
  color: #abb598;
  font-weight: 800;
  letter-spacing: -1px;
}
#status {
  font-size: 13px;
  color: #6b7766;
  margin: 18px 0;
}
.empty-result {
  text-align: center;
  padding: 48px 0 36px;
}
.empty-balls {
  display: flex;
  justify-content: center;
  gap: 7px;
}
.empty-balls i {
  font-style: normal;
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border: 1px dashed #b8c2a9;
  border-radius: 50%;
  color: #a4b297;
  background: #f5f6ed;
}
.empty-result h3 {
  font-size: 15px;
  margin-top: 24px;
}
.empty-result p {
  font-size: 13px;
  color: #7a8373;
}
.result {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px dashed #d7dccd;
  padding: 15px 0;
}
.result > strong {
  font-size: 12px;
  color: #87917d;
}
.balls {
  gap: 6px;
  margin: 0;
}
.ball {
  width: 37px;
  height: 37px;
  font-size: 15px;
  background: #e9ce62;
  color: #36402c;
}
.ball[data-band="1"] {
  background: #d5e6ee;
}
.ball[data-band="2"] {
  background: #efcfbf;
}
.ball[data-band="3"] {
  background: #e0dfd8;
}
.ball[data-band="4"] {
  background: #dce8bb;
}
.result button {
  font-size: 11px;
  padding: 7px;
  min-height: 36px;
  background: transparent;
}
.ticket > .hint {
  padding-top: 16px;
  font-size: 11px;
}
.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 46px;
  border-top: 1px solid #d3d7ca;
  padding-top: 22px;
}
.principles b {
  font-size: 12px;
}
.principles p {
  font-size: 12px;
  color: #7b8273;
  margin: 6px 0;
}
footer {
  margin-top: 28px;
  font-size: 11px;
}
.numbers button {
  font-size: 14px;
}
section:not(#generate) {
  min-height: 330px;
}
section:not(#generate) h2 {
  margin-top: 20px;
}
section:not(#generate) p {
  color: #77806e;
  font-size: 14px;
  max-width: 600px;
}
@media (max-width: 1000px) {
  .result {
    grid-template-columns: 16px 1fr;
  }
  .result button {
    grid-column: 2;
    justify-self: start;
  }
  .ball {
    width: 34px;
    height: 34px;
  }
  .ticket {
    padding: 22px;
  }
}
@media (max-width: 760px) {
  main {
    padding: 20px 16px;
  }
  .brand span {
    display: none;
  }
  .hero {
    padding: 32px 0 24px;
  }
  .hero-art {
    width: 115px;
    height: 145px;
  }
  .hero-art i:nth-of-type(1) {
    width: 65px;
    height: 65px;
    left: 0;
    top: 12px;
    font-size: 32px;
  }
  .hero-art i:nth-of-type(2) {
    width: 56px;
    height: 56px;
    right: 0;
    bottom: 20px;
    font-size: 24px;
  }
  .hero-art .orbit {
    width: 120px;
    height: 60px;
    left: 0;
    top: 40px;
  }
  .hero-art small {
    display: none;
  }
  h1 {
    font-size: 30px;
    letter-spacing: -1.5px;
  }
  .intro {
    font-size: 12px;
  }
  .layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  form {
    padding: 0;
  }
  nav {
    gap: 24px;
    margin-bottom: 24px;
  }
  nav button {
    font-size: 13px;
  }
  .ticket {
    min-height: 350px;
    padding: 20px;
  }
  .empty-result {
    padding: 25px 0;
  }
  .result {
    grid-template-columns: 16px 1fr auto;
  }
  .result button {
    grid-column: auto;
  }
  .principles {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 30px;
  }
  .principles p {
    margin: 3px 0;
  }
  .ball {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }
  .balls {
    gap: 4px;
  }
  .result {
    gap: 6px;
  }
  .numbers {
    gap: 2px;
  }
  .numbers button {
    min-height: 44px;
  }
  .preview-tag {
    font-size: 8px;
  }
  .modes label {
    padding: 14px 10px;
  }
}
@media (max-width: 380px) {
  main {
    padding: 18px 12px;
  }
  .hero-art {
    display: none;
  }
  .ticket {
    padding: 16px;
  }
  .result {
    grid-template-columns: 14px 1fr;
  }
  .result button {
    grid-column: 2;
  }
  .summary-note {
    font-size: 10px;
  }
}
/* DkunBox yellow; results-first layout and a transactional settings dialog. */
body {
  color: #2c2d25;
}
.hero {
  padding: 24px 0 20px;
}
h1 {
  font-size: clamp(28px, 3vw, 38px);
}
.hero-art i:nth-of-type(2) {
  background: #f5d943;
  color: #2c2d25;
}
.layout {
  display: block;
  max-width: 850px;
  margin: 0 auto;
}
.ticket {
  min-height: 0;
}
.primary {
  background: #f5d943;
  color: #292b23;
  box-shadow: 0 3px 0 #2d3025;
  border: 1px solid #2d3025;
  text-align: center;
}
.draw-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
}
.draw-controls strong {
  font-size: 17px;
}
.draw-controls p {
  font-size: 13px;
  margin: 6px 0;
  color: #777465;
  overflow-wrap: anywhere;
}
.draw-controls button {
  flex-shrink: 0;
}
.ticket-head {
  padding-bottom: 12px;
}
.ticket-mark {
  color: #9c8e48;
}
.ball {
  width: 64px;
  height: 64px;
  font-size: 28px;
  font-weight: 800;
}
.balls {
  gap: 12px;
}
.result {
  grid-template-columns: 20px 1fr auto;
  padding: 22px 0;
  gap: 14px;
}
.result button {
  grid-column: auto;
  font-size: 13px;
  min-height: 44px;
  padding: 9px;
}
.result > strong {
  font-size: 16px;
}
.empty-balls i {
  width: 64px;
  height: 64px;
  font-size: 26px;
  background: #faf3cd;
  border-color: #c5b975;
}
.numbers button {
  font-size: 23px;
  font-weight: 700;
}
.numbers button[data-state="include"] {
  background: #f5d943;
}
.numbers button[data-state="exclude"] {
  background: #e2ded3;
}
.principles {
  margin-top: 30px;
}
dialog {
  color: #2c2d25;
  background: #faf7ee;
  border: 1px solid #b8b09d;
  border-radius: 20px;
  width: min(600px, calc(100% - 24px));
  max-height: 88dvh;
  padding: 24px;
  overflow: auto;
}
dialog::backdrop {
  background: #25251fc0;
}
dialog form {
  padding: 0;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dialog-heading h2 {
  margin: 0;
}
.dialog-heading button {
  font-size: 20px;
}
dialog .numbers {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}
dialog .numbers button {
  min-height: 44px;
}
dialog .actions {
  position: sticky;
  bottom: -24px;
  background: #faf7ee;
  padding: 12px 0;
  margin-bottom: 0;
}
dialog .filters input {
  border: 1px solid #b8b09d;
  border-radius: 8px;
  background: #fffdf8;
}
#settings-error {
  color: #9b391d;
  font-size: 14px;
}
.hero-art {
  height: 140px;
}
.hero-art i:nth-of-type(1) {
  width: 85px;
  height: 85px;
  font-size: 40px;
}
nav button[aria-selected="true"] {
  border-bottom-color: #e0bf22;
}
dialog input {
  accent-color: #d6b800;
}
@media (max-width: 760px) {
  .hero {
    padding: 18px 0;
  }
  .hero-art {
    display: none;
  }
  .intro {
    margin-top: 12px;
  }
  .ticket {
    padding: 18px;
  }
  .ball {
    width: clamp(38px, 8.4vw, 58px);
    height: clamp(38px, 8.4vw, 58px);
    font-size: clamp(21px, 4.6vw, 27px);
  }
  .balls {
    gap: 6px;
  }
  .result {
    grid-template-columns: 16px 1fr;
    gap: 8px;
  }
  .result button {
    grid-column: 2;
    justify-self: end;
  }
  .draw-controls {
    align-items: flex-start;
  }
  .draw-controls strong {
    font-size: 15px;
  }
  .draw-controls button {
    font-size: 13px;
  }
  .empty-balls i {
    width: 38px;
    height: 38px;
    font-size: 22px;
  }
  .empty-balls {
    gap: 6px;
  }
  dialog {
    padding: 16px;
    width: calc(100% - 16px);
  }
  dialog .actions {
    bottom: -16px;
  }
  dialog .numbers {
    gap: 2px;
  }
  .numbers button {
    font-size: 22px;
  }
  .ticket > .actions {
    margin-top: 14px;
  }
  .ticket > .actions .primary {
    font-size: 18px;
  }
}
@media (max-width: 380px) {
  main {
    padding: 16px 10px;
  }
  .ticket {
    padding: 12px;
  }
  .ball {
    width: 38px;
    height: 38px;
    font-size: 22px;
  }
  .balls {
    gap: 5px;
  }
  dialog {
    padding: 12px;
  }
  dialog .numbers {
    gap: 1px;
  }
}
html:has(dialog[open]) {
  overflow: hidden;
}
dialog {
  overscroll-behavior: contain;
  touch-action: pan-y;
}
body {
  font-size: 16px;
}
.hint,
.ticket > .hint,
.draw-controls p,
#status,
.intro,
section:not(#generate) p {
  font-size: 15px;
  line-height: 1.65;
}
summary,
.count-label,
.filters label,
select,
input {
  font-size: 16px;
}
.summary-note {
  font-size: 13px;
}
.step,
.eyebrow {
  font-size: 12px;
}
.result {
  cursor: pointer;
  grid-template-columns: 24px 1fr;
  min-height: 90px;
  border-radius: 8px;
}
.result:hover {
  background: #fff5bd;
}
.result:focus-visible {
  outline: 3px solid #375bb5;
  outline-offset: 3px;
}
#result-tools {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  margin-top: 24px;
}
#result-tools[hidden],
#results[hidden] {
  display: none;
}
#result-tools p {
  font-size: 14px;
  max-width: 430px;
}
#copy-all {
  white-space: nowrap;
  font-weight: 700;
}
#copy-fallback {
  width: 100%;
  min-height: 140px;
  font-size: 16px;
}
.official-reference {
  margin-top: 30px;
}
.official-reference a {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}
.official-reference img {
  object-fit: contain;
}
.official-reference span {
  display: block;
  font-size: 13px;
  margin-top: 8px;
  color: #706d60;
}
.principles p,
footer {
  font-size: 14px;
}
@media (max-width: 760px) {
  h1 {
    font-size: 30px;
  }
  .draw-controls strong {
    font-size: 17px;
  }
  .draw-controls button {
    font-size: 15px;
  }
  .summary-note {
    font-size: 12px;
  }
  #result-tools {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .result {
    grid-template-columns: 18px 1fr;
  }
  .ticket > .actions .primary {
    font-size: 20px;
    min-height: 60px;
  }
}
/* Match the game's paper modal and neutral translucent backdrop. */
#settings-dialog{background:#fffdf7;color:#282b23;border:1px solid #282b23;border-radius:24px}
#settings-dialog::backdrop{background:#282b2380}
#settings-dialog .actions{background:#fffdf7}
#settings-dialog .dialog-heading button{background:transparent;border:0;width:48px;height:48px;padding:0;font-size:28px;color:#282b23}
#settings-dialog details,#settings-dialog .count-label{border-color:#d1c8b5}
#settings-dialog .count-label{font-weight:700;padding:20px 0 8px;gap:16px}
#count{appearance:none;-webkit-appearance:none;width:136px;min-height:50px;padding:10px 42px 10px 18px;border:1px solid #282b23;border-radius:12px;background-color:#fffdf7;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23282b23' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 16px center;font-size:17px;font-weight:750;color:#282b23;cursor:pointer;box-shadow:0 2px 0 #e6dfce}
#count:hover{background-color:#fff8d6}#count:focus-visible{outline:3px solid #d3ad22;outline-offset:3px}#count option{background:#fffdf7;color:#282b23}
.data-filters{display:flex;gap:16px;align-items:center;flex-wrap:wrap;margin:20px 0}.data-filters input{width:110px;min-height:46px;padding:8px;border:1px solid #b8b09d;border-radius:8px}#stats-state,#history-state{padding:12px;background:#fff3bd;border-radius:8px}#frequency-list{display:grid;grid-template-columns:1fr 1fr;gap:12px 32px}.frequency-row{display:grid;grid-template-columns:30px 1fr 56px;gap:10px;align-items:center}.frequency-track{height:12px;background:#eee8d9;border-radius:8px;overflow:hidden}.frequency-track i{display:block;height:100%;background:#f4d744}.history-layout{display:grid;grid-template-columns:minmax(0,1fr) 230px;gap:32px}.history-detail{min-width:0}.table-scroll{overflow:auto}table{border-collapse:collapse;width:100%;margin:24px 0;font-size:15px}td,th{padding:14px 8px;border-bottom:1px solid #d1c8b5;text-align:right}td:first-child,th:first-child{text-align:left}#round-list{display:grid;gap:6px;max-height:400px;overflow:auto}#history-balls{flex-wrap:wrap;align-items:center}#history-balls .ball{width:46px;height:46px;font-size:23px}[hidden]{display:none!important}@media(max-width:760px){#frequency-list{grid-template-columns:1fr}.history-layout{grid-template-columns:1fr}.data-filters{gap:12px}#history-balls .ball{width:34px;height:34px;font-size:19px}table{font-size:14px}}
.statistical-settings {display:grid;gap:12px;padding:16px 0;border-bottom:1px solid #d7d3c5}
#statistical-options {display:grid;gap:12px}
#statistical-options p {margin:0;font-size:15px;line-height:1.65}


.statistical-settings label {font-weight:800;font-size:17px;color:#282b23}
.setting-label {display:flex;align-items:center;gap:8px;flex-wrap:wrap}
#settings-dialog .setting-help {border:0;padding:0;margin:0;display:contents}
#settings-dialog .setting-help summary {display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;min-height:30px;border:1px solid #b9b29d;border-radius:50%;padding:0;font-size:16px;font-weight:750;cursor:pointer;list-style:none;color:#555748;background:#fffdf7}
.setting-help summary::-webkit-details-marker {display:none}
#settings-dialog .setting-help[open] summary {background:#f4d744;border-color:#282b23}
#settings-dialog .setting-help p {flex-basis:100%;padding:12px 14px;margin:0;font-size:15px;line-height:1.65;background:#fff5c5;border-radius:10px}
.candidate-preview {border:1px solid #ded8c8;border-radius:14px;padding:16px;background:#faf8ef;margin-top:4px}
.candidate-preview h3 {margin:0 0 8px;font-size:18px}
#candidate-caption {color:#6b6b5d;font-size:13px!important}
#candidate-plan {font-weight:750;margin:10px 0 14px!important;font-size:16px!important}
#candidate-numbers {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 22px}
.candidate-row {display:grid;grid-template-columns:28px minmax(20px,1fr) 44px;gap:8px;align-items:center;font-size:15px}
.candidate-row b {font-size:18px;text-align:center}
.candidate-row>span:last-child {text-align:right;font-variant-numeric:tabular-nums}
.candidate-row .frequency-track {height:10px}
@media(max-width:380px){#candidate-numbers{grid-template-columns:1fr}}

.comparison-card{padding:16px 0;border-bottom:1px solid #d1c8b5}.comparison-card .balls{margin-top:12px;gap:8px}.comparison-card .ball{width:36px;height:36px;font-size:18px}.comparison-card [data-match="none"]{opacity:.45}.comparison-card [data-match="main"]{outline:2px solid #282b23}.comparison-card [data-match="bonus"]{outline:2px dashed #282b23}

.history-refresh{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:20px 0;font-size:14px;color:#68695d}.history-refresh button{padding:10px 14px;white-space:nowrap}

.dream-choices{display:flex;flex-wrap:wrap;gap:12px;margin:20px 0}.dream-choices button{padding:12px 18px;border:1px solid #282b23;border-radius:14px;background:#fff5b4;font-weight:700}#dream-result{padding:24px;background:#fffdf7;border:1px solid #d1c8b5;border-radius:18px;line-height:1.8}#dream-search,#save-round{padding:12px;font-size:17px;border:1px solid #b9b29d;border-radius:10px;max-width:100%}

/* Dream search: one focused entry point, progressively revealed choices. */
#dream .dream-intro{margin-bottom:28px}
#dream .dream-eyebrow{font-size:13px;font-weight:800;letter-spacing:.08em;color:#746423}
#dream .dream-intro h2{font-size:clamp(26px,4vw,34px);margin:10px 0;line-height:1.3}
#dream .dream-intro p{font-size:17px;line-height:1.7}
#dream .dream-search-box{display:flex;flex-direction:column;gap:10px;min-width:0}
#dream .dream-search-box label{display:block;font-size:17px;font-weight:800}
#dream #dream-search{box-sizing:border-box;display:block;width:100%;min-width:0;max-width:none;min-height:58px;padding:14px 16px;background:#fffef9;border:2px solid #615d49;border-radius:14px;font:inherit;font-size:18px}
#dream .dream-search-box .hint{margin:0;font-size:14px}
#dream .dream-empty{text-align:center;padding:28px 12px;background:#fff9db;border-radius:18px;margin-top:24px}
#dream .dream-empty span{display:block;font-size:44px;color:#78621b}
#dream .dream-empty p{font-size:17px;font-weight:700;margin:8px 0}
#dream .dream-empty small{font-size:14px;color:#6b685a}
#dream [hidden]{display:none!important}
#dream-state:empty,#dream-copy-state:empty,#dream-keywords:empty{display:none}
#dream .dream-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px;margin:18px 0}
#dream .dream-choices button{min-height:52px;font:inherit;font-size:17px;font-weight:700;background:#fffdf7;text-align:left;padding:14px 16px}
#dream .dream-choices button:hover,#dream .dream-choices button[aria-pressed=true]{background:#f9df40;border-color:#282b23}
#dream #dream-scenarios{grid-template-columns:1fr}
#dream #dream-scene-section{border-top:1px solid #d1c8b5;margin-top:24px;padding-top:10px}
#dream #dream-result{margin-top:24px;border-top:5px solid #f9df40;padding:24px}
#dream #dream-result-body{font-size:18px;line-height:1.9;color:#34362b}
#dream .dream-disclaimer{font-size:13px;line-height:1.8;color:#777363;margin-top:28px}

/* Generated games: keep copy and save separate, grouped in one responsive card. */
#result-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
#result-tools p{grid-column:1/-1;max-width:none;margin:0 0 6px}
#result-tools button{min-height:48px;padding:10px;font-size:15px;white-space:normal}
#save-controls{margin:20px 0}
#save-controls label{display:flex;flex-wrap:wrap;align-items:center;gap:12px;font-weight:700}
#save-controls #save-round{width:160px;min-width:140px;box-sizing:border-box;flex:0 0 auto}
#save-controls .hint{margin:12px 0;line-height:1.7}
.generated-game{border:1px solid #d1c8b5;border-radius:16px;padding:12px;margin:12px 0;background:#fffdf7;display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.generated-game .result{flex:1 1 280px;min-width:0;min-height:64px;margin:0;padding:8px 0;border:0;grid-template-columns:18px minmax(0,1fr);gap:8px}
.generated-game>button{min-height:44px;padding:10px 16px;margin-left:auto;font-size:15px;font-weight:700;background:#fff5b4;border-color:#d1c8b5;border-radius:10px}
.generated-game .balls{display:flex;gap:5px;min-width:0}
.generated-game .ball{width:clamp(28px,8vw,44px);height:clamp(28px,8vw,44px);flex:0 0 auto;font-size:clamp(18px,5vw,25px)}
@media(max-width:360px){.generated-game{padding:8px}.generated-game .balls{gap:3px}#result-tools{grid-template-columns:1fr}#save-controls label{align-items:flex-start;flex-direction:column}#save-controls #save-round{width:100%}}

.lotto-guide{margin-top:40px;padding:24px;border-top:1px solid #ded8c7}.lotto-guide p{line-height:1.8}.lotto-guide details{padding:16px 0;border-bottom:1px solid #ded8c7}.lotto-guide summary{font-weight:700;cursor:pointer;line-height:1.6}.lotto-guide h2{font-size:24px}@media(max-width:560px){.lotto-guide{padding:20px 0}}
