:root {
    --smp-navy-950: #04132f;
    --smp-navy-900: #071a3d;
    --smp-navy-800: #0c2e66;
    --smp-blue-100: #dcecff;
    --smp-orange-500: #ff7200;
    --smp-orange-400: #ff9b16;
    --smp-gold-400: #ffbd32;
    --smp-cream-100: #fff8ed;
    --smp-ink: #10284d;
}

#myHeader.smp-site-header {
    position: relative;
    z-index: 50;
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: space-between;
    min-height: 112px;
    margin: -5px 0 0;
    padding: 16px clamp(18px, 4vw, 44px);
    border-top: 1px solid rgba(255, 174, 26, .75);
    border-bottom: 3px solid var(--smp-gold-400);
    background:
        radial-gradient(circle at 62% 18%, rgba(34, 91, 176, .25), transparent 34%),
        linear-gradient(118deg, #06142e 0%, #0b2d63 52%, #061737 100%) !important;
    box-shadow: 0 8px 22px rgba(4, 19, 47, .18);
    text-align: left;
}

#myHeader.smp-site-header::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .17;
    background-image:
        linear-gradient(115deg, transparent 0 48%, rgba(255, 255, 255, .14) 49%, transparent 50%),
        linear-gradient(35deg, transparent 0 72%, rgba(255, 255, 255, .08) 73%, transparent 74%);
    background-size: 42px 42px, 64px 64px;
    pointer-events: none;
}

#myHeader.smp-site-header .smp-site-brand {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    justify-content: start;
    gap: clamp(20px, 5vw, 62px);
    min-width: 0;
    margin: 0;
    color: #fff;
    text-transform: none;
}

#myHeader.smp-site-header .smp-site-brand img {
    position: static;
    display: block;
    width: clamp(122px, 17vw, 170px);
    height: auto;
    border: 0;
    border-radius: 0;
    filter: drop-shadow(0 5px 8px rgba(0, 0, 0, .2));
}

.smp-site-title {
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(30px, 5vw, 52px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.03em;
    white-space: nowrap;
    text-shadow: 0 3px 8px rgba(0, 0, 0, .24);
}

.smp-site-menu {
    position: relative;
    flex: 0 0 auto;
}

.smp-site-menu summary {
    display: grid;
    align-content: center;
    justify-content: center;
    gap: 6px;
    width: 64px;
    height: 64px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 14px;
    background: rgba(3, 19, 48, .32);
    box-shadow: inset 0 0 18px rgba(255, 255, 255, .035);
    cursor: pointer;
    list-style: none;
}

.smp-site-menu summary::-webkit-details-marker { display: none; }
.smp-site-menu summary::marker { content: ""; }

.smp-site-menu summary span {
    display: block;
    width: 29px;
    height: 3px;
    border-radius: 99px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}

.smp-site-menu[open] summary {
    border-color: rgba(255, 190, 44, .75);
    background: rgba(255, 255, 255, .1);
}

.smp-site-menu nav {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: min(270px, calc(100vw - 28px));
    overflow: hidden;
    border: 1px solid #d9e3f0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(4, 19, 47, .28);
}

#myHeader.smp-site-header .smp-site-menu nav a {
    display: block;
    margin: 0;
    padding: 12px 16px;
    border-bottom: 1px solid #edf1f7;
    color: var(--smp-ink);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
    text-transform: none;
}

#myHeader.smp-site-header .smp-site-menu nav a:last-child { border-bottom: 0; }
#myHeader.smp-site-header .smp-site-menu nav a:hover,
#myHeader.smp-site-header .smp-site-menu nav a:focus-visible {
    background: #fff7e9;
    color: #d95700;
}

.smp-home-page {
    background: #fff;
}

