:root { color-scheme: light; font-family: Arial, "Microsoft YaHei", sans-serif; color: #28323e; background: #f3f6f9; }
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.5; letter-spacing: 0; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border: 0; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid #0084ff; outline-offset: 3px; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
.top { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; min-height: 56px; max-width: 750px; margin: 0 auto; padding: 4px 8px; color: #fff; background: #0084ff; }
.logo { font-size: 18px; font-weight: 600; line-height: 1.35; text-align: center; overflow-wrap: anywhere; }
.history-icon-button { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; color: inherit; background: transparent; font-size: 23px; }
.menuDialog { position: absolute; top: calc(100% - 2px); right: 8px; width: 166px; max-height: 60vh; overflow: auto; padding: 6px; border: 1px solid #dbe3eb; border-radius: 4px; color: #28323e; background: #fff; box-shadow: 0 5px 14px #1e36521a; }
.menuDialog[hidden] { display: none; }
.menu_nav { display: grid; }
.menu_nav a { padding: 10px 12px; border-radius: 3px; }
.menu_nav a:hover { background: #edf6ff; color: #0076e4; }
.box { max-width: 750px; margin: 0 auto; background: #fff; }
.choice { background: #fff; border-bottom: 8px solid #f3f6f9; }
.history-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; padding: 16px 20px 14px; }
.history-toolbar > nav { min-width: 0; max-width: 100%; }
.kjnf { display: flex; gap: 8px; overflow-x: auto; padding: 3px 0; }
.kjnf a { display: block; padding: 6px 12px; border: 1px solid #dbe3eb; border-radius: 4px; font-size: 13px; color: #647283; white-space: nowrap; }
.kjnf .active a { color: #0076e4; background: #edf6ff; border-color: #7dbdff; font-weight: 600; }
.history-query { display: flex; align-items: center; gap: 8px; min-width: 0; }
.history-search { display: flex; align-items: center; gap: 6px; width: 150px; min-width: 0; padding: 7px 9px; border: 1px solid #dbe3eb; border-radius: 4px; background: #f9fbfd; color: #8995a3; }
.history-search input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: #28323e; font-size: 13px; }
.history-search:focus-within { border-color: #0084ff; box-shadow: 0 0 0 2px #0084ff1a; }
.history-query > button { min-height: 35px; padding: 6px 13px; border-radius: 4px; color: #fff; background: #0084ff; font-size: 13px; }
.history-clear { display: inline-flex; justify-content: center; align-items: center; width: 30px; height: 35px; color: #647283; }
.history-filters { display: grid; gap: 9px; padding: 0 20px 16px; }
.filter-row { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.filter-label { flex: 0 0 28px; padding-top: 4px; color: #7c8896; font-size: 12px; line-height: 26px; }
.choice-input { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.position_superior { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 32px; padding: 0 8px; border: 1px solid #e1e7ed; border-radius: 4px; background: #fff; color: #526171; font-size: 12px; scroll-margin-top: 70px; }
.position_superior.active { color: #0076e4; background: #edf6ff; border-color: #7dbdff; font-weight: 600; }
.position_superior.reduction { width: 34px; min-width: 34px; padding: 0; color: #8290a0; background: #f6f8fa; font-size: 16px; }
.history-list-heading { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px 8px; }
.history-list-heading h2 { font-size: 14px; font-weight: 600; }
.history-list-heading > span { color: #8995a3; font-size: 12px; }
.history-record { padding: 14px 20px 17px; border-bottom: 1px solid #edf0f3; }
.record-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px 12px; margin-bottom: 12px; }
.record-heading h3 { color: #344253; font-size: 14px; font-weight: 400; }
.record-heading b { color: #0076e4; font-weight: 600; }
.record-year { margin-right: 5px; color: #7c8896; font-size: 12px; }
.record-heading time { color: #8995a3; font-size: 12px; }
.draw-numbers { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)) 20px minmax(0, 1fr); gap: 10px; align-items: start; max-width: 520px; }
.ball { display: flex; flex-direction: column; align-items: center; min-width: 0; gap: 5px; transition: opacity .12s; }
.number { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; color: #fff; background: #a0aab5; font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; }
.number.red { background: #ed4547; }
.number.blue { background: #1689ef; }
.number.green { background: #16a46b; }
.number-label { color: #718091; font-size: 12px; line-height: 18px; }
.te { align-self: start; display: flex; align-items: center; justify-content: center; height: 42px; color: #97a2af; font-size: 23px; font-weight: 400; }
.ball.opacityOne { opacity: .2; }
.history-empty { padding: 46px 20px; text-align: center; color: #7c8896; font-size: 14px; }
.history-pages { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 14px; padding: 22px 12px; color: #7c8896; font-size: 13px; }
.history-pages a { padding: 7px 12px; border: 1px solid #dbe3eb; border-radius: 4px; color: #0076e4; background: #fff; }
.footer { max-width: 750px; margin: 0 auto; padding: 22px 12px; text-align: center; color: #9aa5b1; font-size: 11px; line-height: 1.8; }
@media (max-width: 480px) {
    .top { min-height: 52px; }
    .logo { font-size: 17px; }
    .history-toolbar { padding: 12px 14px; gap: 10px; }
    .history-query { margin-left: auto; }
    .history-filters { padding: 0 14px 14px; gap: 8px; }
    .filter-row { gap: 8px; }
    .filter-label { flex-basis: 24px; }
    .choice-input { gap: 5px; }
    .position_superior { min-width: 32px; height: 30px; padding: 0 6px; }
    .choice-input[data-filter="position"] { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); flex: 1; gap: 4px; }
    .choice-input[data-filter="position"] .position_superior { width: 100%; min-width: 0; padding: 0; }
    .history-list-heading { padding: 13px 14px 6px; }
    .history-record { padding: 13px 14px 16px; }
    .record-heading { margin-bottom: 11px; }
    .draw-numbers { grid-template-columns: repeat(6, minmax(0, 1fr)) 12px minmax(0, 1fr); gap: 4px; }
    .number { width: 36px; height: 36px; font-size: 18px; }
    .te { height: 36px; font-size: 20px; }
}
@media (max-width: 350px) {
    .top { grid-template-columns: 36px minmax(0, 1fr) 36px; padding-right: 4px; padding-left: 4px; }
    .history-icon-button { width: 36px; }
    .logo { font-size: 16px; }
    .history-query { width: 100%; margin-left: 0; }
    .history-search { flex: 1; width: auto; }
    .number { width: 32px; height: 32px; font-size: 17px; }
    .te { height: 32px; }
    .record-year { font-size: 11px; margin-right: 2px; }
    .record-heading h3 { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .ball { transition: none; } }
