/* Denshub Phase 1 — homepage-only mobile UI (reference: 328px screenshots).
   Other pages, desktop and admin remain unaffected. */
@media (max-width: 575.98px) {
  body.dhm-homepage { --dhm-green:#9dff00; --dhm-lime:#abff16; --dhm-dark:#06112b; --dhm-blue:#063dd0; --dhm-edge:#0089ff; color:#fff; }
  body.dhm-homepage #wrapper { overflow:visible!important; }
  body.dhm-homepage .mcp-top-header > header.d-block.d-sm-none { display:none!important; }
  body.dhm-homepage .dhm-mobile-top { display:block; width:100%; }
  body.dhm-homepage .dhm-promo-band { height:44px; display:flex; align-items:center; padding:0 7px 0 2px; gap:8px; background:linear-gradient(180deg,#123dc5 0%,#061a59 70%,#01091d 100%); border-bottom:1px solid rgba(70,155,255,.22); box-shadow:inset 0 1px rgba(255,255,255,.17); }
  body.dhm-homepage .dhm-close-promo { width:15px;flex:0 0 15px;color:#fff;font-size:20px;line-height:1;background:none;border:0;padding:0;align-self:flex-start;cursor:pointer; }
  body.dhm-homepage .dhm-promo-icon { flex:0 0 41px;text-align:center;font-size:29px;color:#7cfd35;text-shadow:0 2px 4px #000; }
  body.dhm-homepage .dhm-promo-chat { color:#fe700d; }
  body.dhm-homepage .dhm-promo-copy { flex:1;min-width:0;line-height:1.12; }
  body.dhm-homepage .dhm-promo-copy strong { display:block;color:white;font-size:12px;font-weight:800;letter-spacing:.1px;white-space:nowrap; }
  body.dhm-homepage .dhm-promo-copy small { display:block;margin-top:4px;color:#fff;font-size:9px;font-weight:600;white-space:nowrap; }
  body.dhm-homepage .dhm-promo-action { flex:0 0 auto;display:flex;align-items:center;justify-content:center;min-width:64px;height:25px;padding:0 10px;border-radius:20px;background:linear-gradient(#ff481d,#af0000);border:1px solid #a41418;box-shadow:inset 0 1px 1px rgba(255,255,255,.35);color:white!important;font-size:9px;font-weight:800;text-decoration:none; }
  body.dhm-homepage .dhm-promo-action-disabled {opacity:.75;cursor:default;}
  body.dhm-homepage .dhm-mobile-brand { position:sticky;top:0;z-index:1050;height:55px;text-align:center;background:linear-gradient(180deg,#00206c 0%,#0935a5 74%,#071e5c 100%);box-shadow:0 2px 4px #0008;display:flex!important;align-items:center;justify-content:center; }
  body.dhm-homepage .dhm-mobile-brand a { display:flex;align-items:center;justify-content:center;max-width:55%;height:100%; }
  body.dhm-homepage .dhm-mobile-brand img { width:auto;max-width:100%;max-height:43px;object-fit:contain; }
  body.dhm-homepage .dhm-mobile-brand strong { color:var(--dhm-green);font-size:19px;text-shadow:0 0 4px #5cc5ff; }
  body.dhm-homepage .dhm-mobile-news { height:22px;background:#03070a;display:flex!important;align-items:center;overflow:hidden;color:#ddd;font-weight:800;font-size:11px; }
  body.dhm-homepage .dhm-news-icon { padding:0 5px;color:var(--dhm-green); }
  body.dhm-homepage .dhm-mobile-news marquee {flex:1;min-width:0;line-height:21px;}
  /* Existing hero slider remains driven by tb_slide in admin. */
  body.dhm-homepage .containerslide { width:100%!important;max-width:none!important;padding:0!important;margin:0!important;border:0!important;border-radius:0!important; }
  body.dhm-homepage .containerslide .carousel-inner,body.dhm-homepage .containerslide .carousel-item,body.dhm-homepage .containerslide .carouselborder { border-radius:0!important; }
  body.dhm-homepage .containerslide img { width:100%;height:auto;display:block;object-fit:cover; }
  body.dhm-homepage .dhm-mobile-content { padding:0 0 calc(70px + env(safe-area-inset-bottom, 0px));background:transparent; }
  body.dhm-homepage .dhm-entry { margin:0;padding:7px 8px 12px;background:rgba(0,8,24,.35); }
  body.dhm-homepage .dhm-login { display:flex;flex-direction:column;gap:6px;margin:0; }
  body.dhm-homepage .dhm-field { display:flex;align-items:center;gap:8px;margin:0;background:#fff;min-height:37px;height:48px;border:1px solid #9b9fbb;border-radius:5px;padding:0 12px;box-shadow:0 1px 2px #0004;color:#8a8e96; }
  body.dhm-homepage .dhm-field i {font-size:14px;flex:0 0 14px;}
  body.dhm-homepage .dhm-field input {height:100%;border:0!important;outline:0!important;box-shadow:none!important;flex:1;min-width:0;font-size:12px;background:transparent!important;color:#16243b!important;padding:0!important;}
  body.dhm-homepage .dhm-field input::placeholder {color:#6f7890;opacity:1;}
  body.dhm-homepage .dhm-show-pass {border:0;background:none;color:#8e97aa;padding:4px;line-height:1;cursor:pointer;}
  body.dhm-homepage .dhm-primary-btn,body.dhm-homepage .dhm-secondary-btn {width:100%;height:40px;display:flex;align-items:center;justify-content:center;border-radius:6px;margin-top:6px;font-weight:800;font-size:12px;text-decoration:none!important;}
  body.dhm-homepage .dhm-primary-btn {border:0;color:#031720;background:linear-gradient(110deg,#9cff00 0%,#abfa14 60%,#cbff63 100%);}
  body.dhm-homepage .dhm-secondary-btn {color:#fff!important;background:linear-gradient(110deg,#07112e 0%,#081633 59%,#42547a 80%,#0e1330 100%);border:1px solid #92dd00;}
  body.dhm-homepage .dhm-app-btn { margin-top:6px; }
  body.dhm-homepage .dhm-wap-link {display:block;text-align:center;font-size:11px;font-weight:700;text-decoration:underline;color:#eee!important;margin:6px auto 0;}
  body.dhm-homepage .dhm-signed-in {border-radius:8px;border:1px solid #096fd2;background:rgba(4,15,50,.95);padding:12px 9px;text-align:center;}
  body.dhm-homepage .dhm-signed-in p {margin:0 0 9px;}
  body.dhm-homepage .dhm-signed-actions {display:flex;gap:5px;}
  body.dhm-homepage .dhm-signed-actions a {flex:1;border-radius:5px;padding:7px 2px;background:var(--dhm-green);color:#00142e!important;font-size:10px;font-weight:800;}
  body.dhm-homepage .dhm-categories {position:sticky;top:55px;z-index:1049;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;padding:6px 9px;background:rgba(0,13,48,.98);border-bottom:1px solid rgba(46,194,255,.5);box-shadow:0 4px 5px #0009; }
  body.dhm-homepage .dhm-category {height:47px;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;border:2px solid #6ad400;border-radius:5px;background:linear-gradient(135deg,#d7ff5b 0%,#aaff00 37%,#6fd300 92%);box-shadow:inset 0 1px 2px #fff,inset 0 -3px 3px #227100,0 0 4px #8dff00;color:#00120a!important;text-decoration:none!important;}
  body.dhm-homepage .dhm-category i {font-size:22px;line-height:23px;color:#051800;}
  body.dhm-homepage .dhm-category span {font-size:8px;font-weight:900;line-height:11px;color:#001400;}
  body.dhm-homepage .dhm-section {padding:14px 9px 10px;scroll-margin-top:125px;}
  body.dhm-homepage .dhm-section-head {display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px;padding-bottom:6px;border-bottom:1px solid rgba(255,255,255,.27);}
  body.dhm-homepage .dhm-section-head h2 {font-size:14px!important;font-weight:900!important;line-height:18px;margin:0!important;color:#fff!important;text-shadow:0 1px 2px #000;white-space:nowrap;}
  body.dhm-homepage .dhm-section-head h2 i {color:#fff;margin-right:2px;}
  body.dhm-homepage .dhm-search {display:flex;align-items:center;gap:4px;min-width:0;width:120px;height:28px;padding:0 8px;border:1px solid rgba(118,162,216,.5);border-radius:10px;background:rgba(1,11,32,.87);margin:0;}
  body.dhm-homepage .dhm-search input {flex:1;width:100%;min-width:0;height:100%;border:0;outline:0;color:white;background:transparent;font-size:11px;}
  body.dhm-homepage .dhm-search input::placeholder {color:#aab1bf;}
  body.dhm-homepage .dhm-search i {font-size:13px;color:#b5d0e5;}
  body.dhm-homepage .dhm-popular-list {display:flex;gap:8px;overflow-x:auto;padding:2px 0 9px;scroll-snap-type:x mandatory;scrollbar-width:none;}
  body.dhm-homepage .dhm-popular-list::-webkit-scrollbar {display:none;}
  body.dhm-homepage .dhm-popular-card {flex:0 0 104px;min-width:0;border-radius:13px 13px 7px 7px;background:linear-gradient(180deg,#102542,#071a14);padding:6px 5px 5px;color:white!important;text-decoration:none;scroll-snap-align:start;}
  body.dhm-homepage .dhm-popular-picture {position:relative;display:flex;height:93px;width:100%;border-radius:10px;overflow:hidden;align-items:center;justify-content:center;background:radial-gradient(circle at 55% 30%,#d9b942,#8b3504 65%,#140f16);}
  body.dhm-homepage .dhm-popular-picture img {position:relative;z-index:1;display:block;width:100%;height:100%;object-fit:cover;}
  body.dhm-homepage .dhm-image-fallback {font-size:29px;color:#f0e065;}
  body.dhm-homepage .dhm-popular-card strong {display:block;margin:7px 0 2px;font-size:10px;line-height:12px;min-height:24px;max-height:24px;overflow:hidden;color:#fff;}
  body.dhm-homepage .dhm-popular-card small {display:block;font-size:9px;line-height:11px;color:#ddd;}
  body.dhm-homepage .dhm-toto { padding-top:9px; }
  body.dhm-homepage .dhm-toto-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 10px;}
  body.dhm-homepage .dhm-toto-card {position:relative;min-width:0;overflow:hidden;border:2px solid #0d48e3;border-radius:23px;background:linear-gradient(180deg,#000717 0%,#010b24 100%);padding:0 12px 12px;box-shadow:0 2px 7px #000b,inset 0 0 2px #87caff;text-align:center;color:white;}
  body.dhm-homepage .dhm-toto-title {height:26px;line-height:24px;margin:0 -12px;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 3px;font-size:11px;font-weight:900;text-transform:uppercase;border-bottom:2px solid #b7ff00;background:linear-gradient(180deg,#295cff 0%,#0044b8 60%,#001653 100%);}
  body.dhm-homepage .dhm-toto-art {position:relative;display:flex;align-items:center;justify-content:center;height:97px;margin:0 -12px -47px;overflow:hidden;background:radial-gradient(ellipse at 50% 110%,#541c21 0%,#191729 47%,#020817 78%);}
  body.dhm-homepage .dhm-toto-art::before {content:'';position:absolute;width:145%;height:55px;left:-22%;bottom:-20px;border:16px solid rgba(139,24,20,.28);border-radius:50%;transform:rotate(-8deg);}
  body.dhm-homepage .dhm-toto-art i {font-size:40px;line-height:1;color:#d3a840;text-shadow:0 2px 2px #3a1600,0 0 5px #a6770a;transform:translateY(-6px);}
  body.dhm-homepage .dhm-toto-info {position:relative;z-index:1;text-shadow:1px 1px 2px black;min-height:41px;margin-bottom:4px;}
  body.dhm-homepage .dhm-toto-info time {display:block;color:white;font-size:11px;font-weight:800;line-height:17px;}
  body.dhm-homepage .dhm-toto-countdown {display:block;font-size:10px;color:white;line-height:15px;font-weight:900;}
  body.dhm-homepage .dhm-toto-result {height:25px;display:flex;align-items:center;justify-content:center;border-radius:5px;background:#0e1f4d;color:white;font-size:12px;font-weight:900;letter-spacing:.3px;margin:0 0 5px;}
  body.dhm-homepage .dhm-history-btn,body.dhm-homepage .dhm-play-btn {height:24px;display:flex;align-items:center;justify-content:center;border-radius:30px;text-decoration:none!important;font-size:11px;font-weight:900;}
  body.dhm-homepage .dhm-history-btn {background:linear-gradient(110deg,#377cff,#0b32db);color:#fff!important;margin-bottom:6px;}
  body.dhm-homepage .dhm-play-btn {background:linear-gradient(110deg,#9aff00,#b7ff00);color:#000e07!important;}
  body.dhm-homepage .dhm-more-link {display:block;margin:13px auto 0;width:fit-content;font-size:11px;background:#074dd5;color:#fff!important;padding:6px 14px;border-radius:15px;}
  body.dhm-homepage .dhm-provider-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 12px;margin-top:10px;}
  body.dhm-homepage .dhm-provider-card {min-width:0;display:block;text-align:center;color:#e8e8ed!important;text-decoration:none!important;font-size:11px;line-height:15px;}
  body.dhm-homepage .dhm-provider-graphic {position:relative;height:92px;display:flex;align-items:center;justify-content:center;border:2px solid #057aff;border-radius:19px;background:radial-gradient(circle at 50% 10%,#2754f4,#051355 60%,#000924);box-shadow:inset 0 1px 6px #66f5ff,0 2px 4px #000;overflow:hidden;margin-bottom:4px;}
  body.dhm-homepage .dhm-provider-graphic::before {content:'';position:absolute;inset:7px;border:1px solid #53dfff;border-radius:13px;pointer-events:none;}
  body.dhm-homepage .dhm-provider-graphic img {position:relative;z-index:2;max-width:100%;max-height:100%;width:100%;height:100%;object-fit:contain;}
  body.dhm-homepage .dhm-provider-graphic .dhm-image-fallback {font-size:36px;}
  body.dhm-homepage .dhm-no-results {text-align:center;font-size:12px;margin:9px 0;}
  body.dhm-homepage .dhm-bank { padding-top:18px; }
  body.dhm-homepage .dhm-bank h2 {font-size:14px!important;text-align:center;color:#fff!important;font-weight:900;margin-bottom:12px;}
  body.dhm-homepage .dhm-bank-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px 12px;}
  body.dhm-homepage .dhm-bank-card {position:relative;aspect-ratio:1.12;min-width:0;border:2px solid #017cda;border-radius:18px;background:radial-gradient(circle at center,#124bb7,#041555 65%,#00112c);display:flex;align-items:center;justify-content:center;overflow:hidden;box-shadow:inset 0 0 8px #5ffaff,0 0 3px #078be8;}
  body.dhm-homepage .dhm-bank-card::after {content:'';position:absolute;inset:5px;border:1px solid #4ec1ef;border-radius:13px;pointer-events:none;}
  body.dhm-homepage .dhm-bank-card img {position:relative;z-index:1;width:85%;height:65%;object-fit:contain;}
  body.dhm-homepage .dhm-bank-card .dhm-image-fallback {position:absolute;opacity:.4;}
  body.dhm-homepage .dhm-bank-card span {position:absolute;bottom:4px;left:5px;right:5px;text-align:center;font-size:8px;color:#d7ffff;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  body.dhm-homepage .dhm-seo {background:rgba(0,0,0,.84);margin-top:15px;padding:18px 14px 20px;}
  body.dhm-homepage .dhm-seo-copy {overflow-wrap:anywhere;color:white!important;font-size:12px;line-height:1.35;text-align:left;}
  body.dhm-homepage .dhm-seo-copy h1 {font-size:21px!important;line-height:1.22!important;text-align:center;font-weight:900!important;color:#fff!important;margin:0 0 9px!important;}
  body.dhm-homepage .dhm-seo-copy h2,body.dhm-homepage .dhm-seo-copy h3 {font-size:15px!important;line-height:1.28!important;font-weight:900!important;color:#fff!important;margin:13px 0 7px!important;}
  body.dhm-homepage .dhm-seo-copy p {font-size:12px!important;color:#fff!important;line-height:1.4!important;margin:0 0 10px!important;}
  body.dhm-homepage .dhm-seo-copy a {color:#a8ff00!important;}
  /* Source footer features are untouched in PHP; homepage mobile displays its SEO copy above and compact navbar below. */
  body.dhm-homepage footer#aboutus {display:none!important;}
  body.dhm-homepage .dhm-bottom-nav {position:fixed;left:0;right:0;bottom:0;z-index:1200;height:52px;height:calc(52px + env(safe-area-inset-bottom,0px));padding:0 2px env(safe-area-inset-bottom,0px);display:grid!important;grid-template-columns:repeat(4,1fr);align-items:stretch;background:linear-gradient(90deg,#010603,#10191b 48%,#010506);box-shadow:0 -2px 9px rgba(0,0,0,.95);}
  body.dhm-homepage .dhm-bottom-item {display:flex;flex-direction:column;justify-content:center;align-items:center;gap:2px;text-align:center;background:transparent;border:0;border-radius:0;color:#fff!important;text-decoration:none!important;cursor:pointer;font-size:8px;font-weight:900;padding:3px 0 2px;}
  body.dhm-homepage .dhm-bottom-item i {font-size:22px;line-height:24px;color:#ebf1f1;}
  body.dhm-homepage .dhm-bottom-item span {font-size:8px;line-height:10px;color:inherit;}
  body.dhm-homepage .dhm-bottom-active {background:linear-gradient(125deg,#aaff00,#8fff00);border-radius:11px;color:#021904!important;}
  body.dhm-homepage .dhm-bottom-active i {color:#05210c;}
  body.dhm-homepage .dhm-mobile-content ~ * {scroll-margin-top:120px;}
}

/* PHASE 2: horizontal green category navigation replaces old OWL carousel. */
@media (max-width: 575.98px) {
  body.dhm-homepage .dhm-mobile-news { display:none!important; } /* Original top-menu ticker is below navigation. */
  body.dhm-homepage .mcp-top-header { display:contents; }
  body.dhm-homepage .mcp-top-header > .site-header { position:sticky!important; top:55px; z-index:1045; width:100%; margin:0!important; padding:0!important; background:rgba(0,12,38,.97)!important; }
  body.dhm-homepage .mcp-top-header > .site-header > .container { max-width:none!important; padding:0!important; margin:0!important; }
  body.dhm-homepage .dhm-top-nav-holder { width:100%; max-width:100vw; overflow:hidden; }
  body.dhm-homepage .dhm-categories.dhm-nav-scroll { display:flex!important; flex-wrap:nowrap!important; grid-template-columns:none!important; gap:6px!important; width:100%; max-width:100vw; min-width:0; margin:0!important; padding:7px 8px!important; overflow-x:auto!important; overflow-y:hidden!important; scroll-snap-type:x proximity; scrollbar-width:none; -webkit-overflow-scrolling:touch; touch-action:pan-x; overscroll-behavior-x:contain; border-bottom:1px solid #286c0a; }
  body.dhm-homepage .dhm-categories.dhm-nav-scroll::-webkit-scrollbar { display:none; }
  body.dhm-homepage .dhm-nav-scroll .dhm-category { flex:0 0 clamp(66px,17.5vw,75px)!important; min-width:66px!important; width:auto!important; height:48px; scroll-snap-align:start; }
  body.dhm-homepage .mcp-top-header .notificationtext { margin-top:0!important; }
  body.dhm-homepage .dhm-section { scroll-margin-top:132px; }
  body.dhm-homepage .dhm-bank { margin-top:8px; padding:16px 10px 12px; }
  body.dhm-homepage .dhm-bank h2 { font-size:15px!important; line-height:20px; margin:0 0 14px!important; }
  body.dhm-homepage .dhm-bank-grid { gap:12px 10px; }
  body.dhm-homepage .dhm-bank-card { aspect-ratio:1.1; border-radius:17px; }
  body.dhm-homepage .dhm-bank-card img { max-height:66%; object-fit:contain; }
  body.dhm-homepage .dhm-bank-card span { bottom:3px; padding:0 3px; font-size:8px; line-height:11px; text-shadow:0 1px 2px #000; }
  body.dhm-homepage .dhm-seo { margin-top:10px; padding:18px 12px 24px; }
  body.dhm-homepage .dhm-seo-copy { color:#fff!important; }
  body.dhm-homepage .dhm-seo-copy * { max-width:100%; overflow-wrap:anywhere; }
  body.dhm-homepage .dhm-seo-copy img { height:auto; }
}

/* Phase 3: navbar sits below Bootstrap modal backdrop (1040) and modal (1050). */
@media (max-width:575.98px) {
  body.dhm-homepage .dhm-mobile-brand { z-index:12!important; }
  body.dhm-homepage .mcp-top-header > .site-header { z-index:11!important; }
  body.dhm-homepage .dhm-top-nav-holder { position:relative;z-index:1; }
  body.dhm-homepage .dhm-categories.dhm-nav-scroll {
    padding:8px 8px 11px!important;
    scroll-snap-type:x proximity;
    overscroll-behavior-x:contain;
    scrollbar-width:none;
  }
  body.dhm-homepage .dhm-nav-scroll .dhm-category {
    will-change:transform;
    transform:translate3d(0,var(--dhm-wave-y,0px),0) rotate(var(--dhm-wave-r,0deg));
    transition:transform 110ms ease-out,filter 140ms ease;
    filter:brightness(var(--dhm-wave-light,1));
  }
  body.dhm-homepage .dhm-nav-scroll .dhm-category:focus-visible {
    outline:2px solid white;outline-offset:2px;
  }
  body.dhm-homepage .dhm-bottom-nav { z-index:990!important; }
  body.dhm-homepage .dhm-mobile-brand a { max-width:min(92vw,320px)!important; }
  body.dhm-homepage .dhm-mobile-brand img {
    width:auto!important;height:auto!important;max-width:min(92vw,320px)!important;
    max-height:50px!important;object-fit:contain!important;aspect-ratio:auto!important;
  }
  body.dhm-homepage .dhm-mobile-footer-three {
    background:rgba(0,0,0,.91);color:#fff;
    margin:0;padding:18px 9px calc(20px + env(safe-area-inset-bottom,0px));
    border-top:1px solid rgba(124,202,255,.32);overflow-wrap:anywhere;
  }
  body.dhm-homepage .dhm-mobile-footer-three .container {max-width:100%;padding:0 7px;}
  body.dhm-homepage .dhm-mobile-footer-three .row {margin-left:-6px;margin-right:-6px;}
  body.dhm-homepage .dhm-mobile-footer-three [class*=col-] {padding-left:6px;padding-right:6px;}
  body.dhm-homepage .dhm-mobile-footer-three p,
  body.dhm-homepage .dhm-mobile-footer-three li,
  body.dhm-homepage .dhm-mobile-footer-three small {color:#fff;font-size:12px;line-height:1.4;}
  body.dhm-homepage .dhm-mobile-footer-three h4 {color:#fff!important;font-size:16px!important;}
  body.dhm-homepage .dhm-mobile-footer-three a {color:#b5ff47!important;font-size:12px;}
  body.dhm-homepage .dhm-mobile-footer-three img {max-width:100%;object-fit:contain;}
  body.dhm-homepage .dhm-mobile-footer-three hr {border-color:#314363;}
}
@media (max-width:575.98px) and (prefers-reduced-motion:reduce) {
  body.dhm-homepage .dhm-nav-scroll .dhm-category {transition:none!important;transform:none!important;}
}
