.live-main-btn{background:linear-gradient(135deg,#d71920,#a90008)!important;color:#fff!important;border-color:#a90008!important;box-shadow:0 5px 16px rgba(183,0,9,.2)!important;font-weight:900!important}
.live-main-btn:hover{transform:translateY(-1px);filter:brightness(1.04)}
.website-live-modal{position:fixed;inset:0;z-index:99999;background:rgba(15,23,42,.58);backdrop-filter:blur(5px);display:flex;align-items:center;justify-content:center;padding:14px}
.website-live-modal.hidden{display:none!important}
.website-live-card{width:min(1180px,97vw);height:min(92vh,920px);background:#fff;border-radius:18px;box-shadow:0 28px 80px rgba(2,6,23,.35);overflow:hidden;display:flex;flex-direction:column;border:1px solid rgba(148,163,184,.35)}
.website-live-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-bottom:1px solid #e5e7eb;background:#fff}
.website-live-head h3{margin:0;display:flex;align-items:center;gap:9px;font-size:17px;color:#111827}
.website-live-head small{display:block;margin-top:3px;color:#64748b;font-size:11px;font-weight:700}
.website-live-head-actions{display:flex;gap:7px}.website-live-head-actions button{min-height:36px}
.live-pulse-dot{width:10px;height:10px;border-radius:999px;background:#ef233c;box-shadow:0 0 0 0 rgba(239,35,60,.7);animation:webLivePulse 1.25s infinite}
@keyframes webLivePulse{70%{box-shadow:0 0 0 8px rgba(239,35,60,0)}100%{box-shadow:0 0 0 0 rgba(239,35,60,0)}}
.website-live-sourcebar{min-height:36px;display:flex;align-items:center;gap:12px;padding:7px 14px;background:linear-gradient(180deg,#d92323,#b90000);color:#fff;font-size:12px;font-weight:900}
.website-live-sourcebar b{margin-left:auto}.website-live-sourcebar #websiteLiveClock{font-variant-numeric:tabular-nums;opacity:.9}
.website-live-frame-wrap{flex:1;min-height:0;background:#f8fafc;position:relative}.website-live-frame-wrap iframe{width:100%;height:100%;border:0;background:#fff;display:block}
.website-live-foot{padding:7px 12px;border-top:1px solid #e5e7eb;background:#f8fafc;color:#64748b;font-size:10px;font-weight:700;text-align:center}
body.website-live-open{overflow:hidden}
@media(max-width:700px){.website-live-modal{padding:0}.website-live-card{width:100vw;height:100dvh;max-height:none;border-radius:0;border:0}.website-live-head{padding:9px 10px}.website-live-head h3{font-size:15px}.website-live-head small{font-size:9px}.website-live-sourcebar{padding:6px 9px;gap:7px;font-size:10px}.website-live-head-actions button{padding:7px 9px!important;min-width:auto!important}.website-live-foot{font-size:9px;padding:5px 8px}.live-main-btn{font-size:12px!important}}

/* V4 source switcher */
.website-live-tabs{display:flex;gap:8px;align-items:center;padding:8px 12px;background:#f8fafc;border-bottom:1px solid #e5e7eb;overflow-x:auto;scrollbar-width:thin}
.website-live-tabs button{flex:0 0 auto;border:1px solid #cbd5e1!important;background:#fff!important;color:#334155!important;border-radius:10px!important;padding:8px 12px!important;font-weight:900!important;min-height:36px!important;box-shadow:none!important}
.website-live-tabs button.active{background:#111827!important;color:#fff!important;border-color:#111827!important}
.website-live-tabs button:hover{transform:none!important;filter:none!important;background:#eef2ff!important;color:#111827!important}
.website-live-tabs button.active:hover{background:#111827!important;color:#fff!important}
.live-source-help{padding:6px 12px;background:#fff7ed;color:#9a3412;border-bottom:1px solid #fed7aa;font-size:10px;font-weight:700}
@media(max-width:700px){.website-live-tabs{padding:7px 8px;gap:6px}.website-live-tabs button{font-size:10px!important;padding:7px 9px!important}.live-source-help{font-size:9px;padding:5px 8px}}

.live-local-help{display:flex;min-height:420px;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:32px;color:#24324a;background:#fff}.live-local-icon{font-size:48px}.live-local-help h3{margin:10px 0 6px}.live-local-help p{max-width:620px;line-height:1.7;color:#64748b}.live-local-help button{margin-top:14px;border:0;border-radius:12px;background:#111827;color:#fff;font-weight:800;padding:12px 18px;cursor:pointer}

/* V10 - table-only LIVE, phone first */
.website-live-status{padding:6px 12px;background:#fff7ed;color:#9a3412;border-bottom:1px solid #fed7aa;font-size:10px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.website-live-status.ok{background:#ecfdf5;color:#047857;border-color:#a7f3d0}.website-live-status.error{background:#fef2f2;color:#b91c1c;border-color:#fecaca}.website-live-status.loading{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe}
.website-live-frame-wrap{overflow:auto!important;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}.website-live-result{min-height:100%;background:#fff;padding:8px;box-sizing:border-box}.live-result-shell{width:100%;max-width:900px;margin:0 auto;background:#fff;overflow:hidden}.live-result-shell table{border-collapse:collapse!important;width:100%!important;max-width:none!important;margin:0!important;background:#fff!important;table-layout:auto!important}.live-result-shell td,.live-result-shell th{box-sizing:border-box}.live-result-shell img{max-width:100%!important;height:auto!important}.live-result-shell a{color:inherit;text-decoration:none;pointer-events:none}.live-result-shell script,.live-result-shell iframe,.live-result-shell form,.live-result-shell input,.live-result-shell select,.live-result-shell button{display:none!important}.live-loading,.live-error{min-height:300px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:12px;text-align:center;color:#475569}.live-loading span{width:30px;height:30px;border:4px solid #e2e8f0;border-top-color:#2563eb;border-radius:50%;animation:liveSpin .8s linear infinite}@keyframes liveSpin{to{transform:rotate(360deg)}}.live-error small{color:#64748b}
@media(max-width:700px){.website-live-head{flex:0 0 auto}.website-live-head>div:first-child{min-width:0}.website-live-head small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:55vw}.website-live-tabs{scrollbar-width:none}.website-live-tabs::-webkit-scrollbar{display:none}.website-live-sourcebar{flex:0 0 auto}.website-live-sourcebar b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.website-live-status{font-size:9px;padding:5px 8px}.website-live-result{padding:3px}.live-result-shell{min-width:0!important;width:100%!important}.live-result-shell table{font-size:12px!important;line-height:1.18!important}.live-result-shell td,.live-result-shell th{padding:3px 2px!important}.website-live-foot{display:none}.website-live-frame-wrap{background:#fff}.live-loading,.live-error{min-height:55vh}.website-live-head-actions button{font-size:12px!important}.website-live-tabs button{min-height:34px!important}}
@media(max-width:390px){.website-live-head h3{font-size:14px}.website-live-head small{max-width:48vw}.website-live-tabs button{font-size:9px!important;padding:7px 8px!important}.website-live-sourcebar{font-size:9px}.live-result-shell table{font-size:11px!important}.live-result-shell td,.live-result-shell th{padding:2px 1px!important}}

/* V12 normalized MinhNgoc-style LIVE board */
.website-live-result{padding:0!important;background:#eef2f7!important}
.mn-live-board{width:100%;max-width:980px;margin:0 auto;background:#fff;border:1px solid #9ca3af;box-shadow:0 1px 2px rgba(0,0,0,.08);font-family:Arial,"Helvetica Neue",sans-serif;color:#111}
.mn-live-title{min-height:38px;display:flex;align-items:center;gap:8px;padding:0 10px;background:linear-gradient(#d61d1d,#a90000);color:#fff;border-bottom:1px solid #7f0000;font-size:16px;font-weight:900}
.mn-live-title span{font-size:19px}.mn-live-title b{flex:1}.mn-live-title small{font-size:10px;font-weight:900;opacity:.95}
.mn-live-scroll{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;background:#fff}
.mn-live-table{border-collapse:collapse;width:100%;min-width:620px;table-layout:fixed;background:#fff}
.mn-live-table th,.mn-live-table td{border:1px solid #a7a7a7;text-align:center;vertical-align:middle;padding:4px 3px}
.mn-live-table thead th{background:#f4f4f4;color:#003ec7;font-weight:900}
.mn-live-table .date-col{width:112px;color:#003ec7}.mn-live-table .date-col small{display:block;color:#990000;margin-top:4px;font-size:13px}
.mn-live-table .live-province b{display:block;color:#003ec7;font-size:14px}.mn-live-table .live-province small{display:block;color:#555;font-size:10px;margin-top:4px;font-weight:600}
.mn-live-table .prize-name{width:112px;background:#fafafa;font-size:12px;font-weight:500;white-space:nowrap}
.mn-live-table .prize-values{background:#fff;font-size:18px;font-weight:900;line-height:1.12;letter-spacing:.2px}
.mn-live-table .prize-values span{display:block;min-height:20px}.mn-live-table .prize-values.g8{font-size:31px;color:#a00000}.mn-live-table .prize-values.special{font-size:25px;color:#a00000}
.mn-live-table .waiting{color:#9ca3af!important;letter-spacing:3px;animation:liveWaiting 1.1s ease-in-out infinite alternate}
@keyframes liveWaiting{from{opacity:.35}to{opacity:.9}}
.mn-live-tools{display:flex;align-items:center;gap:0;border-top:1px solid #999;overflow-x:auto;white-space:nowrap;background:#fff;font-size:11px}
.mn-live-tools>span{padding:7px 9px;border-right:1px solid #c9c9c9}.mn-live-tools>span.active{color:#b40000}
.digit-pills{display:flex;gap:7px;align-items:center;padding:4px 8px}.digit-pills i{font-style:normal;width:20px;height:20px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:linear-gradient(#d7d7d7,#868686);color:#fff;font-weight:900;font-size:11px;box-shadow:inset 0 1px 0 rgba(255,255,255,.8)}
.mn-live-meta{display:flex;justify-content:space-between;gap:10px;padding:7px 9px;background:#f8fafc;border-top:1px solid #d1d5db;color:#64748b;font-size:10px;font-weight:700}
@media(max-width:700px){
  .website-live-frame-wrap{background:#eef2f7!important}
  .website-live-result{min-height:100%;overflow:auto!important}
  .mn-live-board{border-left:0;border-right:0;box-shadow:none;max-width:none}
  .mn-live-title{min-height:34px;padding:0 7px;font-size:12px;position:sticky;top:0;z-index:3}
  .mn-live-table{min-width:0!important;width:100%!important;table-layout:fixed!important}
  .mn-live-table .date-col,.mn-live-table .prize-name{width:68px!important}
  .mn-live-table th,.mn-live-table td{padding:3px 1px!important}
  .mn-live-table .date-col{font-size:10px}.mn-live-table .date-col small{font-size:9px;margin-top:2px}
  .mn-live-table .live-province b{font-size:11px;line-height:1.1;overflow-wrap:anywhere}.mn-live-table .live-province small{font-size:8px;margin-top:2px}
  .mn-live-table .prize-name{font-size:9px;white-space:normal;line-height:1.05}
  .mn-live-table .prize-values{font-size:14px;line-height:1.05}.mn-live-table .prize-values span{min-height:15px}
  .mn-live-table .prize-values.g8{font-size:23px}.mn-live-table .prize-values.special{font-size:18px}
  .mn-live-tools{font-size:9px}.mn-live-tools>span{padding:6px 5px}.digit-pills{gap:4px;padding:3px 5px}.digit-pills i{width:17px;height:17px;font-size:9px}
  .mn-live-meta{font-size:8px;padding:5px 6px;position:sticky;bottom:0;z-index:2}
}
@media(max-width:380px){
  .mn-live-table .date-col,.mn-live-table .prize-name{width:58px!important}
  .mn-live-table .live-province b{font-size:10px}.mn-live-table .prize-values{font-size:13px}.mn-live-table .prize-values.g8{font-size:21px}.mn-live-table .prize-values.special{font-size:16px}
}


/* V13: stable lottery-live rendering */
.mn-live-table .live-new-value{animation:liveValuePop .9s ease both}
@keyframes liveValuePop{0%{transform:scale(.78);background:#fff3a6}55%{transform:scale(1.08);background:#fff3a6}100%{transform:scale(1);background:transparent}}
.mn-live-table .prize-values span{border-radius:4px}
@media(max-width:700px){
  .website-live-card{height:100dvh!important}
  .website-live-frame-wrap{min-height:0!important;overflow:auto!important}
  .mn-live-title{font-size:12px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mn-live-table{font-variant-numeric:tabular-nums}
  .mn-live-table .prize-values{word-break:keep-all}
  .mn-live-table .prize-values span{white-space:nowrap}
  .mn-live-tools{position:sticky;bottom:0;z-index:4;border-bottom:1px solid #d1d5db}
  .mn-live-meta{position:static!important}
}

/* V14 multi-region LIVE: Miền Nam / Miền Trung / Miền Bắc */
.north-live-head{display:grid;grid-template-columns:auto 1fr auto;gap:8px;align-items:center;padding:7px 9px;border-bottom:1px solid #aaa;background:#fff;font-size:11px}.north-live-head span{text-align:center;color:#444}.north-live-head strong{color:#8b1a1a}.north-live-table{min-width:0!important}.north-live-table .prize-name{width:95px}.north-live-table .north-values{padding:5px 8px!important;font-size:22px;font-weight:900;line-height:1.25}.north-live-table .north-values span{display:inline-flex;align-items:center;justify-content:center;min-width:94px;margin:1px 8px}.north-live-table .north-db{font-size:28px;color:#9d0000}.north-live-table .north-g1{font-size:27px}.north-live-table .north-g7 span{min-width:60px}.north-live-table .waiting{min-width:70px;color:#aeb4bc!important}
@media(max-width:700px){.north-live-head{grid-template-columns:auto 1fr auto;font-size:9px;padding:5px 6px;gap:4px}.north-live-head span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.north-live-table .prize-name{width:62px!important}.north-live-table .north-values{font-size:18px!important;padding:4px 2px!important}.north-live-table .north-values span{min-width:27%;margin:1px 2px}.north-live-table .north-db{font-size:24px!important}.north-live-table .north-g1{font-size:23px!important}.north-live-table .north-g2 span{min-width:42%}.north-live-table .north-g3 span,.north-live-table .north-g5 span{min-width:29%}.north-live-table .north-g4 span,.north-live-table .north-g7 span{min-width:21%}.north-live-table .north-g6 span{min-width:28%}.north-live-table .waiting{min-width:27%!important}}

/* V15 - official LIVE embed. The source's own JS performs the live number updates. */
.website-live-result{height:100%!important;min-height:0!important;padding:0!important;background:#fff!important;overflow:hidden!important}
.official-live-frame{display:block;width:100%!important;height:100%!important;min-height:100%!important;border:0!important;background:#fff!important}
.website-live-frame-wrap{overflow:hidden!important;background:#fff!important}
@media(max-width:700px){
  .website-live-result,.official-live-frame{width:100%!important;height:100%!important}
  .website-live-status{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}

/* V16 — source schedule reminder (display only, never auto-switches source) */
.website-live-tabs button{display:flex!important;flex-direction:column;align-items:flex-start;justify-content:center;gap:2px;line-height:1.1}
.website-live-tabs button>span{white-space:nowrap}
.website-live-tabs button>small{font-size:8px;font-weight:800;opacity:.72;white-space:nowrap}
.website-live-tabs button.reminder-next:not(.active){border-color:#f59e0b!important;box-shadow:0 0 0 2px rgba(245,158,11,.12)!important}
.website-live-tabs button.reminder-live{background:#dc2626!important;color:#fff!important;border-color:#b91c1c!important;animation:liveReminderPulse 1.3s ease-in-out infinite}
.website-live-tabs button.reminder-live:hover{background:#dc2626!important;color:#fff!important}
.website-live-reminder{padding:7px 12px;background:#fff7ed;color:#9a3412;border-bottom:1px solid #fed7aa;font-size:10px;font-weight:900;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.website-live-reminder.live-now{background:#dc2626;color:#fff;border-color:#b91c1c}
@keyframes liveReminderPulse{50%{box-shadow:0 0 0 4px rgba(220,38,38,.16)}}
@media(max-width:700px){
  .website-live-tabs button{padding:6px 8px!important;min-height:43px!important}
  .website-live-tabs button>small{font-size:7px}
  .website-live-reminder{font-size:9px;padding:5px 8px}
}

.khmer-live-btn{background:linear-gradient(135deg,#243b8f,#4f46e5)!important;color:#fff!important;border-color:#3346a8!important;box-shadow:0 5px 16px rgba(49,70,168,.18)!important;font-weight:900!important}
.khmer-live-btn:hover{transform:translateY(-1px);filter:brightness(1.04)}

/* Khmer LIVE source tab */
.website-live-tabs [data-live-source="khmer"]{border-color:#c7d2fe}
.website-live-tabs [data-live-source="khmer"].active{background:linear-gradient(135deg,#243b8f,#4f46e5)!important;color:#fff!important;border-color:#3346a8!important}
@media(max-width:700px){.website-live-tabs{grid-template-columns:repeat(2,minmax(0,1fr))!important}}


/* V20 — Khmer LIVE parsed result + picture converter */
.kh-live-layout{min-height:100%;display:grid;grid-template-columns:minmax(0,1.35fr) minmax(280px,.85fr);gap:22px;padding:22px;background:#fff;box-sizing:border-box;align-items:start}
.kh-live-left{display:flex;justify-content:center;align-items:flex-start;padding-top:6px}
.kh-live-capture{width:min(650px,100%);background:#fff;border:3px solid #111;color:#000;font-family:"Times New Roman","Noto Sans Khmer",serif;box-sizing:border-box}
.kh-live-title{text-align:center;font-family:"Noto Sans Khmer",Arial,sans-serif;font-size:25px;font-weight:900;padding:19px 8px;border-bottom:2px solid #111}
.kh-live-date-row{display:grid;grid-template-columns:120px 1fr;align-items:center;border-bottom:2px solid #111;min-height:80px}
.kh-live-date-row span{font-family:"Noto Sans Khmer",Arial,sans-serif;font-size:23px;font-weight:900;line-height:1.1;padding-left:16px}.kh-live-date-row b{text-align:center;font:900 31px/1 Arial,sans-serif}
.kh-live-table{border-collapse:collapse;width:100%;table-layout:fixed}.kh-live-table th,.kh-live-table td{border-bottom:2px solid #111;text-align:center;height:104px;padding:0}.kh-live-table tr:last-child th,.kh-live-table tr:last-child td{border-bottom:0}
.kh-live-table th{width:116px;border-right:2px dotted #111;font:900 72px/1 "Times New Roman",serif}.kh-live-table td{font:500 78px/1 "Times New Roman",serif}.kh-live-table td:nth-child(2){width:34%}
.kh-live-controls{display:flex;flex-direction:column;gap:14px;padding-top:6px}.kh-live-controls label{display:flex;flex-direction:column;gap:7px;font-size:13px;font-weight:900;color:#334155}.kh-live-controls select,.kh-live-source-pill{height:58px;border:1px solid #cbd5e1;border-radius:12px;background:#fff;padding:0 15px;font-size:17px;font-weight:800;box-sizing:border-box}.kh-live-source-pill{display:flex;align-items:center;gap:8px}.kh-live-source-pill b{margin-left:auto;background:#16a34a;color:#fff;border-radius:6px;padding:4px 8px;font-size:11px}
.kh-live-controls button{min-height:58px!important;border-radius:12px!important;font-size:14px!important;font-weight:900!important}.kh-live-controls .kh-primary{background:linear-gradient(135deg,#4338ca,#5b45df)!important;color:#fff!important;border-color:#4338ca!important}.kh-live-controls .kh-download{background:#16a34a!important;color:#fff!important;border-color:#15803d!important}
@media(max-width:800px){.kh-live-layout{grid-template-columns:1fr;gap:14px;padding:10px}.kh-live-controls{display:grid;grid-template-columns:1fr 1fr;gap:8px}.kh-live-controls label{grid-column:span 1}.kh-live-controls button{min-height:46px!important}.kh-live-title{font-size:17px;padding:12px 5px}.kh-live-date-row{grid-template-columns:82px 1fr;min-height:56px}.kh-live-date-row span{font-size:15px;padding-left:8px}.kh-live-date-row b{font-size:22px}.kh-live-table th{width:78px;font-size:48px}.kh-live-table td{font-size:51px}.kh-live-table th,.kh-live-table td{height:72px}.website-live-result{overflow:auto!important}}
@media(max-width:480px){.kh-live-layout{padding:5px}.kh-live-controls{grid-template-columns:1fr 1fr}.kh-live-controls select,.kh-live-source-pill{height:46px;font-size:13px}.kh-live-controls button{font-size:11px!important;min-height:42px!important}.kh-live-title{font-size:14px}.kh-live-date-row{grid-template-columns:64px 1fr;min-height:46px}.kh-live-date-row span{font-size:12px}.kh-live-date-row b{font-size:18px}.kh-live-table th{width:60px;font-size:39px}.kh-live-table td{font-size:41px}.kh-live-table th,.kh-live-table td{height:61px}}