.smp-phase5-top {
    width: 100%;
    margin: 0 auto;
    padding: 18px clamp(14px, 2.4vw, 28px) 16px;
    background:
        radial-gradient(circle at 96% 20%, rgba(255, 177, 53, .07), transparent 26%),
        radial-gradient(circle at 3% 78%, rgba(51, 128, 229, .06), transparent 27%),
        linear-gradient(180deg, #fff 0%, #fbfcff 100%);
    color: var(--smp-ink);
}

.smp-phase5-top > * {
    width: min(100%, 1160px);
    margin-right: auto !important;
    margin-left: auto !important;
}

.smp-phase5-welcome {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 54px;
    align-items: center;
    gap: 12px;
    min-height: 106px;
    padding: 17px 26px;
    border: 1px solid #ffad45;
    border-radius: 22px;
    background:
        radial-gradient(circle at 8% 50%, rgba(255, 151, 25, .15), transparent 30%),
        linear-gradient(100deg, #fff 0%, var(--smp-cream-100) 50%, #fff3df 100%);
    box-shadow: 0 10px 20px rgba(93, 62, 11, .12), inset 0 1px 0 rgba(255, 255, 255, .9);
}

.smp-phase5-welcome h1 {
    margin: 0;
    color: #0a2d62;
    font-size: clamp(26px, 4.2vw, 42px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.025em;
    text-align: center;
}

.smp-phase5-welcome__icon {
    display: grid;
    place-items: center;
    color: var(--smp-orange-500);
    font-size: 32px;
    filter: saturate(1.2);
}

.smp-phase5-welcome__icon--end {
    font-size: 36px;
    transform: rotate(10deg);
}

.smp-phase5-information.keyword_top.smp-home-summary {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: start;
    gap: 20px;
    margin-top: 18px !important;
    padding: 26px 30px !important;
    overflow: visible;
    border: 1px solid #a9cffb !important;
    border-radius: 22px;
    background: #fff !important;
    color: var(--smp-ink) !important;
    box-shadow: 0 10px 24px rgba(15, 54, 104, .09);
    text-align: left;
}

.smp-phase5-information__icon {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    margin-top: 2px;
    border: 13px solid #d6e9ff;
    border-radius: 50%;
    background: #1671d9;
    color: #fff;
    font-family: Georgia, serif;
    font-size: 25px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 4px 12px rgba(24, 102, 190, .18);
}

.smp-phase5-information__content {
    min-width: 0;
    color: var(--smp-ink);
}

.smp-phase5-information__content > :first-child { margin-top: 0 !important; }
.smp-phase5-information__content > :last-child { margin-bottom: 0 !important; }

.smp-phase5-information__content p,
.smp-phase5-information__content li {
    margin: 0 !important;
    padding: 0 !important;
    color: var(--smp-ink) !important;
    font-size: clamp(16px, 2.3vw, 22px) !important;
    font-weight: 400 !important;
    line-height: 1.42 !important;
    letter-spacing: -.01em;
    text-align: left !important;
    text-shadow: none !important;
    text-transform: none !important;
    overflow-wrap: anywhere;
}

.smp-phase5-information__content h1,
.smp-phase5-information__content h2,
.smp-phase5-information__content h3 {
    margin: 0 0 10px !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    color: #0a2d62 !important;
    font-size: clamp(20px, 3vw, 28px) !important;
    line-height: 1.2 !important;
    text-align: left !important;
    text-shadow: none !important;
}

.smp-phase5-lucky {
    margin-top: 18px !important;
}

.smp-phase5-lucky__title.live_results {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 10px;
    min-height: 96px;
    margin: 0 0 16px !important;
    padding: 16px 22px !important;
    border: 3px solid #071a3d;
    border-radius: 22px;
    outline: 1px solid #f2a91d;
    outline-offset: -8px;
    background:
        radial-gradient(circle at 50% 130%, rgba(74, 131, 222, .35), transparent 36%),
        linear-gradient(112deg, #06152f 0%, #0d3674 50%, #071a3d 100%) !important;
    color: #fff !important;
    box-shadow: 0 9px 18px rgba(4, 19, 47, .22);
    font-size: clamp(24px, 3.9vw, 38px) !important;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
    text-decoration: none !important;
}

.smp-phase5-lucky__title::after {
    content: "◆";
    position: absolute;
    bottom: -11px;
    left: 50%;
    padding: 0 8px;
    color: var(--smp-gold-400);
    background: #fbfcff;
    font-size: 18px;
    line-height: 1;
    transform: translateX(-50%);
}

.smp-phase5-lucky__title > span {
    color: var(--smp-gold-400);
    font-size: 28px;
    text-shadow: 0 2px 5px rgba(255, 157, 0, .35);
}

.smp-phase5-lucky__panel.result_border {
    overflow: hidden;
    border: 1px solid #d5dbe4;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 22px rgba(13, 47, 89, .12);
}

.smp-phase5-lucky__grid.result_bg {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    padding: 20px 0 18px;
    border: 0;
    background:
        radial-gradient(ellipse at 0 100%, rgba(11, 63, 126, .055), transparent 36%),
        radial-gradient(ellipse at 100% 100%, rgba(11, 63, 126, .055), transparent 36%),
        #fff;
}

.smp-phase5-lucky__item.yellow_bg {
    position: relative;
    display: grid;
    align-content: center;
    min-width: 0;
    min-height: 142px;
    padding: 10px 24px !important;
    background: transparent;
    color: var(--smp-ink);
}

.smp-phase5-lucky__item + .smp-phase5-lucky__item {
    border-left: 1px solid #bec9d9;
}

.smp-phase5-lucky__item .result_timing {
    position: relative;
    width: max-content;
    max-width: 100%;
    margin: 0 auto 18px !important;
    padding: 0 0 10px;
    color: var(--smp-orange-500) !important;
    font-size: clamp(18px, 3vw, 27px) !important;
    font-weight: 800;
    line-height: 1.15;
}

.smp-phase5-lucky__item .result_timing::after {
    content: "";
    position: absolute;
    right: 10%;
    bottom: 0;
    left: 10%;
    height: 2px;
    border-radius: 99px;
    background: var(--smp-orange-500);
}

.smp-phase5-lucky__item .live_result_number {
    min-height: 52px;
    margin: 0 !important;
    color: #06285b !important;
    font-size: clamp(25px, 4.6vw, 44px) !important;
    font-weight: 900;
    font-style: italic;
    line-height: 1.1;
    letter-spacing: .01em;
}

.smp-phase5-lucky__item .live_result_number marquee {
    display: block;
    color: #06285b !important;
    font: inherit;
    line-height: 50px;
}

@media (max-width: 767px) {
    #myHeader.smp-site-header {
        flex-direction: row;
        min-height: 92px;
        padding: 13px 12px;
    }

    #myHeader.smp-site-header .smp-site-brand {
        grid-template-columns: 104px minmax(0, 1fr);
        gap: 12px;
    }

    #myHeader.smp-site-header .smp-site-brand img { width: 104px; }

    .smp-site-title {
        font-size: clamp(24px, 7vw, 34px);
        white-space: normal;
    }

    .smp-site-menu summary {
        width: 54px;
        height: 54px;
        border-radius: 12px;
    }

    .smp-site-menu summary span { width: 25px; }

    .smp-phase5-top { padding: 13px 9px 12px; }

    .smp-phase5-welcome {
        grid-template-columns: 36px minmax(0, 1fr) 36px;
        gap: 6px;
        min-height: 82px;
        padding: 12px 10px;
        border-radius: 17px;
    }

    .smp-phase5-welcome h1 {
        font-size: clamp(21px, 6.2vw, 29px);
        line-height: 1.12;
    }

    .smp-phase5-welcome__icon { font-size: 24px; }
    .smp-phase5-welcome__icon--end { font-size: 28px; }

    .smp-phase5-information.keyword_top.smp-home-summary {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 10px;
        margin-top: 12px !important;
        padding: 16px 13px !important;
        border-radius: 17px;
    }

    .smp-phase5-information__icon {
        width: 44px;
        height: 44px;
        border-width: 9px;
        font-size: 18px;
    }

    .smp-phase5-information__content p,
    .smp-phase5-information__content li {
        font-size: clamp(14px, 3.8vw, 17px) !important;
        line-height: 1.45 !important;
    }

    .smp-phase5-lucky { margin-top: 12px !important; }

    .smp-phase5-lucky__title.live_results {
        grid-template-columns: 28px minmax(0, 1fr) 28px;
        gap: 4px;
        min-height: 78px;
        margin-bottom: 12px !important;
        padding: 13px 10px !important;
        border-radius: 17px;
        outline-offset: -6px;
        font-size: clamp(20px, 5.7vw, 27px) !important;
    }

    .smp-phase5-lucky__title > span { font-size: 22px; }

    .smp-phase5-lucky__panel.result_border { border-radius: 17px; }
    .smp-phase5-lucky__grid.result_bg { padding: 12px 0 10px; }

    .smp-phase5-lucky__item.yellow_bg {
        width: auto;
        min-height: 116px;
        margin: 0;
        padding: 9px 8px !important;
    }

    .smp-phase5-lucky__item .result_timing {
        margin-bottom: 12px !important;
        padding-bottom: 8px;
        font-size: clamp(16px, 4.6vw, 21px) !important;
        line-height: 1.15;
    }

    .smp-phase5-lucky__item .live_result_number {
        min-height: 48px;
        font-size: clamp(23px, 7vw, 32px) !important;
    }
}

@media (max-width: 430px) {
    #myHeader.smp-site-header .smp-site-brand {
        grid-template-columns: 82px minmax(0, 1fr);
        gap: 9px;
    }

    #myHeader.smp-site-header .smp-site-brand img { width: 82px; }
    .smp-site-title { font-size: 23px; }
    .smp-site-menu summary { width: 48px; height: 48px; }
    .smp-site-menu summary span { width: 23px; height: 2px; }

    .smp-phase5-welcome {
        grid-template-columns: 30px minmax(0, 1fr) 30px;
        border-radius: 15px;
    }

    .smp-phase5-welcome h1 { font-size: clamp(19px, 5.6vw, 24px); }
    .smp-phase5-welcome__icon { font-size: 20px; }
    .smp-phase5-welcome__icon--end { font-size: 23px; }

    .smp-phase5-information.keyword_top.smp-home-summary {
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 8px;
        padding: 14px 10px !important;
    }

    .smp-phase5-information__icon {
        width: 36px;
        height: 36px;
        border-width: 7px;
        font-size: 15px;
    }

    .smp-phase5-information__content p,
    .smp-phase5-information__content li {
        font-size: 13px !important;
        line-height: 1.42 !important;
    }

    .smp-phase5-lucky__title.live_results {
        grid-template-columns: 22px minmax(0, 1fr) 22px;
        min-height: 68px;
        padding: 11px 8px !important;
        font-size: clamp(17px, 5vw, 22px) !important;
    }

    .smp-phase5-lucky__title > span { font-size: 18px; }

    .smp-phase5-lucky__item.yellow_bg {
        min-height: 104px;
        padding: 8px 5px !important;
    }

    .smp-phase5-lucky__item .result_timing { font-size: 15px !important; }
    .smp-phase5-lucky__item .live_result_number { font-size: clamp(20px, 6.4vw, 27px) !important; }
}

@media (prefers-reduced-motion: reduce) {
    .smp-site-menu *,
    .smp-phase5-top * { scroll-behavior: auto !important; }
}


/* --------------------------------------------------------------------------
   Phase 5 reference-parity patch — homepage top only.
   Strictly scoped so legacy/home sections below the Lucky Numbers card keep
   their verified styling and behaviour unchanged.
   -------------------------------------------------------------------------- */
.smp-home-page .smp-phase5-seo-h1 {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.smp-home-page #myHeader.smp-site-header .smp-site-brand img {
    mix-blend-mode: screen;
}

.smp-home-page .smp-phase5-welcome {
    overflow: hidden;
}

.smp-home-page .smp-phase5-welcome__track {
    min-width: 0;
    overflow: hidden;
}

.smp-home-page .smp-phase5-welcome__marquee {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    color: #0a2d62;
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(26px, 4.2vw, 42px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.025em;
    text-align: center;
    white-space: nowrap;
}

/* Keep the existing floating CTA functions, but never let them cover the
   reference top section while it is in view. */
.smp-home-page #myHeader.smp-site-header {
    z-index: 1200;
}

.smp-home-page .smp-phase5-top {
    position: relative;
    z-index: 1000;
}

/* Make the vertical lucky-number ticker show one complete row at a time. */
.smp-home-page .smp-phase5-lucky__item,
.smp-home-page .smp-phase5-lucky__item .live_result_number {
    overflow: hidden;
}

.smp-home-page .smp-phase5-lucky__item .live_result_number marquee {
    height: 50px !important;
    overflow: hidden;
}

@media (max-width: 767px) {
    .smp-home-page .smp-phase5-welcome__marquee {
        font-size: clamp(21px, 6.2vw, 29px);
        line-height: 1.12;
    }

    .smp-home-page .smp-phase5-lucky__title.live_results {
        min-height: 64px;
        padding: 10px 8px !important;
        font-size: clamp(16px, 4.35vw, 20px) !important;
        line-height: 1.18;
    }

    .smp-home-page .smp-phase5-lucky__title > span {
        font-size: 19px;
    }

    .smp-home-page .smp-phase5-lucky__item.yellow_bg {
        min-height: 104px;
        padding: 8px 6px !important;
    }

    .smp-home-page .smp-phase5-lucky__item .result_timing {
        margin-bottom: 10px !important;
        padding-bottom: 7px;
        font-size: clamp(15px, 4.2vw, 19px) !important;
    }

    .smp-home-page .smp-phase5-lucky__item .live_result_number {
        min-height: 44px;
        font-size: clamp(20px, 6.1vw, 28px) !important;
        line-height: 1.05;
    }

    .smp-home-page .smp-phase5-lucky__item .live_result_number marquee {
        height: 44px !important;
        line-height: 44px !important;
    }
}

@media (max-width: 430px) {
    .smp-home-page .smp-phase5-welcome__marquee {
        font-size: clamp(19px, 5.6vw, 24px);
    }

    .smp-home-page .smp-phase5-lucky__title.live_results {
        min-height: 60px;
        font-size: 15.5px !important;
        letter-spacing: -.015em;
    }

    .smp-home-page .smp-phase5-lucky__title > span {
        font-size: 17px;
    }

    .smp-home-page .smp-phase5-lucky__item.yellow_bg {
        min-height: 96px;
    }

    .smp-home-page .smp-phase5-lucky__item .result_timing {
        font-size: 14.5px !important;
    }

    .smp-home-page .smp-phase5-lucky__item .live_result_number {
        font-size: clamp(19px, 5.8vw, 25px) !important;
    }
}

/* 2026-08-18 rendered-reference calibration (mobile only).
   Measured against the approved 864×1536 reference screenshot at a 432 CSS px viewport. */
@media (max-width: 480px) {
    .smp-home-page #myHeader.smp-site-header {
        min-height: 64px;
        padding: 8px 10px;
    }

    .smp-home-page #myHeader.smp-site-header .smp-site-brand {
        grid-template-columns: 86px minmax(0, 1fr);
        gap: 11px;
    }

    .smp-home-page #myHeader.smp-site-header .smp-site-brand img {
        width: 86px;
    }

    .smp-home-page .smp-site-title {
        font-size: 22px;
        line-height: 1.04;
        white-space: nowrap;
    }

    .smp-home-page .smp-site-menu summary {
        width: 44px;
        height: 44px;
        border-radius: 11px;
    }

    .smp-home-page .smp-phase5-top {
        padding: 10px 8px 10px;
    }

    .smp-home-page .smp-phase5-welcome {
        grid-template-columns: 28px minmax(0, 1fr) 28px;
        gap: 5px;
        min-height: 52px;
        padding: 7px 9px;
        border-radius: 15px;
    }

    .smp-home-page .smp-phase5-welcome__marquee {
        font-size: 17px;
        line-height: 1.08;
    }

    .smp-home-page .smp-phase5-welcome__icon {
        font-size: 19px;
    }

    .smp-home-page .smp-phase5-welcome__icon--end {
        font-size: 19px;
    }

    .smp-home-page .smp-phase5-information.keyword_top.smp-home-summary {
        grid-template-columns: 37px minmax(0, 1fr);
        gap: 7px;
        min-height: 215px;
        margin-top: 8px !important;
        padding: 11px 9px !important;
        border-radius: 15px;
    }

    .smp-home-page .smp-phase5-information__icon {
        width: 34px;
        height: 34px;
        border-width: 6px;
        font-size: 15px;
    }

    .smp-home-page .smp-phase5-information__content p,
    .smp-home-page .smp-phase5-information__content li {
        font-size: 11.5px !important;
        line-height: 1.27 !important;
        letter-spacing: 0;
    }

    .smp-home-page .smp-phase5-information__content h1,
    .smp-home-page .smp-phase5-information__content h2,
    .smp-home-page .smp-phase5-information__content h3 {
        font-size: 14px !important;
        margin-bottom: 5px !important;
    }

    .smp-home-page .smp-phase5-lucky {
        margin-top: 8px !important;
    }

    .smp-home-page .smp-phase5-lucky__title.live_results {
        min-height: 50px;
        margin-bottom: 7px !important;
        padding: 7px 7px !important;
        border-radius: 15px;
        font-size: clamp(12.5px, 3.3vw, 14px) !important;
        line-height: 1.08;
        white-space: nowrap;
    }

    .smp-home-page .smp-phase5-lucky__title > span {
        font-size: 16px;
    }

    .smp-home-page .smp-phase5-lucky__title::after {
        bottom: -8px;
        font-size: 13px;
    }

    .smp-home-page .smp-phase5-lucky__panel.result_border {
        border-radius: 15px;
    }

    .smp-home-page .smp-phase5-lucky__grid.result_bg {
        padding: 5px 0 4px;
    }

    .smp-home-page .smp-phase5-lucky__item.yellow_bg {
        min-height: 78px;
        padding: 5px 4px !important;
    }

    .smp-home-page .smp-phase5-lucky__item .result_timing {
        margin-bottom: 7px !important;
        padding-bottom: 5px;
        font-size: 14px !important;
    }

    .smp-home-page .smp-phase5-lucky__item .live_result_number {
        min-height: 36px;
        font-size: 18.5px !important;
        line-height: 1.0;
    }

    .smp-home-page .smp-phase5-lucky__item .live_result_number marquee {
        height: 36px !important;
        line-height: 36px !important;
    }
}

