:root {
    --black: #050505;
    --black-2: #0d0b08;
    --gold: #d9a93b;
    --gold-2: #ffe7a3;
    --gold-3: #8d6415;
    --red-dark: #5a0000;
    --text: #f5ecd6;
    --muted: #b8aa88;
    --line: rgba(217,169,59,.38);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: radial-gradient(circle at top, #241a09 0, #060606 38%, #000 100%);
    color: var(--text);
    font-family: Inter, Arial, sans-serif;
}
a { color: inherit; }
.sg-page { min-height: 100vh; }
.sg-hero {
    width: 100%;
    min-height: 390px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    align-items: end;
    justify-content: center;
    border-bottom: 1px solid var(--line);
}
.sg-hero-inner {
    width: min(1100px, calc(100% - 28px));
    padding: 110px 15px 48px;
    text-align: center;
}
.sg-brand-kicker {
    color: var(--gold-2);
    font-weight: 800;
    letter-spacing: 5px;
    font-size: 13px;
    text-shadow: 0 2px 8px #000;
}
.sg-brand {
    display: inline-block;
    margin-top: 10px;
    font-family: Cinzel, Georgia, serif;
    font-weight: 800;
    color: var(--gold-2);
    text-decoration: none;
    font-size: clamp(44px, 7vw, 92px);
    line-height: .95;
    letter-spacing: 3px;
    text-shadow: 0 3px 0 #5a3500, 0 0 25px rgba(255,213,106,.45), 0 12px 30px #000;
}
.sg-brand-subtitle {
    margin-top: 12px;
    color: #fff5cf;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px #000;
}
.sg-nav {
    width: min(1024px, calc(100% - 24px));
    margin: -24px auto 0;
    display: flex;
    justify-content: center;
    gap: 14px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(22,15,6,.95), rgba(0,0,0,.95));
    box-shadow: 0 15px 45px rgba(0,0,0,.5), inset 0 1px rgba(255,255,255,.08);
    position: relative;
    z-index: 2;
}
.sg-nav a {
    min-width: 130px;
    text-align: center;
    padding: 12px 20px;
    border-radius: 999px;
    text-decoration: none;
    color: #210e00;
    background: linear-gradient(180deg, #fff1aa, #c28a22 48%, #6a3d00);
    border: 1px solid #ffe8a6;
    font-weight: 900;
    font-size: 14px;
    letter-spacing: .8px;
    text-shadow: 0 1px rgba(255,255,255,.5);
    box-shadow: inset 0 2px 6px rgba(255,255,255,.38), 0 4px 10px rgba(0,0,0,.55);
}
.sg-nav a:hover,
.sg-nav a.active {
    filter: brightness(1.18);
    transform: translateY(-1px);
}
.sg-main {
    width: min(1040px, calc(100% - 24px));
    margin: 34px auto 0;
}
.sg-date-card {
    width: max-content;
    max-width: 100%;
    margin: 0 auto 24px;
    padding: 14px 40px;
    border-radius: 999px;
    background: linear-gradient(180deg, #1c1204, #090603);
    border: 1px solid var(--gold-3);
    color: var(--gold-2);
    box-shadow: 0 0 22px rgba(217,169,59,.18), inset 0 1px rgba(255,255,255,.07);
    font-family: Cinzel, Georgia, serif;
    font-weight: 700;
    letter-spacing: 1px;
}
.sg-result-board {
    padding: 28px;
    border: 1px solid var(--gold-3);
    border-radius: 24px;
    background: radial-gradient(circle at center top, rgba(217,169,59,.12), transparent 45%), linear-gradient(180deg, rgba(10,9,8,.98), rgba(0,0,0,.98));
    box-shadow: 0 20px 60px rgba(0,0,0,.5), inset 0 0 45px rgba(217,169,59,.08);
}
.sg-result-board.compact { margin-bottom: 24px; }
.sg-result-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}
.sg-result-card {
    min-width: 0;
    padding: 18px 12px 20px;
    border: 1px solid rgba(217,169,59,.28);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(33,24,8,.68), rgba(0,0,0,.62));
    box-shadow: inset 0 1px rgba(255,255,255,.06), 0 12px 25px rgba(0,0,0,.34);
}
.sg-rank {
    width: max-content;
    min-width: 86px;
    margin: 0 auto 16px;
    padding: 10px 14px;
    border-radius: 999px;
    color: #230e00;
    background: linear-gradient(180deg, #fff3b4, #c88c1e 52%, #7e4d00);
    border: 1px solid #ffe7a1;
    font-weight: 900;
    text-align: center;
    font-family: Cinzel, Georgia, serif;
    box-shadow: inset 0 2px 6px rgba(255,255,255,.38);
}
.sg-digits {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-content: center;
    gap: 8px;
}
.sg-digits span {
    width: 100%;
    min-width: 0;
    height: clamp(54px, 6.2vw, 82px);
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(180deg, #fbedb4, #c88a1a 45%, #5b3300);
    border: 2px solid #ffeeb1;
    color: #1c0b00;
    font-family: Cinzel, Georgia, serif;
    font-size: clamp(28px, 4vw, 52px);
    font-weight: 900;
    text-shadow: 0 1px rgba(255,255,255,.4);
    box-shadow: inset 0 3px 12px rgba(255,255,255,.35), 0 8px 25px rgba(0,0,0,.65), 0 0 20px rgba(217,169,59,.24);
}
.sg-draw-text {
    margin-top: 26px;
    text-align: center;
    color: #fff4c5;
    font-family: Cinzel, Georgia, serif;
    font-size: clamp(18px, 3vw, 28px);
    font-weight: 800;
    letter-spacing: 1px;
}
.sg-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 24px 0;
}
.sg-info-card {
    min-height: 108px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(22,18,10,.96), rgba(3,3,3,.98));
    box-shadow: inset 0 1px rgba(255,255,255,.06), 0 14px 30px rgba(0,0,0,.35);
}
.sg-info-card b { display: block; color: var(--gold-2); font-family: Cinzel, Georgia, serif; margin-bottom: 10px; }
.sg-info-card span { color: #f7ecd0; }
.sg-panel {
    margin: 24px 0;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(22,18,10,.96), rgba(3,3,3,.98));
    box-shadow: 0 16px 45px rgba(0,0,0,.42);
}
.sg-panel-title,
.sg-page-title h1,
.about-panel h2 {
    margin: 0 0 16px;
    color: var(--gold-2);
    font-family: Cinzel, Georgia, serif;
    font-weight: 800;
    letter-spacing: 2px;
}
.sg-page-title { text-align: center; margin: 0 0 24px; }
.sg-page-title h1 { font-size: clamp(32px, 5vw, 56px); }
.sg-page-title p { color: var(--muted); margin: 0; }
.sg-table-wrap { overflow-x: auto; }
.sg-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.sg-table th, .sg-table td { padding: 13px 12px; border-bottom: 1px solid rgba(217,169,59,.18); text-align: center; }
.sg-table th { color: var(--gold-2); font-family: Cinzel, Georgia, serif; background: rgba(217,169,59,.08); }
.sg-table tr:hover td { background: rgba(217,169,59,.05); }
.gold-text { color: var(--gold-2); }
.strong { font-weight: 900; }
.sg-filter { display: grid; grid-template-columns: 1fr 140px 140px auto auto; gap: 10px; margin-bottom: 18px; }
.sg-filter input, .sg-filter select {
    height: 42px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #0a0a0a;
    color: var(--text);
}
.sg-filter button, .sg-filter a, .sg-pagination a {
    height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(180deg, #fff1aa, #c28a22 48%, #6a3d00);
    color: #210e00;
    font-weight: 900;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.sg-pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 18px; color: var(--muted); }
.about-panel p { line-height: 1.75; color: #e7d9bd; }
.about-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.about-list div { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(0,0,0,.35); }
.about-list b { display: block; color: var(--gold-2); margin-bottom: 8px; }
.sg-footer {
    width: min(1040px, calc(100% - 24px));
    margin: 40px auto 0;
    padding: 30px 0 40px;
    text-align: center;
    color: var(--muted);
    border-top: 1px solid rgba(217,169,59,.18);
}
.sg-footer small { display: block; margin-top: 8px; }
@media (max-width: 760px) {
    .sg-hero { min-height: 270px; }
    .sg-nav { flex-wrap: wrap; gap: 8px; margin-top: -16px; }
    .sg-nav a { min-width: 95px; padding: 10px 13px; font-size: 12px; }
    .sg-result-board { padding: 16px 10px; }
    .sg-result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .sg-result-card-main { grid-column: 1 / -1; }
    .sg-result-card { padding: 14px 8px 16px; border-radius: 16px; }
    .sg-rank { min-width: 72px; margin-bottom: 10px; padding: 8px 10px; font-size: 13px; }
    .sg-digits { gap: 5px; }
    .sg-digits span { height: 50px; border-radius: 10px; font-size: clamp(22px, 8vw, 34px); }
    .sg-info-grid, .about-list { grid-template-columns: 1fr; }
    .sg-filter { grid-template-columns: 1fr; }
}

.sg-digits.is-empty {
    display: flex;
    justify-content: center;
}
.sg-digits .sg-digit-dash {
    width: min(150px, 100%);
}
.sg-random-note {
    margin-top: 16px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    letter-spacing: .4px;
}
.sg-filter-calendar {
    grid-template-columns: 1fr 190px auto auto;
}
.sg-filter-note {
    margin: -4px 0 16px;
    color: var(--muted);
    text-align: center;
}
.sg-filter input[type="date"] {
    color-scheme: dark;
}
@media (max-width: 760px) {
    .sg-filter-calendar {
        grid-template-columns: 1fr;
    }
}
