/* Loteria Barão — preto & âmbar (paleta do logo em drawer-ui/assets/). Tipografia: Cinzel só
   na marca e nos títulos de destaque; Inter para todo o resto (interface, números, rótulos). */
:root {
    --bg: #0a0806;
    --bg-elevated: #120e09;
    --bg-elevated-2: #1a140c;
    --bg-sunken: #070604;
    --gold: #d18400;
    --gold-bright: #f2a900;
    --gold-dim: #8a5a00;
    --gold-tint: rgba(242, 169, 0, 0.08);
    --border: rgba(209, 132, 0, 0.22);
    --border-soft: rgba(209, 132, 0, 0.12);
    --text-main: #f5f1e6;
    --text-muted: #a79a83;
    --text-faint: #6f6555;
    --ok: #5cc28a;
    --warn: #e0a35f;
    --danger: #e07a5f;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 20px 40px -24px rgba(0, 0, 0, 0.8);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
}

body {
    background:
        radial-gradient(1200px 520px at 75% -10%, rgba(209, 132, 0, 0.10), transparent 60%),
        var(--bg);
    color: var(--text-main);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    line-height: 1.15;
}

a {
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--gold-bright);
    outline-offset: 2px;
    border-radius: 6px;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

.icon {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -0.125em;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -48px;
    background: var(--gold-bright);
    color: #1a1206;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 600;
    z-index: 100;
}

.skip-link:focus {
    top: 12px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 8px;
}

/* --- Header --- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 8, 6, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-soft);
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    height: 68px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand-mark {
    width: 34px;
    height: 34px;
}

.brand-name {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-family: 'Cinzel', serif;
    line-height: 1;
}

.brand-name span {
    font-size: 10px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--gold-dim);
}

.brand-name strong {
    font-size: 18px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold-bright);
}

.nav-links {
    display: flex;
    gap: 4px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    transition: color 0.15s, background 0.15s;
}

.nav-links a:hover {
    color: var(--text-main);
    background: var(--gold-tint);
}

/* --- Hero --- */
.hero {
    padding: 56px 0 40px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 48px;
}

.hero h1 {
    font-family: 'Cinzel', serif;
    font-size: clamp(34px, 5vw, 54px);
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-main);
    margin-bottom: 18px;
}

.hero h1 .gold {
    color: var(--gold-bright);
}

.hero-subtitle {
    font-size: 17px;
    color: var(--text-muted);
    max-width: 46ch;
    margin-bottom: 24px;
}

.trust-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.trust-list li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
    padding: 7px 12px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.02);
}

.trust-list .icon {
    color: var(--gold-bright);
}

/* --- Painel "Próximo sorteio" --- */
.next-draw {
    position: relative;
    background: linear-gradient(180deg, var(--bg-elevated-2), var(--bg-elevated));
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 26px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.next-draw::after {
    content: '';
    position: absolute;
    right: -40px;
    top: -40px;
    width: 180px;
    height: 180px;
    background: url('../assets/svg_sem_fundo.svg') center / contain no-repeat;
    opacity: 0.06;
    pointer-events: none;
}

.next-draw-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
}

.next-draw-when {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-main);
    margin: 6px 0 18px;
    min-height: 1.5em;
}

.countdown-display {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

/* A regra de classe acima ganha do [hidden] do user-agent — precisa ser explícito. */
.countdown-display[hidden] {
    display: none;
}

.time-box {
    background: var(--bg-sunken);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    padding: 12px 6px 10px;
    text-align: center;
}

.time-box span {
    display: block;
    font-size: 30px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    color: var(--gold-bright);
}

.time-box small {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-faint);
}

/* Cabeçalho do painel + selo "Ao vivo" (só nos estágios final/sorteando). */
.next-draw-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.live-badge {
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ff6b4a;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: piscar 1s ease-in-out infinite;
}

.next-draw[data-urgencia="final"] .live-badge,
.next-draw[data-urgencia="sorteando"] .live-badge {
    display: inline-flex;
}