@media (max-width: 480px) {
    .smp-home-page .smp-phase5-lucky__title::after {
        padding: 0 3px;
        bottom: -7px;
        font-size: 10px;
        background: #fbfcff;
    }

    .smp-home-page .smp-phase5-lucky__grid.result_bg {
        position: relative;
        background:
            repeating-radial-gradient(ellipse at -8% 105%, transparent 0 13px, rgba(10, 45, 98, .035) 14px 15px, transparent 16px 22px),
            repeating-radial-gradient(ellipse at 108% 105%, transparent 0 13px, rgba(10, 45, 98, .035) 14px 15px, transparent 16px 22px),
            #fff;
    }

    .smp-home-page .smp-phase5-lucky__grid.result_bg::before {
        content: "";
        position: absolute;
        z-index: 2;
        top: -4px;
        left: 50%;
        width: 7px;
        height: 7px;
        border: 1px solid #bec9d9;
        border-radius: 50%;
        background: #fff;
        transform: translateX(-50%);
        pointer-events: none;
    }
}

@media (max-width: 330px) {
    .smp-home-page .smp-phase5-lucky__title.live_results {
        grid-template-columns: 18px minmax(0, 1fr) 18px;
        gap: 2px;
        font-size: 11.5px !important;
    }

    .smp-home-page .smp-phase5-lucky__title > span {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .smp-home-page .smp-phase5-lucky__grid.result_bg {
        background:
            repeating-radial-gradient(ellipse at -10% 112%, transparent 0 20px, rgba(10, 45, 98, .018) 21px 22px, transparent 23px 34px),
            repeating-radial-gradient(ellipse at 110% 112%, transparent 0 20px, rgba(10, 45, 98, .018) 21px 22px, transparent 23px 34px),
            #fff;
    }
}

/* 2026-08-18 cross-device continuity gate.
   Keeps wide phones / foldables / mobile landscape in the same visual system
   as the approved mobile reference instead of jumping to the large tablet scale. */
@media (min-width: 481px) and (max-width: 767px) {
    .smp-home-page #myHeader.smp-site-header {
        min-height: 74px;
        padding: 9px 12px;
    }

    .smp-home-page #myHeader.smp-site-header .smp-site-brand {
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 12px;
    }

    .smp-home-page #myHeader.smp-site-header .smp-site-brand img {
        width: 96px;
    }

    .smp-home-page .smp-site-title {
        font-size: clamp(23px, 4.6vw, 28px);
        line-height: 1.04;
        white-space: nowrap;
    }

    .smp-home-page .smp-site-menu summary {
        width: 48px;
        height: 48px;
        border-radius: 11px;
    }

    .smp-home-page .smp-phase5-top {
        padding: 11px 9px 11px;
    }

    .smp-home-page .smp-phase5-welcome {
        grid-template-columns: 32px minmax(0, 1fr) 32px;
        gap: 6px;
        min-height: 60px;
        padding: 8px 10px;
        border-radius: 16px;
    }

    .smp-home-page .smp-phase5-welcome__marquee {
        font-size: clamp(18px, 3.7vw, 22px);
        line-height: 1.08;
    }

    .smp-home-page .smp-phase5-welcome__icon,
    .smp-home-page .smp-phase5-welcome__icon--end {
        font-size: 20px;
    }

    .smp-home-page .smp-phase5-information.keyword_top.smp-home-summary {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 9px;
        margin-top: 9px !important;
        padding: 13px 11px !important;
        border-radius: 16px;
    }

    .smp-home-page .smp-phase5-information__icon {
        width: 39px;
        height: 39px;
        border-width: 7px;
        font-size: 16px;
    }

    .smp-home-page .smp-phase5-information__content p,
    .smp-home-page .smp-phase5-information__content li {
        font-size: clamp(12.5px, 2.5vw, 14px) !important;
        line-height: 1.32 !important;
        letter-spacing: 0;
    }

    .smp-home-page .smp-phase5-information__content h1,
    .smp-home-page .smp-phase5-information__content h2,
    .smp-home-page .smp-phase5-information__content h3 {
        font-size: 15px !important;
        margin-bottom: 5px !important;
    }

    .smp-home-page .smp-phase5-lucky {
        margin-top: 9px !important;
    }

    .smp-home-page .smp-phase5-lucky__title.live_results {
        grid-template-columns: 25px minmax(0, 1fr) 25px;
        gap: 5px;
        min-height: 56px;
        margin-bottom: 8px !important;
        padding: 8px 9px !important;
        border-radius: 16px;
        font-size: clamp(14px, 2.75vw, 18px) !important;
        line-height: 1.08;
        white-space: nowrap;
    }

    .smp-home-page .smp-phase5-lucky__title > span {
        font-size: 18px;
    }

    .smp-home-page .smp-phase5-lucky__title::after {
        bottom: -8px;
        padding: 0 4px;
        font-size: 11px;
    }

    .smp-home-page .smp-phase5-lucky__panel.result_border {
        border-radius: 16px;
    }

    .smp-home-page .smp-phase5-lucky__grid.result_bg {
        padding: 7px 0 6px;
    }

    .smp-home-page .smp-phase5-lucky__item.yellow_bg {
        min-height: 88px;
        padding: 6px 6px !important;
    }

    .smp-home-page .smp-phase5-lucky__item .result_timing {
        margin-bottom: 8px !important;
        padding-bottom: 6px;
        font-size: clamp(14px, 2.7vw, 17px) !important;
    }

    .smp-home-page .smp-phase5-lucky__item .live_result_number {
        min-height: 40px;
        font-size: clamp(20px, 4.3vw, 25px) !important;
        line-height: 1;
    }

    .smp-home-page .smp-phase5-lucky__item .live_result_number marquee {
        height: 40px !important;
        line-height: 40px !important;
    }
}

