@media (max-width: 1279px) {
  .header-inner { min-height: 94px; }
  .site-header { min-height: 94px; }
  .brand { width: 285px; flex-basis: 285px; }
  .brand img { width: 275px; height: 90px; }
  .primary-nav { height: 80px; }
  .nav-link { font-size: 15px; }
  .nav-icon { font-size: 23px; }
  .home-grid { grid-template-columns: 1fr 1fr; grid-template-areas: "center center" "schedule history"; max-width: 1050px; }
  .center-column { grid-area: center; }
  .schedule-card, .history-card { min-height: 610px; }
}

@media (max-width: 1100px) {
  .site-header, .header-inner { min-height: 80px; }
  .site-header.has-market-switcher { margin-bottom: 34px; }
  .header-inner { padding: 0 16px; justify-content: space-between; }
  .site-header::before, .site-header::after { height: 11px; }
  .brand { width: 235px; flex-basis: 235px; }
  .brand img { width: 225px; height: 74px; }
  .menu-toggle { position: relative; z-index: 23; width: 50px; height: 50px; padding: 8px; border: 0; border-radius: 8px; display: flex; flex-direction: column; justify-content: center; gap: 5px; color: #fff; background: var(--navy); }
  .menu-toggle span { width: 100%; height: 3px; background: #fff; border-radius: 3px; }
  .menu-toggle b { font-size: 8px; letter-spacing: 1px; }
  .primary-nav { position: fixed; z-index: 22; top: 0; right: 0; width: min(330px,86vw); height: 100vh; padding: 92px 18px 28px; display: flex; flex-direction: column; gap: 8px; background: #fff; box-shadow: -8px 0 30px rgba(0,0,0,.3); transform: translateX(110%); transition: transform .25s ease; overflow-y: auto; }
  .nav-open .primary-nav { transform: translateX(0); }
  .nav-link { flex: 0 0 62px; border: 0; border-radius: 8px; flex-direction: row; justify-content: flex-start; padding: 0 18px; font-size: 17px; }
  .nav-link.active::after { top: 13px; bottom: 13px; left: 0; right: auto; width: 5px; height: auto; }
  .nav-icon { width: 40px; text-align: center; }
  .market-switcher { right: 84px; bottom: -34px; }
  .filter-bar { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 768px) {
  .home-grid { width: calc(100% - 24px); margin-top: 16px; margin-bottom: 24px; grid-template-columns: minmax(0,1fr); grid-template-areas: "center" "schedule" "history"; gap: 16px; }
  .center-column { gap: 16px; }
  .countdown-card { min-height: 178px; padding: 15px 12px 12px; }
  .countdown-card h1 { gap: 8px; font-size: clamp(20px,6vw,27px); }
  .countdown-card h1 span { width: 22px; }
  .countdown-units { grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr); gap: 7px; }
  .countdown-units > div { width: auto; }
  .countdown-units strong { height: 72px; font-size: clamp(42px,13vw,58px); }
  .countdown-units i { font-size: 27px; }
  .countdown-units span { font-size: 12px; }
  .result-card { min-height: 0; }
  .result-meta { padding-top: 23px; grid-template-columns: 1fr; gap: 4px; }
  .result-meta > span, .result-meta > small { justify-self: center; }
  .result-meta > strong { font-size: 22px; }
  .digit-row-large { gap: 7px; padding: 0 9px; }
  .digit-row-large span { width: 22%; max-width: none; height: 72px; font-size: 52px; }
  .secondary-prizes { margin: 14px 12px 0; gap: 12px; }
  .digit-row-small span { height: 50px; font-size: 35px; }
  .bonus-panel { grid-template-columns: 1fr; gap: 14px; padding: 15px 14px; }
  .trophy { height: 48px; border: 0; border-top: 1px solid rgba(255,255,255,.3); border-bottom: 1px solid rgba(255,255,255,.3); flex-direction: row; gap: 4px; }
  .trophy svg { width: 44px; height: 44px; }
  .bonus-numbers span { font-size: 13px; }
  .schedule-card, .history-card { min-height: auto; }
  .schedule-timeline { min-height: 335px; }
  .site-footer { padding: 0 12px; min-height: 78px; }
  .site-footer::before, .site-footer::after { width: 90px; height: 14px; }
  .footer-line { display: none; }
  .footer-domain { font-size: 20px; }
  .page-shell { width: calc(100% - 24px); margin: 18px auto 30px; }
  .page-hero { padding: 21px 18px; }
  .content-card { padding: 15px; }
  .filter-bar { grid-template-columns: 1fr; }
  .full-result-head { flex-direction: column; gap: 4px; }
  .card-table-wrap { overflow: visible; border: 0; }
  .responsive-card-table, .responsive-card-table tbody { width: 100%; min-width: 0; display: block; }
  .responsive-card-table thead { display: none; }
  .responsive-card-table tbody { display: grid; gap: 12px; }
  .responsive-card-table tr { display: block; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 3px 10px rgba(0,21,66,.08); }
  .responsive-card-table td { min-height: 43px; padding: 9px 12px; display: flex; justify-content: space-between; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); text-align: right; overflow-wrap: anywhere; }
  .responsive-card-table td:last-child { border-bottom: 0; }
  .responsive-card-table td::before { content: attr(data-label); flex: 0 0 112px; color: var(--muted); text-align: left; font-size: 10px; font-weight: 900; letter-spacing: .35px; text-transform: uppercase; }
  .responsive-card-table .btn { min-height: 36px; padding: 7px 14px; }
  .live-draw-table { min-width: 0; }
  .full-result-body { grid-template-columns: 1fr; }
  .prize-strips { grid-column: auto; grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .history-table thead { display: none; }
  .history-table, .history-table tbody { display: block; }
  .history-table tr { margin: 10px 12px; padding: 12px; display: grid; grid-template-columns: 1fr 1.2fr .8fr; align-items: center; border: 1px solid var(--line); border-radius: 8px; }
  .history-table td { height: auto; padding: 4px; border: 0; font-size: 14px; }
  .history-table td:nth-child(3) { font-size: 17px; }
}

@media (max-width: 430px) {
  .brand { width: 210px; flex-basis: 210px; }
  .brand img { width: 205px; }
  .result-ribbon { width: 72%; font-size: 18px; }
  .result-meta > strong b { display: inline-block; margin: 7px 0 0; }
  .secondary-prizes { grid-template-columns: 1fr; gap: 15px; }
  .secondary-prizes > div + div { border-left: 0; border-top: 1px solid #aeb6c6; padding-top: 13px; }
  .schedule-timeline { padding-right: 14px; padding-left: 13px; }
  .schedule-date-context { padding-right: 14px; padding-left: 63px; }
  .schedule-item { grid-template-columns: 50px minmax(0,1fr) auto; }
  .schedule-item time { min-width: 62px; padding-inline: 7px; }
}