.countdown-display.sem-dias {
    grid-template-columns: repeat(3, 1fr);
}

.countdown-display.sem-dias .time-box-days {
    display: none;
}

/* Barra que enche ao longo da última hora antes do sorteio. */
.next-draw-progress {
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
    margin-bottom: 18px;
}

.next-draw-progress span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--gold-dim), var(--gold-bright));
    transition: width 1s linear;
}

/* Anel de brilho por trás do painel — a intensidade/ritmo sobe com a urgência. */
.next-draw::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, var(--gold-bright), transparent 40%, transparent 60%, var(--gold));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    pointer-events: none;
}

.next-draw[data-urgencia="breve"]::before {
    opacity: 0.6;
    animation: pulsar-anel 4s ease-in-out infinite;
}

.next-draw[data-urgencia="breve"] .next-draw-label {
    color: var(--gold-bright);
}

.next-draw[data-urgencia="iminente"] {
    border-color: var(--gold);
    animation: brilhar 1.6s ease-in-out infinite;
}

.next-draw[data-urgencia="iminente"]::before {
    opacity: 1;
    animation: pulsar-anel 1.6s ease-in-out infinite;
}

.next-draw[data-urgencia="iminente"] .next-draw-label,
.next-draw[data-urgencia="final"] .next-draw-label {
    color: var(--gold-bright);
}

.next-draw[data-urgencia="iminente"] .time-box {
    border-color: var(--border);
}

.next-draw[data-urgencia="iminente"] .next-draw-progress span,
.next-draw[data-urgencia="final"] .next-draw-progress span {
    background: linear-gradient(90deg, var(--gold), #ff7a2e);
}

.next-draw[data-urgencia="final"] {
    border-color: var(--gold-bright);
    background:
        radial-gradient(120% 140% at 50% 0%, rgba(255, 122, 46, 0.16), transparent 60%),
        linear-gradient(180deg, var(--bg-elevated-2), var(--bg-elevated));
    animation: brilhar-forte 0.8s ease-in-out infinite;
}

.next-draw[data-urgencia="final"]::before {
    opacity: 1;
    animation: pulsar-anel 0.8s ease-in-out infinite;
}

.next-draw[data-urgencia="final"] .time-box-seconds {
    border-color: var(--gold-bright);
    background: rgba(242, 169, 0, 0.12);
}

.time-box.pop span {
    animation: pop 0.35s ease-out;
}

.next-draw[data-urgencia="sorteando"] {
    border-color: var(--gold-bright);
    animation: brilhar-forte 1.4s ease-in-out infinite;
}

.next-draw[data-urgencia="sorteando"] .next-draw-progress span {
    background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
    background-size: 50% 100%;
    background-repeat: no-repeat;
    animation: varrer 1.2s linear infinite;
}

/* "Sorteando": quatro rolos de dígitos girando enquanto o resultado não sai. */
.drawing {
    margin-bottom: 18px;
}

.drawing[hidden] {
    display: none;
}

.drawing-reels {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 14px;
}

.reel {
    width: 52px;
    height: 64px;
    overflow: hidden;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gold);
    background: var(--bg-sunken);
    box-shadow: inset 0 10px 12px -8px rgba(0, 0, 0, 0.9), inset 0 -10px 12px -8px rgba(0, 0, 0, 0.9);
}

.reel-strip {
    display: block;
    width: min-content; /* "0 1 2 …" quebra um dígito por linha */
    margin: 0 auto;
    text-align: center;
    font-size: 34px;
    font-weight: 700;
    line-height: 64px;
    color: var(--gold-bright);
    font-variant-numeric: tabular-nums;
    animation: rolar 0.9s linear infinite;
}

.reel:nth-child(2) .reel-strip { animation-duration: 0.7s; animation-delay: -0.2s; }
.reel:nth-child(3) .reel-strip { animation-duration: 1.1s; animation-delay: -0.5s; }
.reel:nth-child(4) .reel-strip { animation-duration: 0.8s; animation-delay: -0.3s; }