/* Phone landscape continuity: modern phones can expose 800–950 CSS px in
   landscape. Keep them on the compact mobile visual scale, not tablet scale. */
@media (orientation: landscape) and (max-height: 500px) and (min-width: 768px) and (max-width: 950px) {
    .smp-home-page #myHeader.smp-site-header {
        min-height: 70px;
        padding: 8px 13px;
    }

    .smp-home-page #myHeader.smp-site-header .smp-site-brand {
        grid-template-columns: 94px minmax(0, 1fr);
        gap: 12px;
    }

    .smp-home-page #myHeader.smp-site-header .smp-site-brand img {
        width: 94px;
    }

    .smp-home-page .smp-site-title {
        font-size: 26px;
        line-height: 1.04;
        white-space: nowrap;
    }

    .smp-home-page .smp-site-menu summary {
        width: 46px;
        height: 46px;
        border-radius: 11px;
    }

    .smp-home-page .smp-phase5-top {
        padding: 10px 10px 11px;
    }

    .smp-home-page .smp-phase5-welcome {
        grid-template-columns: 32px minmax(0, 1fr) 32px;
        gap: 6px;
        min-height: 58px;
        padding: 8px 11px;
        border-radius: 16px;
    }

    .smp-home-page .smp-phase5-welcome__marquee {
        font-size: 20px;
        line-height: 1.08;
    }

    .smp-home-page .smp-phase5-welcome__icon,
    .smp-home-page .smp-phase5-welcome__icon--end {
        font-size: 20px;
    }

    .smp-home-page .smp-phase5-information.keyword_top.smp-home-summary {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 9px;
        margin-top: 9px !important;
        padding: 12px 12px !important;
        border-radius: 16px;
    }

    .smp-home-page .smp-phase5-information__icon {
        width: 39px;
        height: 39px;
        border-width: 7px;
        font-size: 16px;
    }

    .smp-home-page .smp-phase5-information__content p,
    .smp-home-page .smp-phase5-information__content li {
        font-size: 13px !important;
        line-height: 1.3 !important;
        letter-spacing: 0;
    }

    .smp-home-page .smp-phase5-lucky {
        margin-top: 9px !important;
    }

    .smp-home-page .smp-phase5-lucky__title.live_results {
        grid-template-columns: 25px minmax(0, 1fr) 25px;
        gap: 5px;
        min-height: 54px;
        margin-bottom: 8px !important;
        padding: 8px 10px !important;
        border-radius: 16px;
        font-size: clamp(15px, 2vw, 17px) !important;
        line-height: 1.08;
        white-space: nowrap;
    }

    .smp-home-page .smp-phase5-lucky__title > span {
        font-size: 18px;
    }

    .smp-home-page .smp-phase5-lucky__title::after {
        bottom: -8px;
        padding: 0 4px;
        font-size: 11px;
    }

    .smp-home-page .smp-phase5-lucky__panel.result_border {
        border-radius: 16px;
    }

    .smp-home-page .smp-phase5-lucky__grid.result_bg {
        padding: 7px 0 6px;
    }

    .smp-home-page .smp-phase5-lucky__item.yellow_bg {
        min-height: 86px;
        padding: 6px !important;
    }

    .smp-home-page .smp-phase5-lucky__item .result_timing {
        margin-bottom: 8px !important;
        padding-bottom: 6px;
        font-size: 16px !important;
    }

    .smp-home-page .smp-phase5-lucky__item .live_result_number {
        min-height: 40px;
        font-size: 24px !important;
        line-height: 1;
    }

    .smp-home-page .smp-phase5-lucky__item .live_result_number marquee {
        height: 40px !important;
        line-height: 40px !important;
    }
}
