/* Phone nudges (inc/mx-nudge.php): the Today ticker, the highlighted Today tab and the install sheet. Below 768 px only.
   Palette as the bar: green #173F35 / #0F2B24, gold #F3C95B, cream #F5F0E4, live red #D0161F. */
.mxn-tick, .mxn-sheet { display: none; }

@media (max-width: 767px) {
    /* ---------- the Today tab as the main button: dark pill, gold icon, pulsing ring and a "new" badge ---------- */
    .mxt-appnav { border-top: 0; box-shadow: 0 -1px 0 #F3C95B, 0 -8px 22px rgba(15, 43, 36, .14); }
    .mxt-appnav a.mxn-hero { position: relative; font-weight: 700; color: #0F2B24 !important; }
    .mxt-appnav a.mxn-hero .mxt-appnav__pill { position: relative; color: #FFD54A; background: linear-gradient(180deg, #1F5245, #0F2B24); box-shadow: 0 4px 12px rgba(15, 43, 36, .45), inset 0 0 0 1.5px #F3C95B; }
    .mxt-appnav a.mxn-hero .mxt-i { stroke-width: 2.3; }
    .mxt-appnav a.mxn-dot .mxt-appnav__pill::before { content: ""; position: absolute; inset: -3px; border-radius: 19px; border: 2px solid #F3C95B; animation: mxn-ring 2.4s ease-out infinite; }
    .mxt-appnav a.mxn-dot .mxt-appnav__pill::after { content: "ໃໝ່"; position: absolute; top: -9px; right: -12px; padding: 1px 6px; font: 700 10px/1.5 Phetsarath, sans-serif; color: #fff; background: #E3141D; border: 2px solid #fff; border-radius: 999px; box-shadow: 0 2px 6px rgba(227, 20, 29, .45); }
    .mxt-appnav a.mxn-bounce .mxt-appnav__pill { animation: mxn-bounce 1.1s cubic-bezier(.3, 1.6, .5, 1) .8s 3; }
    @keyframes mxn-ring { 0% { opacity: .95; transform: scale(1); } 80%, 100% { opacity: 0; transform: scale(1.45, 1.7); } }
    @keyframes mxn-bounce { 0%, 100% { transform: none; } 40% { transform: translateY(-7px) scale(1.08); } 70% { transform: translateY(1px); } }

    /* ---------- ticker: bright gold strip docked on the bar, with a notch pointing at the Today button ---------- */
    body.mxn-has-tick { padding-bottom: calc(130px + env(safe-area-inset-bottom, 0px)); }
    .mxn-tick { display: flex; position: fixed; z-index: 9989; left: 8px; right: 8px; bottom: calc(84px + env(safe-area-inset-bottom, 0px));
        align-items: stretch; height: 46px; font-family: Phetsarath, sans-serif; color: #0F2B24;
        background: linear-gradient(100deg, #FFE27A 0%, #F7C934 55%, #F0B414 100%); border-radius: 14px;
        box-shadow: 0 10px 26px rgba(240, 180, 20, .45), 0 0 0 1.5px #0F2B24; transform: translateY(16px); opacity: 0;
        transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .25s ease; }
    .mxn-tick::after { content: ""; position: absolute; left: calc(10vw - 16px); bottom: -8px; width: 14px; height: 14px; background: #F7C934; transform: rotate(45deg); box-shadow: 1.5px 1.5px 0 #0F2B24; border-radius: 0 0 3px 0; }
    .mxn-tick[hidden] { display: none; }
    .mxn-tick.is-in { transform: none; opacity: 1; animation: mxn-call 6s ease-in-out 1.2s infinite; }
    @keyframes mxn-call { 0%, 88%, 100% { transform: none; } 91% { transform: translateY(-4px); } 94% { transform: none; } 97% { transform: translateY(-2px); } }
    .mxn-tick__go { position: relative; overflow: hidden; flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0 4px 0 6px; color: inherit !important; text-decoration: none !important; border-radius: 14px 0 0 14px; -webkit-tap-highlight-color: transparent; }
    .mxn-tick__go::before { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .75), transparent); transform: skewX(-20deg); animation: mxn-shine 5s ease-in-out 2s infinite; pointer-events: none; }
    @keyframes mxn-shine { 0%, 70% { left: -40%; } 100% { left: 130%; } }
    .mxn-tick__tag { flex: none; padding: 5px 9px; font-size: 12px; font-weight: 700; line-height: 1.2; color: #FFD54A; background: #0F2B24; border-radius: 9px; }
    .mxn-tick__win { position: relative; flex: 1; min-width: 0; height: 100%; overflow: hidden; }
    .mxn-tick__it { position: absolute; inset: 0; display: flex; align-items: center; gap: 6px; white-space: nowrap; opacity: 0; transform: translateY(100%); transition: transform .45s cubic-bezier(.2, .8, .2, 1), opacity .3s ease; }
    .mxn-tick__it.is-on { opacity: 1; transform: none; }
    .mxn-tick__it small { overflow: hidden; text-overflow: ellipsis; font-size: 12px; font-weight: 700; color: #4A3A05; }
    .mxn-tick__it b { font-size: 17px; font-variant-numeric: tabular-nums; color: #0F2B24; }
    .mxn-tick__it em { font-style: normal; font-size: 11px; color: #4A3A05; }
    .mxn-tick__more { flex: none; padding: 5px 10px; font-size: 12px; font-weight: 700; color: #fff; background: #0F2B24; border-radius: 999px; }
    .mxn-tick__x, .mxn-tick__x:hover, .mxn-tick__x:focus { flex: none; width: 34px; margin: 0; padding: 0; font: 400 20px/1 sans-serif; color: rgba(15, 43, 36, .65); background: none; border: 0; border-left: 1px solid rgba(15, 43, 36, .18); border-radius: 0 14px 14px 0; }

    /* draw time: red, white text */
    .mxn-tick.is-live { color: #fff; background: linear-gradient(100deg, #FF3B3B, #D0161F 60%, #A50E15); box-shadow: 0 10px 26px rgba(208, 22, 31, .5), 0 0 0 1.5px #5E0509; }
    .mxn-tick.is-live::after { background: #D0161F; box-shadow: 1.5px 1.5px 0 #5E0509; }
    .mxn-tick.is-live .mxn-tick__tag { color: #D0161F; background: #fff; }
    .mxn-tick.is-live .mxn-tick__more { color: #D0161F; background: #fff; }
    .mxn-tick.is-live .mxn-tick__x { color: rgba(255, 255, 255, .8); border-left-color: rgba(255, 255, 255, .25); }
    .mxn-tick__lot b { color: #fff; font-size: 14px; }
    .mxn-tick__lot small { color: #FFD9DB; }
    .mxn-tick__lot i { width: 9px; height: 9px; flex: none; background: #fff; border-radius: 50%; animation: mxn-blink 1s steps(2, start) infinite; }
    @keyframes mxn-blink { to { opacity: .2; } }

    /* ---------- install sheet: dark green "app preview" header, live figures, big gold button ---------- */
    .mxn-sheet { display: block; position: fixed; z-index: 9995; inset: 0; font-family: Phetsarath, sans-serif; }
    .mxn-sheet[hidden] { display: none; }
    .mxn-sheet__scrim, .mxn-sheet__scrim:hover, .mxn-sheet__scrim:focus { position: absolute; inset: 0; width: 100%; margin: 0; padding: 0; background: rgba(6, 18, 14, .68); border: 0; border-radius: 0; opacity: 0; transition: opacity .3s ease; backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
    .mxn-sheet__panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 94vh; overflow: auto; color: #15181C; background: #F5F0E4; border-radius: 26px 26px 0 0; outline: 0;
        box-shadow: 0 -12px 40px rgba(0, 0, 0, .35); transform: translateY(105%); transition: transform .5s cubic-bezier(.18, 1.25, .4, 1); }
    .mxn-sheet.is-open .mxn-sheet__scrim { opacity: 1; }
    .mxn-sheet.is-open .mxn-sheet__panel { transform: none; }

    .mxn-sheet__hero { position: relative; overflow: hidden; padding: 10px 18px 18px; text-align: center; color: #F5F0E4; background: radial-gradient(120% 90% at 50% 0%, #2B6B59 0%, #173F35 45%, #0B231D 100%); }
    .mxn-sheet__glow { position: absolute; top: -90px; left: 50%; width: 320px; height: 320px; margin-left: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(243, 201, 91, .45), rgba(243, 201, 91, 0) 65%); animation: mxn-glow 4s ease-in-out infinite alternate; pointer-events: none; }
    @keyframes mxn-glow { to { transform: scale(1.15); opacity: .7; } }
    .mxn-sheet__hero > * { position: relative; }
    .mxn-sheet__hero > .mxn-sheet__glow { position: absolute; }
    .mxn-sheet__grab { display: block; width: 40px; height: 4px; margin: 0 auto 10px; background: rgba(245, 240, 228, .35); border-radius: 4px; }
    .mxn-sheet__x, .mxn-sheet__x:hover, .mxn-sheet__x:focus { position: absolute; z-index: 2; top: 12px; right: 12px; width: 36px; height: 36px; margin: 0; padding: 0; font: 400 22px/1 sans-serif; color: #F5F0E4; background: rgba(255, 255, 255, .14); border: 0; border-radius: 50%; }
    .mxn-sheet__brand { display: inline-block; margin: 4px 0 10px; }
    .mxn-sheet__brand img { display: block; width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 0 0 3px #F3C95B, 0 10px 28px rgba(0, 0, 0, .45); }
    .mxn-sheet.is-open .mxn-sheet__brand img { animation: mxn-pop .7s cubic-bezier(.2, 1.6, .4, 1) .25s both; }
    @keyframes mxn-pop { from { transform: scale(.4) rotate(-12deg); opacity: 0; } }
    .mxn-sheet__free { position: absolute; top: -6px; right: -22px; padding: 2px 8px; font-size: 11px; font-weight: 700; line-height: 1.5; color: #fff; background: #E3141D; border: 2px solid #0F2B24; border-radius: 999px; transform: rotate(8deg); }
    .mxn-sheet__t { display: block; font-size: 22px; line-height: 1.35; color: #FFE27A; }
    .mxn-sheet__t span { font-size: 16px; color: #F5F0E4; }
    .mxn-sheet__phone { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px auto 0; padding: 10px; max-width: 330px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(243, 201, 91, .35); border-radius: 18px; }
    .mxn-sheet__phone span { display: block; padding: 8px 10px; text-align: left; background: #FFFDF8; border-radius: 12px; box-shadow: 0 4px 10px rgba(0, 0, 0, .18); }
    .mxn-sheet.is-open .mxn-sheet__phone span { animation: mxn-rise .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(.45s + var(--d) * .1s); }
    @keyframes mxn-rise { from { opacity: 0; transform: translateY(12px); } }
    .mxn-sheet__phone small { display: block; overflow: hidden; font-size: 11px; line-height: 1.4; white-space: nowrap; text-overflow: ellipsis; color: #5D6A63; }
    .mxn-sheet__phone b { display: block; font-size: 17px; line-height: 1.3; font-variant-numeric: tabular-nums; color: #0F2B24; }

    .mxn-sheet__body { padding: 14px 18px calc(16px + env(safe-area-inset-bottom, 0px)); }
    .mxn-sheet__why { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .mxn-sheet__why li { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; font-size: 12.5px; font-weight: 700; line-height: 1.35; text-align: center; background: #FFFDF8; border: 1px solid #E4DCCB; border-radius: 14px; }
    .mxn-sheet__why i { display: grid; place-items: center; width: 36px; height: 36px; color: #fff; border-radius: 11px; }
    .mxn-sheet__why i .mxt-i { width: 21px; height: 21px; }
    .mxn-sheet__why small { display: block; font-size: 11px; font-weight: 400; color: #5D6A63; }
    .mxn-sheet__how:empty { display: none; }
    .mxn-sheet__how { margin: 0 0 12px; padding: 12px 14px; font-size: 14px; line-height: 1.6; background: #FFF6DB; border: 2px dashed #E2B93B; border-radius: 14px; }
    .mxn-sheet__how p { margin: 0; }
    .mxn-sheet__how ol { margin: 0; padding: 0; list-style: none; counter-reset: s; }
    .mxn-sheet__how li { position: relative; padding-left: 34px; counter-increment: s; }
    .mxn-sheet__how li::before { content: counter(s); position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 24px; height: 24px; font-size: 13px; font-weight: 700; color: #0F2B24; background: #F3C95B; border-radius: 50%; }
    .mxn-sheet__how li + li { margin-top: 8px; }
    .mxn-sheet__how svg { vertical-align: -3px; color: #1D6FD6; }
    .mxn-sheet__go, .mxn-sheet__go:hover, .mxn-sheet__go:focus { position: relative; overflow: hidden; display: block; width: 100%; margin: 0 0 6px; padding: 17px; font: 700 18px/1.2 Phetsarath, sans-serif; color: #0F2B24; background: linear-gradient(180deg, #FFE27A, #F3C95B 55%, #E9B422); border: 0; border-radius: 999px; box-shadow: 0 0 0 2px #0F2B24, 0 10px 24px rgba(233, 180, 34, .55); animation: mxn-cta 2.2s ease-in-out 1.2s infinite; }
    .mxn-sheet__go::after { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .85), transparent); transform: skewX(-20deg); animation: mxn-shine 3.2s ease-in-out 1s infinite; }
    .mxn-sheet__go span { position: relative; z-index: 1; }
    @keyframes mxn-cta { 0%, 100% { transform: none; } 50% { transform: scale(1.03); } }
    .mxn-sheet__go[hidden] { display: none; }
    .mxn-sheet__note { margin: 0 0 4px; font-size: 12px; text-align: center; color: #5D6A63; }
    .mxn-sheet__later, .mxn-sheet__later:hover, .mxn-sheet__later:focus { display: block; width: 100%; margin: 0; padding: 10px; font: 400 14px/1.2 Phetsarath, sans-serif; color: #7A8279; background: none; border: 0; }
    .mxn-sheet__go:focus-visible, .mxn-sheet__later:focus-visible, .mxn-sheet__x:focus-visible, .mxn-tick__go:focus-visible, .mxn-tick__x:focus-visible { outline: 3px solid #1D6FD6; outline-offset: 2px; }
}
@media (prefers-reduced-motion: reduce) {
    .mxt-appnav a.mxn-bounce .mxt-appnav__pill, .mxn-tick__lot i, .mxn-tick.is-in, .mxn-tick__go::before, .mxt-appnav a.mxn-dot .mxt-appnav__pill::before, .mxn-sheet__glow, .mxn-sheet__brand img, .mxn-sheet__phone span, .mxn-sheet__go, .mxn-sheet__go::after { animation: none !important; }
    .mxn-tick, .mxn-tick__it, .mxn-sheet__panel, .mxn-sheet__scrim { transition: none; }
}