.drawing-text {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
}

.drawing-text strong {
    color: var(--gold-bright);
}

@keyframes pulsar-anel {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 1; }
}

@keyframes brilhar {
    0%, 100% { box-shadow: var(--shadow), 0 0 0 0 rgba(242, 169, 0, 0); }
    50% { box-shadow: var(--shadow), 0 0 32px 2px rgba(242, 169, 0, 0.22); }
}

@keyframes brilhar-forte {
    0%, 100% { box-shadow: var(--shadow), 0 0 12px 0 rgba(255, 122, 46, 0.18); }
    50% { box-shadow: var(--shadow), 0 0 44px 6px rgba(255, 122, 46, 0.38); }
}

@keyframes pop {
    0% { transform: scale(1.25); color: #fff; }
    100% { transform: scale(1); }
}

@keyframes piscar {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}

@keyframes rolar {
    from { transform: translateY(0); }
    to { transform: translateY(-640px); } /* 10 dígitos x 64px; o 11º (0) emenda o loop */
}

@keyframes varrer {
    from { background-position: -50% 0; }
    to { background-position: 150% 0; }
}

/* --- Botões --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--gold-bright);
    color: #1a1206;
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}

.btn-primary:hover {
    background: #ffb820;
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.btn-outline:hover {
    background: var(--gold-tint);
    border-color: var(--gold);
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--gold-bright);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
}

.btn-link::after {
    content: '';
    width: 7px;
    height: 7px;
    border-right: 1.8px solid currentColor;
    border-bottom: 1.8px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.15s;
}

.btn-link[aria-expanded="true"]::after {
    transform: rotate(-135deg) translateY(-2px);
}

/* --- Layout principal --- */
.page {
    padding-bottom: 56px;
}

.page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

.page-grid:has(> .upcoming-card[hidden]) {
    grid-template-columns: minmax(0, 1fr);
}

.card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}

.card h2,
.trust-section h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

/* --- Card de resultado --- */
.results-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.result-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
    font-size: 14px;
    color: var(--text-muted);
}

.signature-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    color: var(--text-muted);
}

.signature-status[hidden] {
    display: none;
}

.signature-status.is-ok {
    color: var(--ok);
    border-color: rgba(92, 194, 138, 0.35);
    background: rgba(92, 194, 138, 0.08);
}

.signature-status.is-warn {
    color: var(--warn);
    border-color: rgba(224, 163, 95, 0.35);
    background: rgba(224, 163, 95, 0.08);
}

.date-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.date-picker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 7px 12px;
    background: var(--bg-sunken);
    color: var(--gold-bright);
    cursor: pointer;
}

.date-picker input[type="date"] {
    border: none;
    background: transparent;
    color: var(--text-main);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    outline: none;
    color-scheme: dark;
    cursor: pointer;
}

/* --- Chips de horário --- */
.chips-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 10px;
}

.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    max-height: 132px; /* ~3 linhas; dias com muitos horários rolam aqui dentro */
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--gold-dim) transparent;
}

.chips-container::-webkit-scrollbar {
    width: 6px;
}

.chips-container::-webkit-scrollbar-thumb {
    background: var(--gold-dim);
    border-radius: 3px;
}

.chip {
    min-width: 68px;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-align: center;
    border: 1px solid var(--border-soft);
    background: var(--bg-sunken);
    color: var(--text-main);
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.chip.completed {
    cursor: pointer;
}

.chip.completed:hover {
    border-color: var(--gold);
    background: var(--gold-tint);
}

.chip.completed.active {
    border-color: var(--gold-bright);
    background: var(--gold-bright);
    color: #1a1206;
}

.chip.pending {
    color: var(--text-faint);
    border-style: dashed;
    cursor: default;
}

.state-message {
    color: var(--danger);
    font-size: 14px;
}

/* Estado vazio neutro (ex.: "os sorteios de hoje ainda não começaram") — não é erro. */
.state-message.info {
    color: var(--text-muted);
}

/* Aviso "Resultado das 17:00 acabou de sair!" */
.result-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin-bottom: 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gold);
    background: linear-gradient(90deg, rgba(242, 169, 0, 0.16), rgba(242, 169, 0, 0.04));
    color: var(--text-main);
    font-weight: 600;
    animation: entrar 0.35s ease-out;
}

