body { background: #f5f7fb; color: #202b3f; font-family: Arial, sans-serif; }
.lottery-container { max-width: 1800px; padding: 36px 28px 0; }
.lottery-card { border: 1px solid #e0e6ef; border-radius: 18px; overflow: hidden; box-shadow: 0 14px 40px rgba(28, 45, 78, .07); }
.lottery-header { padding: 30px 34px 26px; }
.lottery-header .btn { border-color: #d5ddeb; color: #344057; border-radius: 9px; padding: 10px 18px; }
.lottery-tabs { padding: 12px 24px 0; background: #fafbfd; overflow-x: auto; border-color: #e5eaf2; }
.lottery-tabs .nav-link { color: #68758c; font-weight: 700; white-space: nowrap; border: 0; padding: 16px 18px; position: relative; }
.lottery-tabs .nav-link.active { color: #2863ec; background: #fff; border-radius: 9px 9px 0 0; }
.lottery-tabs .nav-link.active::after { content: ''; height: 3px; position: absolute; bottom: 0; left: 16px; right: 16px; background: #2863ec; border-radius: 3px 3px 0 0; }
.lottery-body { padding: 26px 34px 34px; }
.results-wrapper { border: 1px solid #e0e6ef; border-radius: 12px; }
.results-table { font-size: 14px; border-style: hidden; color: #202b3f; }
.results-table > :not(caption) > * > * { padding: 15px 16px; border-color: #e9edf4; white-space: nowrap; }
.results-table thead { background: #f7f9fc; color: #4c5a70; }
@media (max-width: 767px) { .lottery-container { padding: 16px 12px 0; } .lottery-header { padding: 22px 18px; } .lottery-body { padding: 22px 18px; } .lottery-tabs { padding-left: 8px; } .results-table > :not(caption) > * > * { padding: 12px; } }

/* Stack each draw into a labelled card on phones, including all prize columns. */
@media (max-width: 767px) {
    .lottery-container { padding: 12px 10px 0; }
    .lottery-card { border-radius: 12px; }
    .lottery-header { padding: 20px 16px; }
    .lottery-header h1 { font-size: 24px; }
    #clock { font-size: 13px; }
    .lottery-header .btn { min-height: 44px; }
    .lottery-tabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 8px; gap: 4px; overflow: visible; }
    .lottery-tabs .nav-link { grid-column: span 2; padding: 12px 4px; font-size: 13px; text-align: center; white-space: normal; border-radius: 6px; }
    .lottery-tabs .nav-link:nth-child(n+4) { grid-column: span 3; }
    .lottery-tabs .nav-link.active { border-radius: 6px; }
    .lottery-body { min-width: 0; padding: 20px 12px; }
    .results-wrapper { overflow: visible; border: 0; border-radius: 0; }
    .results-table, .results-table tbody { display: block; width: 100%; }
    .results-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .results-table tbody tr { display: block; margin-bottom: 14px; border: 1px solid #e0e6ef; border-radius: 10px; overflow: hidden; }
    .results-table tbody tr:last-child { margin-bottom: 0; }
    .results-table tbody td { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 11px 12px; border: 0; border-bottom: 1px solid #edf0f5; white-space: normal; font-size: 13px; }
    .results-table tbody td::before { content: attr(data-label); color: #647087; font-weight: 600; }
    .results-table tbody td:first-child { background: #f7f9fc; }
    .results-table tbody td:last-child { border-bottom: 0; }
    .result-value { min-width: 0; overflow-wrap: anywhere; line-height: 1.7; }
    .results-table .empty-result td { display: block; }
    .results-table .empty-result td::before { content: none; }
}

.source-credit { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; touch-action: manipulation; }
.source-credit:focus-visible { outline: 2px solid #7952b3; outline-offset: 5px; border-radius: 2px; }
.admin-login-dialog { width: min(420px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; margin: auto; padding: 26px; border: 1px solid #e0e6ef; border-radius: 14px; color: #202b3f; box-shadow: 0 20px 60px #17233b33; }
.admin-login-dialog::backdrop { background: rgba(20, 30, 50, .5); }
