.lottery-reference {
    display: grid;
    gap: 6px;
    min-width: 0;
    font-size: 13.5px;
}

.lottery-reference h1 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
}

.lottery-reference h2 {
    margin: 0 0 4px;
    font-size: 16px;
}

.lottery-reference p {
    margin: 0;
}

.lottery-reference a {
    color: #9e2834;
    text-decoration: none;
}

.lottery-reference a:hover,
.lottery-reference a:focus-visible {
    text-decoration: underline;
}

.lottery-reference-description,
.lottery-reference-source-line,
.lottery-reference-disclaimer {
    color: #625b58;
}

.lottery-reference-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 4px;
}

.lottery-reference-links a {
    display: flex;
    align-items: center;
    min-height: 36px;
    padding: 6px 8px;
    border: 1px solid #e5ddd9;
    border-radius: 4px;
    background: #fff;
}

.lottery-reference-links a.is-active {
    border-color: #9e2834;
    background: #fff7f6;
    font-weight: 700;
}

.lottery-reference-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 6px;
    padding: 7px;
    border: 1px solid #e5ddd9;
    border-radius: 5px;
}

.lottery-reference-filters label {
    display: grid;
    gap: 2px;
    min-width: 145px;
    margin: 0;
}

.lottery-reference-filters label span {
    color: #625b58;
    font-size: 12px;
}

.lottery-reference-filters input,
.lottery-reference-filters select {
    min-height: 36px;
    padding: 5px 7px;
    border: 1px solid #cfc4bf;
    border-radius: 4px;
    background: #fff;
    font: inherit;
}

.lottery-reference-filters button,
.lottery-reference-filters > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 6px 11px;
    border: 1px solid #9e2834;
    border-radius: 4px;
    background: #9e2834;
    color: #fff;
}

.lottery-reference-filters > a {
    border-color: #cfc4bf;
    background: #fff;
    color: #4e4642;
}

.lottery-reference-today,
.lottery-reference-notice,
.lottery-reference-sources,
.lottery-reference-history {
    padding: 7px;
    border: 1px solid #e5ddd9;
    border-radius: 5px;
}

.lottery-reference-today {
    display: grid;
    gap: 4px;
}

.lottery-reference-notice {
    border-left: 3px solid #c28a25;
    background: #fffaf0;
}

.lottery-reference-table-wrap {
    max-width: 100%;
    overflow: auto;
    border: 1px solid #e5ddd9;
    border-radius: 4px;
}

.lottery-reference-table-wrap table {
    width: 100%;
    min-width: 760px;
    margin: 0;
    border-collapse: collapse;
    background: #fff;
}

.lottery-reference-table-wrap th,
.lottery-reference-table-wrap td {
    padding: 5px 6px;
    border: 1px solid #e8e1dd;
    text-align: left;
    vertical-align: top;
}

.lottery-reference-table-wrap th {
    background: #f7f3f1;
    white-space: nowrap;
}

.lottery-reference-source-line {
    font-size: 12px;
}

.lottery-reference-sources summary,
.lottery-reference-history summary {
    cursor: pointer;
    font-weight: 600;
}

.lottery-reference-sources p {
    padding-top: 5px;
}

.lottery-reference-exceptions {
    margin: 0;
    padding-left: 20px;
}

@media (max-width: 575.98px) {
    .lottery-reference-filters label {
        flex: 1 1 140px;
    }

    .lottery-reference-links {
        grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
    }
}