.result-toast[hidden] {
    display: none;
}

.result-toast .icon {
    color: var(--gold-bright);
    font-size: 18px;
}

.result-toast .btn-link {
    margin-left: auto;
}

.chip.flash {
    animation: flash 1.6s ease-out 2;
}

@keyframes flash {
    0% { box-shadow: 0 0 0 0 rgba(242, 169, 0, 0.7); }
    100% { box-shadow: 0 0 0 12px rgba(242, 169, 0, 0); }
}

@keyframes entrar {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
}

/* --- Tabela de prêmios --- */
.prize-table {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.prize-table:empty {
    display: none;
}

.prize-row {
    display: grid;
    grid-template-columns: 96px 1fr;
    align-items: center;
    gap: 16px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-soft);
}

.prize-row:last-child {
    border-bottom: none;
}

.prize-row:first-child {
    background: linear-gradient(90deg, rgba(242, 169, 0, 0.10), transparent 70%);
}

.prize-label {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.prize-position {
    font-size: 20px;
    font-weight: 700;
    color: var(--gold-bright);
    font-variant-numeric: tabular-nums;
}

.prize-label small {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.numeros-container {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.bola {
    width: 44px;
    height: 52px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, var(--bg-elevated-2), var(--bg-sunken));
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    user-select: all;
}

.prize-row:first-child .bola {
    border-color: var(--gold);
    color: var(--gold-bright);
}

/* Revelação: cada dígito gira (JS troca o número) e crava com um "pulo" dourado. */
.prize-table.revelando .prize-row {
    animation: entrar 0.4s ease-out both;
}

.bola.girando {
    color: var(--text-faint);
    filter: blur(0.6px);
}

.bola.cravado {
    animation: cravar 0.45s ease-out;
}

@keyframes cravar {
    0% { transform: scale(1.3); border-color: var(--gold-bright); box-shadow: 0 0 22px rgba(242, 169, 0, 0.55); }
    100% { transform: scale(1); }
}

/* --- Detalhes da verificação --- */
.result-details {
    margin-top: 18px;
}

.result-details-panel {
    margin-top: 12px;
    padding: 16px;
    border-radius: var(--radius-sm);
    background: var(--bg-sunken);
    border: 1px solid var(--border-soft);
    font-size: 14px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* O [hidden] nativo perde pro display:flex acima — precisa de regra explícita. */
.result-details-panel[hidden] {
    display: none;
}

.signature-line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.signature-line span {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.hash-tag {
    font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
    font-size: 12px;
    color: var(--gold);
    word-break: break-all;
}

/* --- Próximos sorteios (coluna lateral) --- */
.upcoming-card {
    position: sticky;
    top: 92px;
    max-height: calc(100vh - 116px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.upcoming-card[hidden] {
    display: none;
}

.upcoming-subtitle {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin: 18px 0 10px;
}

/* "A seguir": linha do tempo vertical. */
.timeline {
    list-style: none;
    position: relative;
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: baseline;
    gap: 10px;
    padding: 8px 0 8px 22px;
}

/* ponto */
.timeline-item::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 15px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 2px solid var(--gold-dim);
    background: var(--bg-elevated);
}

/* linha conectora */
.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 28px;
    bottom: -12px;
    width: 1px;
    background: var(--border);
}

.timeline-time {
    font-size: 18px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-main);
}

.timeline-day {
    font-size: 13px;
    color: var(--text-muted);
}

.timeline-item .upcoming-relative {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.timeline-item.is-next::before {
    border-color: var(--gold-bright);
    background: var(--gold-bright);
    box-shadow: 0 0 0 0 rgba(242, 169, 0, 0.6);
}

.timeline-item.is-next .timeline-time,
.timeline-item.is-next .upcoming-relative {
    color: var(--gold-bright);
}

.timeline-item.is-next[data-urgencia="breve"]::before { animation: radar 2.4s ease-out infinite; }
.timeline-item.is-next[data-urgencia="iminente"]::before { animation: radar 1.2s ease-out infinite; }
.timeline-item.is-next[data-urgencia="final"]::before { animation: radar 0.7s ease-out infinite; background: #ff7a2e; border-color: #ff7a2e; }
.timeline-item.is-next[data-urgencia="final"] .upcoming-relative { color: #ff9a5a; }

.timeline-item.is-drawing::before {
    border-color: #ff6b4a;
    background: #ff6b4a;
    animation: piscar 1s ease-in-out infinite;
}

.timeline-item.is-drawing .upcoming-relative {
    color: #ff9a5a;
}

@keyframes radar {
    0% { box-shadow: 0 0 0 0 rgba(242, 169, 0, 0.6); }
    100% { box-shadow: 0 0 0 9px rgba(242, 169, 0, 0); }
}

/* Abas de dia. */
.day-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.day-tabs::-webkit-scrollbar {
    display: none;
}

.day-tab {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-soft);
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.day-tab:hover {
    color: var(--text-main);
    border-color: var(--border);
}

.day-tab[aria-selected="true"] {
    background: var(--gold-tint);
    border-color: var(--gold);
    color: var(--gold-bright);
}

.day-tab-count {
    min-width: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 11px;
    line-height: 18px;
    text-align: center;
}

/* Horários do dia, por período. */
.day-panel {
    margin-top: 12px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--gold-dim) transparent;
    padding-right: 2px;
}

.period + .period {
    margin-top: 14px;
}

.period-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.period-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.upcoming-chip {
    padding: 6px 0;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    background: var(--bg-sunken);
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.upcoming-chip.is-waiting {
    border-style: dashed;
    border-color: #ff6b4a;
    color: #ff9a5a;
}

.upcoming-chip.is-next {
    border-color: var(--gold);
    background: var(--gold-tint);
    color: var(--gold-bright);
    font-weight: 700;
}

.upcoming-relative {
    font-size: 11px;
    font-weight: 600;
    color: var(--gold-bright);
}

/* --- Transparência --- */
.trust-section {
    margin-top: 56px;
}

.security-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.security-item {
    padding: 22px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    background: var(--bg-elevated);
}

.security-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 14px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--gold-bright);
    background: var(--gold-tint);
    border: 1px solid var(--border-soft);
}

.security-item h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}

.security-item p {
    font-size: 14px;
    color: var(--text-muted);
}

/* --- Rodapé --- */
.site-footer {
    border-top: 1px solid var(--border-soft);
    padding: 28px 0 36px;
    background: var(--bg-sunken);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-brand div {
    display: flex;
    flex-direction: column;
}

.footer-brand strong {
    color: var(--text-main);
}

.footer-mark {
    width: 28px;
    height: 28px;
    opacity: 0.8;
}

.footer-responsible strong {
    color: var(--gold-bright);
    margin-right: 4px;
}

/* --- Responsivo --- */
@media (max-width: 980px) {
    .page-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .upcoming-card {
        position: static;
        max-height: none;
    }
}

@media (max-width: 860px) {
    .hero {
        padding: 32px 0 28px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .security-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 16px;
    }

    .nav-links {
        display: none;
    }

    .card,
    .next-draw {
        padding: 20px;
    }

    .time-box span {
        font-size: 24px;
    }

    .results-card-header {
        flex-direction: column;
    }

    .prize-row {
        grid-template-columns: 52px 1fr;
        gap: 10px;
        padding: 10px 12px;
    }

    .prize-label small {
        display: none;
    }

    .bola {
        width: 40px;
        height: 46px;
        font-size: 22px;
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}
