:root {
  --navy: #011542;
  --navy-deep: #00113c;
  --navy-mid: #102452;
  --red: #e90913;
  --red-bright: #f11e2a;
  --surface: #fff;
  --line: #d5d9e2;
  --muted: #65708e;
  --shadow: 0 5px 16px rgba(0, 21, 66, .16);
  --radius: 12px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: #fff; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; color: var(--navy); background: #fff; font-family: "Arial Narrow", "Roboto Condensed", Arial, sans-serif; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; display: block; }

.site-header { min-height: 138px; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.13); position: relative; z-index: 20; }
.site-header.has-market-switcher { margin-bottom: 42px; }
.site-header::before, .site-header::after { content: ""; position: absolute; top: 0; right: 0; height: 20px; transform: skewX(-35deg); transform-origin: right top; }
.site-header::before { width: 230px; background: var(--navy); }
.site-header::after { width: 108px; background: var(--red); }
.header-inner { max-width: 1640px; min-height: 138px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 34px; }
.brand { width: 410px; flex: 0 0 410px; padding-top: 3px; }
.brand img { width: 390px; height: 124px; object-fit: contain; object-position: left center; }
.primary-nav { flex: 1; min-width: 0; height: 112px; display: grid; grid-template-columns: repeat(5, minmax(132px, 1fr)); align-items: stretch; }
.nav-link { position: relative; min-width: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 7px; border-left: 1px solid #dde0e6; font-weight: 800; font-size: 19px; letter-spacing: .15px; transition: .2s ease; }
.nav-link:first-child { border-left: 0; }
.nav-icon { font-size: 31px; line-height: 1; font-family: Arial, sans-serif; }
.nav-link:hover { color: var(--red); background: #f5f7fa; }
.nav-link.active { color: #fff; background: linear-gradient(160deg, #071d52, #00123f); border-radius: 13px; box-shadow: 0 5px 11px rgba(0,21,66,.23); }
.nav-link.active::after { content: ""; position: absolute; bottom: 0; left: 39%; right: 39%; height: 6px; background: var(--red); }
.menu-toggle { display: none; }
.market-switcher { position: absolute; right: 26px; bottom: -42px; height: 34px; display: flex; align-items: center; gap: 8px; padding: 5px 8px 5px 13px; background: var(--navy); color: #fff; border-radius: 0 0 8px 8px; box-shadow: var(--shadow); }
.market-switcher label { font-size: 12px; font-weight: 800; }
.market-switcher select { height: 25px; border: 0; border-radius: 4px; color: var(--navy); font-weight: 700; }

.site-main { width: 100%; }
.home-grid { width: calc(100% - 48px); max-width: 1624px; margin: 22px auto 36px; display: grid; grid-template-columns: minmax(280px, 400px) minmax(560px, 768px) minmax(280px, 400px); grid-template-areas: "schedule center history"; gap: 28px; align-items: stretch; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; min-width: 0; }
.schedule-card { grid-area: schedule; min-height: 664px; border: 1px solid #e1e4ea; display: flex; flex-direction: column; }
.center-column { grid-area: center; min-width: 0; display: flex; flex-direction: column; gap: 11px; }
.history-card { grid-area: history; min-height: 664px; border: 1px solid #e1e4ea; display: flex; flex-direction: column; }
.card-title { min-height: 59px; display: flex; align-items: center; background: var(--navy); color: #fff; }
.card-title > span { width: 56px; align-self: stretch; display: grid; place-items: center; background: linear-gradient(140deg, var(--red-bright), #d6000b); font-size: 28px; }
.card-title h2 { margin: 0; padding-left: 17px; font-size: clamp(18px, 1.35vw, 22px); line-height: 1; letter-spacing: .2px; white-space: nowrap; }

.schedule-date-context { min-height: 54px; padding: 11px 24px 4px 74px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #e7e9ee; }
.schedule-date-context strong { color: var(--red); font-size: 18px; line-height: 1; }
.schedule-date-context time { color: var(--muted); font-size: 14px; font-weight: 800; white-space: nowrap; }
.schedule-timeline { flex: 1; position: relative; padding: 12px 24px 4px 20px; display: flex; flex-direction: column; justify-content: space-evenly; }
.schedule-timeline::before { content: ""; position: absolute; top: 44px; bottom: 44px; left: 46px; width: 2px; background: #9eabc5; }
.schedule-item { position: relative; min-height: 91px; display: grid; grid-template-columns: 54px minmax(0,1fr) auto; align-items: center; gap: 8px; }
.schedule-dot { position: relative; z-index: 1; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--navy); border: 5px solid #fff; box-shadow: 0 0 0 1px #d6dae3; font-size: 16px; }
.schedule-item.next .schedule-dot { background: var(--red); }
.schedule-item > div { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.schedule-item strong { font-size: 18px; line-height: 1; overflow-wrap: anywhere; }
.schedule-item small { color: var(--muted); font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.schedule-item time { min-width: 72px; padding: 7px 10px; border-radius: 5px; text-align: center; color: #fff; background: var(--navy); font-size: 17px; font-weight: 800; box-shadow: inset 0 -2px 0 rgba(255,255,255,.12); }
.schedule-item.next strong { color: var(--red); }
.schedule-item.next time { background: var(--red); }
.schedule-note { min-height: 50px; margin-top: auto; padding: 0 12px; display: flex; justify-content: center; align-items: center; gap: 8px; text-align: center; color: #fff; background: var(--navy); font-weight: 700; font-size: 14px; }

.countdown-card { min-height: 200px; padding: 17px 24px 15px; color: #fff; background: radial-gradient(circle at 50% 110%, #15356f 0, transparent 55%), linear-gradient(135deg, #00113c, #001b55 55%, #001441); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; position: relative; }
.countdown-card::after { content: ""; position: absolute; inset: 0; opacity: .17; background-image: radial-gradient(circle, #66a0e8 1px, transparent 1.5px); background-size: 13px 13px; mask-image: linear-gradient(90deg, transparent, #000 35%, #000 65%, transparent); pointer-events: none; }
.countdown-card h1 { position: relative; z-index: 1; margin: 0; display: flex; align-items: center; justify-content: center; gap: 20px; font-size: clamp(24px, 2vw, 32px); line-height: 1.15; text-align: center; }
.countdown-card h1 span { width: 46px; height: 3px; background: var(--red); border-radius: 4px; }
.countdown-card > p { position: relative; z-index: 1; margin: 7px 0 8px; text-align: center; color: #bfcce3; font-weight: 700; font-size: 12px; letter-spacing: .5px; }
.countdown-units { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(5, auto); justify-content: center; align-items: center; gap: 14px; }
.countdown-units > div { width: 134px; min-width: 0; text-align: center; }
.countdown-units strong { height: 83px; display: grid; place-items: center; border-radius: 7px; color: #fff; background: linear-gradient(#f51e2c 49%, #ce0010 50%); border: 1px solid #ff5360; box-shadow: inset 0 2px 0 rgba(255,255,255,.28), 0 4px 9px rgba(0,0,0,.25); font-size: 68px; line-height: 1; text-shadow: 0 2px 2px rgba(0,0,0,.25); }
.countdown-units span { display: block; margin-top: 6px; font-size: 15px; font-weight: 800; }
.countdown-units i { margin-top: -23px; font-size: 49px; font-style: normal; font-weight: 800; }
.no-next { margin: 40px auto 0; text-align: center; color: #dce5f7; font-size: 22px; font-weight: 800; }

.result-card { position: relative; min-height: 453px; border: 2px solid var(--navy); overflow: visible; padding-top: 20px; display: flex; flex-direction: column; }
.result-ribbon { position: absolute; z-index: 2; top: -1px; left: 50%; width: min(334px, 65%); height: 32px; transform: translateX(-50%); display: grid; place-items: center; color: #fff; background: var(--red); clip-path: polygon(7% 0,93% 0,100% 0,94% 100%,6% 100%,0 0); font-size: 21px; font-weight: 900; }
.result-meta { min-height: 74px; padding: 18px 22px 5px; text-align: center; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; color: var(--navy); }
.result-meta > span { justify-self: start; font-size: 12px; font-weight: 800; }
.result-meta > strong { font-size: 27px; line-height: 1; }
.result-meta > strong b { margin-left: 9px; padding: 5px 12px; color: #fff; background: var(--red); border-radius: 6px; }
.result-meta > small { justify-self: end; color: var(--muted); font-size: 11px; font-weight: 700; }
.first-prize { text-align: center; }
.first-prize h3, .secondary-prizes h3 { margin: 0 0 8px; display: flex; justify-content: center; align-items: center; gap: 13px; font-size: 21px; }
.first-prize h3::before, .first-prize h3::after, .secondary-prizes h3::before, .secondary-prizes h3::after { content: ""; width: 90px; max-width: 20%; height: 2px; background: #9fa9bd; }
.first-prize sup { font-size: .52em; }
.digit-row { display: flex; justify-content: center; min-width: 0; }
.digit-row span { display: grid; place-items: center; color: var(--navy); background: linear-gradient(#fff,#f4f5f7); border: 1px solid #d9dce2; border-radius: 7px; box-shadow: 0 3px 9px rgba(0,0,0,.15); font-weight: 900; }
.digit-row-large { gap: 14px; }
.digit-row-large span { width: 116px; max-width: 20%; height: 92px; font-size: 68px; }
.secondary-prizes { margin: 12px 34px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.secondary-prizes > div + div { border-left: 1px solid #aeb6c6; }
.digit-row-small { gap: 6px; }
.digit-row-small span { width: 63px; max-width: 21%; height: 57px; font-size: 42px; }
.bonus-panel { min-height: 124px; margin: 14px 7px 7px; padding: 9px 14px; display: grid; grid-template-columns: minmax(0,1fr) 74px minmax(0,1fr); align-items: center; gap: 10px; color: #fff; background: var(--navy); border-radius: 11px; }
.bonus-group { min-width: 0; }
.bonus-group h3 { margin: 0 0 9px; text-align: center; font-size: 16px; }
.bonus-numbers { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 6px 8px; text-align: center; }
.bonus-numbers span { min-width: 0; font-size: 14px; font-weight: 800; }
.trophy { height: 80px; border-left: 1px solid rgba(255,255,255,.28); border-right: 1px solid rgba(255,255,255,.28); display: flex; justify-content: center; align-items: center; }
.trophy svg { width: 58px; height: 72px; display: block; }
.trophy-cup { fill: #fff; }
.trophy-star { fill: var(--red); }

.history-table-wrap { flex: 1; min-height: 0; overflow: hidden; }
.history-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.history-table th { height: 53px; padding: 8px 9px; color: #fff; background: var(--navy); text-align: left; font-size: 13px; }
.history-table th:nth-child(1) { width: 26%; }
.history-table th:nth-child(2) { width: 46%; }
.history-table th:nth-child(3) { width: 28%; text-align: center; }
.history-table td { height: 51px; padding: 7px 10px; border-bottom: 1px solid var(--line); font-size: 16px; font-weight: 800; }
.history-table td:nth-child(3) { text-align: center; font-size: 19px; }
.history-table td small { margin-top: 3px; display: block; color: var(--muted); font-size: 11px; font-weight: 700; }
.history-table tbody tr:first-child td { color: var(--red); }
.view-all { min-height: 52px; margin-top: auto; display: flex; justify-content: center; align-items: center; gap: 17px; font-weight: 900; font-size: 16px; }
.view-all:hover { color: var(--red); }
.view-all b { color: var(--red); font-size: 37px; line-height: .7; }
.empty-state { min-height: 300px; display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; color: var(--muted); padding: 30px; }
.empty-state span { font-size: 42px; }
.empty-state strong { color: var(--navy); font-size: 20px; }
.empty-state p { margin: 0; }
.empty-state.compact { min-height: 180px; flex: 1; }

.site-footer { position: relative; min-height: 80px; padding: 0 21%; display: flex; align-items: center; justify-content: center; gap: 33px; color: #fff; background: var(--navy); overflow: hidden; }
.site-footer::before, .site-footer::after { content: ""; position: absolute; top: 0; width: 210px; height: 25px; background: linear-gradient(160deg, var(--red) 0 58%, #fff 59% 68%, var(--navy) 69%); }
.site-footer::before { left: 0; clip-path: polygon(0 0,82% 0,100% 100%,0 100%); }
.site-footer::after { right: 0; transform: scaleX(-1); clip-path: polygon(0 0,82% 0,100% 100%,0 100%); }
.footer-line { width: 170px; max-width: 20vw; height: 1px; background: #fff; opacity: .85; }
.footer-domain { white-space: nowrap; display: flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 800; letter-spacing: .3px; }
.footer-domain span { font-size: 30px; }

.page-shell { width: calc(100% - 48px); max-width: 1450px; min-height: 630px; margin: 28px auto 45px; }
.page-hero { padding: 25px 30px; color: #fff; background: linear-gradient(135deg,var(--navy),#0c326f); border-radius: 12px 12px 0 0; }
.page-hero h1 { margin: 0 0 6px; font-size: 31px; }
.page-hero p { margin: 0; color: #cbd7ee; }
.content-card { padding: 25px; background: #fff; border-radius: 0 0 12px 12px; box-shadow: var(--shadow); }
.filter-bar { margin-bottom: 22px; padding: 16px; display: grid; grid-template-columns: repeat(5,minmax(120px,1fr)); gap: 12px; background: #f4f6fa; border-radius: 9px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 12px; font-weight: 900; }
.field input, .field select, .field textarea { width: 100%; min-height: 42px; padding: 8px 11px; color: var(--navy); background: #fff; border: 1px solid #cbd1dd; border-radius: 6px; }
.btn { min-height: 42px; padding: 9px 17px; border: 0; border-radius: 6px; display: inline-flex; justify-content: center; align-items: center; gap: 7px; cursor: pointer; color: #fff; background: var(--navy); font-weight: 900; }
.btn:hover { filter: brightness(1.2); }
.btn-red { background: var(--red); }
.btn-light { color: var(--navy); background: #e3e7ee; }
.data-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.data-table { width: 100%; border-collapse: collapse; min-width: 820px; }
.data-table th { padding: 13px 12px; text-align: left; color: #fff; background: var(--navy); font-size: 13px; }
.data-table td { padding: 12px; border-bottom: 1px solid var(--line); font-weight: 700; }
.data-table tbody tr:hover { background: #f7f9fc; }
.tag { display: inline-flex; padding: 5px 9px; border-radius: 99px; color: #fff; background: var(--navy); font-size: 11px; font-weight: 900; }
.tag.red { background: var(--red); }
.live-draw-table-wrap { margin-top: 22px; }
.live-draw-table { min-width: 960px; }
.live-draw-table th:nth-child(6) { width: 210px; }
.next-day-row { background: #f4f7fc; }
.draw-date-value { display: block; }
.draw-day-label { margin-bottom: 3px; display: block; color: var(--red); font-size: 9px; font-weight: 900; letter-spacing: .6px; }
.published-number { color: var(--red); font-size: 20px; letter-spacing: 1px; }
.draw-message { color: var(--muted); font-size: 12px; }
.draw-message.live { color: var(--red); font-weight: 900; }
.inline-countdown { display: inline-grid; grid-template-columns: auto 6px auto 6px auto; align-items: center; gap: 3px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.inline-countdown > span { min-width: 38px; padding: 5px 4px; display: inline-flex; align-items: baseline; justify-content: center; gap: 2px; color: #fff; background: var(--navy); border-radius: 5px; }
.inline-countdown b { font-size: 15px; line-height: 1; }
.inline-countdown small { font-size: 8px; font-weight: 900; opacity: .75; }
.inline-countdown i { color: var(--navy); font-style: normal; font-weight: 900; }
.result-list { display: grid; gap: 18px; }
.full-result { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.full-result-head { padding: 13px 17px; display: flex; justify-content: space-between; gap: 18px; color: #fff; background: var(--navy); }
.full-result-head > * { min-width: 0; overflow-wrap: anywhere; }
.full-result-body { padding: 17px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.full-result-body > div { padding: 13px; text-align: center; background: #f4f6fa; border-radius: 7px; }
.full-result-body strong { display: block; margin-top: 5px; font-size: 26px; }
.prize-strips { grid-column: 1 / -1; display: grid !important; grid-template-columns: 1fr 1fr; gap: 15px; background: var(--navy) !important; color: #fff; }
.prize-strips span { display: inline-block; margin: 4px 6px; }
.pagination { margin-top: 22px; display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; }
.pagination a, .pagination span { min-width: 38px; height: 38px; display: grid; place-items: center; border-radius: 5px; background: #e9edf3; font-weight: 800; }
.pagination .active { color: #fff; background: var(--red); }
.nav-overlay { position: fixed; inset: 0; z-index: 14; background: rgba(0,12,40,.62); }
