:root {
  --bg: #08111f;
  --bg2: #0d1830;
  --card: #112449;
  --card2: #1f7ece;
  --line: rgba(157, 216, 255, 0.25);
  --text: #ffffff;
  --muted: #d6ecff;
  --green: #57f3a2;
  --red: #ff6d78;
  --yellow: #ffd773;
  --cyan: #79d9ff;
}
*{box-sizing:border-box}
body{margin:0;font-family:Segoe UI,Tahoma,sans-serif;background:linear-gradient(180deg,var(--bg) 0%, #040a14 100%);color:var(--text)}
a{text-decoration:none}
.page-wrap{max-width:1500px;margin:0 auto;padding:12px}
.topbar{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:15px 18px;border:1px solid var(--line);border-radius:18px;background:rgba(10,18,35,.95)}
h1{margin:0;font-size:24px}.subline{margin-top:4px;color:#a6cfff}
.top-actions,.month-nav{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.primary-btn,.ghost-btn{border-radius:12px;padding:10px 16px;cursor:pointer;font-weight:600}
.primary-btn{border:none;background:linear-gradient(135deg,#4f8cff,#20c4ff);color:#fff}
.ghost-btn{border:1px solid var(--line);background:transparent;color:#fff}
.summary-grid{margin-top:12px;display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px}
.summary-card{padding:12px;border:1px solid var(--line);border-radius:18px;background:rgba(10,18,35,.95)}
.summary-card .label,.mini-label{font-size:12px;text-transform:uppercase;color:#a6cfff;letter-spacing:.04em}.summary-card .value{font-size:26px;font-weight:800;margin-top:10px}
.green{color:var(--green)!important}.red{color:var(--red)!important}.yellow{color:var(--yellow)!important}.cyan{color:var(--cyan)!important}
.cards-toolbar{display:flex;justify-content:space-between;align-items:center;margin:20px 0 12px}.section-title{font-size:20px;font-weight:800}
.cards-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(360px,1fr));gap:18px}
.blue-slot, .instance-card{border-radius:22px;padding:18px;border:1px solid rgba(255,255,255,.2);background:linear-gradient(135deg,#1e366d 0%, #23a7e7 100%);min-height:420px;position:relative;overflow:hidden}
.instance-card{background:linear-gradient(180deg,rgba(10,18,35,.98),rgba(7,15,28,.98));border:1px solid #31496d}
.blue-slot h3,.instance-card h3{margin:0;font-size:18px}.slot-sub{margin-top:4px;color:#e5f6ff;font-size:14px}
.plus-card{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:14px;text-align:center;cursor:pointer;background:linear-gradient(180deg,#21366f 0%, #1d5ca0 100%)}
.plus-circle{width:76px;height:76px;border-radius:50%;border:4px solid rgba(255,255,255,.95);display:flex;align-items:center;justify-content:center;font-size:48px;font-weight:300}
.plus-text{font-size:28px;font-weight:700}.plus-note{font-size:18px}
.slot-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.slot-pill{padding:7px 11px;border-radius:999px;font-size:12px;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.2)}
.slot-pill.offline{color:#fff}.slot-pill.live{color:#57f3a2}.slot-actions{position:absolute;right:18px;top:18px;display:flex;gap:8px}
.icon-btn{border:none;background:rgba(255,255,255,.14);color:#fff;border-radius:10px;padding:8px 10px;cursor:pointer}
.info-list{margin-top:22px;display:grid;gap:12px}
.info-row{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid rgba(255,255,255,.18)}
.info-row span:first-child{color:#e8f5ff}.info-row span:last-child{font-weight:700}
.placeholder-footer{position:absolute;left:18px;right:18px;bottom:18px;display:flex;gap:10px;justify-content:space-between;align-items:center}
.action-link{border:1px solid rgba(255,255,255,.28);border-radius:10px;padding:9px 14px;color:#fff;background:rgba(255,255,255,.06)}
.metrics-grid{margin-top:16px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.metric{border:1px solid #2c4262;border-radius:14px;padding:10px;background:#0c1729}.metric .big{font-size:18px;font-weight:800;margin-top:6px}
.small-grid{margin-top:12px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.small-box{border:1px solid #2c4262;border-radius:14px;padding:10px;background:#0c1729}.small-box .num{font-size:17px;font-weight:800;margin-top:6px}
.card-bottom{display:flex;justify-content:space-between;align-items:center;margin-top:14px;gap:10px}
.modal{position:fixed;inset:0;background:rgba(1,6,12,.72);display:none;align-items:center;justify-content:center;padding:20px;z-index:10}.modal.show{display:flex}
.modal-card{width:min(520px,100%);background:#091524;border:1px solid var(--line);border-radius:20px;padding:18px}.modal-head{display:flex;justify-content:space-between;align-items:center}.icon-close{border:none;background:transparent;color:#fff;font-size:28px;cursor:pointer}
.auth-body{min-height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(180deg,#0b1630 0%, #06101f 100%)}
.auth-wrap{width:100%;max-width:420px;padding:16px}.auth-card{background:rgba(10,18,35,.96);border:1px solid var(--line);border-radius:22px;padding:26px}.auth-sub{color:#a6cfff}.auth-form{display:flex;flex-direction:column;gap:10px;margin-top:12px}.auth-form label{font-size:14px;color:#cbe8ff}.auth-form input{padding:12px 14px;border-radius:12px;border:1px solid #29456e;background:#07101d;color:#fff}.helper-row{display:flex;justify-content:space-between;margin-top:16px;color:#cbe8ff}.helper-row a{color:#7adaff}.alert{padding:12px;border:1px solid rgba(255,90,90,.3);background:rgba(255,90,90,.08);color:#ffb3b7;border-radius:12px;margin:12px 0}.demo-box{margin-top:14px;padding:12px;border:1px dashed rgba(255,255,255,.18);border-radius:12px;color:#cbe8ff}.chip{border:1px solid var(--line);padding:10px 12px;border-radius:10px;background:#101d34}
.monthly-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}.monthly-grid-wrap{margin-top:12px}.day-cell{background:#091524;border:1px solid var(--line);border-radius:14px;min-height:112px;padding:8px}.day-num{font-size:22px;font-weight:800}.day-profit{font-size:20px;font-weight:800;margin:8px 0}.day-mini{font-size:11px;color:#cbe8ff}.daily-table{display:none}
@media (max-width:900px){.topbar,.cards-toolbar{flex-direction:column;align-items:flex-start}.cards-grid{grid-template-columns:1fr}.monthly-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.success-alert{margin-top:16px;padding:14px 16px;border-radius:14px;border:1px solid rgba(87,243,162,.35);background:rgba(87,243,162,.08);color:#aaffcc;font-weight:700}.success-alert.warn{border-color:rgba(255,215,115,.4);background:rgba(255,215,115,.08);color:#ffe2a3}.claim-row span:last-child{font-size:18px;color:#ffe27a;letter-spacing:.08em}.settings-page-wrap{max-width:780px}.ea-panel-form{display:flex;justify-content:center;margin-top:18px}.ea-panel-web{width:330px;background:#060014;border:2px solid #ff00ff;color:#fff;padding:10px 12px;font-family:Tahoma,Segoe UI,sans-serif}.ea-title{text-align:center;color:#00ffff;font-size:18px;margin-bottom:8px}.ea-row{display:grid;grid-template-columns:92px 1fr;gap:8px;align-items:center;margin:5px 0;font-size:14px}.ea-row span{font-weight:700}.ea-row input,.ea-row select{width:100%;height:25px;border:0;background:#fff;color:#000;padding:2px 6px;font-weight:700}.top-buttons{grid-template-columns:1fr 1fr}.top-buttons button{background:#0000ff;color:#fff;border:0;height:24px}.switch-mini{display:flex!important;gap:0!important;grid-template-columns:none!important;align-items:center}.switch-mini input,.switch-wide input{display:none}.switch-mini b,.switch-wide b{display:block;background:#00ff35;color:#000;padding:5px 10px;min-width:48px;text-align:center}.switch-mini input:not(:checked)+b,.switch-wide input:not(:checked)+b{background:#666;color:#fff}.toggle-line{background:#008000;padding:4px;grid-template-columns:1fr 70px}.toggle-line.red-line{background:#bf2020}.toggle-line.gray-line{background:#595959}.switch-wide b{padding:4px 12px}.save-settings-btn{width:100%;margin-top:12px;border-radius:0}.ea-row:has(.switch-mini){grid-template-columns:92px 1fr 52px}


/* V5 fixes: กัน Claim Code / Show ทับกัน และให้ปุ่มลบการ์ดสดลบเฉพาะ instance */
.blue-slot, .instance-card{display:flex;flex-direction:column;overflow:visible;min-height:450px;}
.blue-slot{padding-bottom:18px;}
.slot-head{padding-right:74px;}
.slot-actions{z-index:3;}
.info-list{margin-top:18px;}
.info-row{align-items:flex-start;}
.info-row span:first-child{flex:0 0 130px;}
.info-row span:last-child{min-width:0;text-align:right;overflow-wrap:anywhere;word-break:break-word;}
.info-row.claim-row span:last-child{color:#fff173;font-size:18px;letter-spacing:.04em;}
.placeholder-footer{position:static;margin-top:auto;padding-top:18px;display:flex;gap:12px;justify-content:space-between;align-items:flex-end;flex-wrap:wrap;}
.placeholder-footer .slot-sub{max-width:calc(100% - 90px);overflow-wrap:anywhere;}
.action-link{white-space:nowrap;}
@media (max-width: 560px){.slot-head{padding-right:0;padding-top:36px}.placeholder-footer .slot-sub{max-width:100%;}.placeholder-footer{align-items:flex-start;flex-direction:column}.info-row{flex-direction:column;gap:4px}.info-row span:last-child{text-align:left}}


/* V10 realtime badge */
.live-status{border:1px solid var(--line);border-radius:999px;padding:9px 13px;font-size:12px;font-weight:800;background:#0a1629;color:#fff;letter-spacing:.04em}.live-status.green{color:#57f3a2;border-color:rgba(87,243,162,.5)}.live-status.red{color:#ff6d78;border-color:rgba(255,109,120,.5)}.live-status.yellow{color:#ffd773;border-color:rgba(255,215,115,.5)}

.verify-box{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  border:1px dashed rgba(121,217,255,.55);
  background:rgba(121,217,255,.08);
  border-radius:12px;
  padding:10px 12px;
}
.verify-code{
  font-size:28px;
  font-weight:900;
  letter-spacing:8px;
  color:#ffd773;
  font-family:Consolas, 'Courier New', monospace;
  user-select:none;
}
.verify-refresh{
  min-width:40px;
  height:40px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(255,255,255,.2);
  border-radius:10px;
  color:#fff;
  background:rgba(255,255,255,.08);
  font-size:20px;
  text-decoration:none;
}
.verify-refresh:hover{border-color:#79d9ff;color:#79d9ff}


/* V15: แสดงรหัสยืนยันเป็น readonly input เพื่อกันปัญหาเลขไม่ขึ้นในบาง browser/cache */
.verify-code-input{
  flex:1;
  border:0!important;
  outline:none!important;
  background:transparent!important;
  color:#ffd773!important;
  font-size:28px!important;
  font-weight:900!important;
  letter-spacing:8px!important;
  font-family:Consolas, 'Courier New', monospace!important;
  text-align:left!important;
  padding:0!important;
  height:auto!important;
  user-select:none;
  pointer-events:none;
}
.verify-box .verify-code-input{min-width:0;}


/* V17: Monthly page scale 75% */
.monthly-scale-75 .page-wrap{
  zoom:0.75;
  max-width:2000px;
}
.monthly-scale-75 .topbar{
  padding:14px 18px;
}
.monthly-scale-75 .summary-grid{
  grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
}
.monthly-scale-75 .monthly-grid{
  gap:7px;
}
.monthly-scale-75 .day-cell{
  min-height:104px;
}
@supports not (zoom: 1){
  .monthly-scale-75 .page-wrap{
    transform:scale(.75);
    transform-origin:top center;
    width:133.333%;
    max-width:2000px;
  }
}


/* V18: Dashboard main page scale 75% */
.dashboard-scale-75 .page-wrap{
  zoom:0.75;
  max-width:2000px;
}
.dashboard-scale-75 .topbar{
  padding:14px 18px;
}
.dashboard-scale-75 .summary-grid{
  grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
}
.dashboard-scale-75 .cards-grid{
  grid-template-columns:repeat(auto-fit,minmax(360px,1fr));
}
.dashboard-scale-75 .blue-slot,
.dashboard-scale-75 .instance-card{
  min-height:450px;
}
@supports not (zoom: 1){
  .dashboard-scale-75 .page-wrap{
    transform:scale(.75);
    transform-origin:top center;
    width:133.333%;
    max-width:2000px;
  }
}

/* V19: fix full-page background after 75% scaling */
html{
  min-height:100%;
  background:#050d18;
}
body{
  min-height:100vh;
  background-color:#050d18!important;
  background-image:
    radial-gradient(circle at 20% 0%, rgba(24, 62, 120, .28) 0%, rgba(5, 13, 24, 0) 34%),
    radial-gradient(circle at 90% 10%, rgba(20, 95, 155, .18) 0%, rgba(5, 13, 24, 0) 30%),
    linear-gradient(180deg, #071225 0%, #050d18 48%, #050d18 100%)!important;
  background-attachment:fixed!important;
  background-repeat:no-repeat!important;
}
.dashboard-scale-75,
.monthly-scale-75{
  min-height:100vh;
  background:transparent!important;
}
.dashboard-scale-75::before,
.monthly-scale-75::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:
    radial-gradient(circle at 20% 0%, rgba(24, 62, 120, .28) 0%, rgba(5, 13, 24, 0) 34%),
    radial-gradient(circle at 90% 10%, rgba(20, 95, 155, .18) 0%, rgba(5, 13, 24, 0) 30%),
    linear-gradient(180deg, #071225 0%, #050d18 48%, #050d18 100%);
}

/* V20: Text Sharp - เลิกย่อทั้งหน้าด้วย zoom/transform แล้วลดขนาดจริงของแต่ละ element แทน */
html, body{
  text-rendering:geometricPrecision;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
.dashboard-scale-75 .page-wrap,
.monthly-scale-75 .page-wrap{
  zoom:1!important;
  transform:none!important;
  transform-origin:initial!important;
  width:auto!important;
  max-width:1500px!important;
  padding:10px 12px!important;
}

/* Main dashboard compact sharp sizing */
.dashboard-scale-75 .topbar{
  padding:11px 14px!important;
  border-radius:14px!important;
  gap:10px!important;
}
.dashboard-scale-75 h1{font-size:20px!important;line-height:1.2!important;}
.dashboard-scale-75 .subline{font-size:12px!important;margin-top:3px!important;}
.dashboard-scale-75 .top-actions{gap:8px!important;}
.dashboard-scale-75 .primary-btn,
.dashboard-scale-75 .ghost-btn,
.dashboard-scale-75 .action-link,
.dashboard-scale-75 .live-status{
  padding:7px 11px!important;
  border-radius:10px!important;
  font-size:12px!important;
  line-height:1.2!important;
}
.dashboard-scale-75 .summary-grid{
  margin-top:10px!important;
  grid-template-columns:repeat(auto-fit,minmax(126px,1fr))!important;
  gap:8px!important;
}
.dashboard-scale-75 .summary-card{
  padding:9px 10px!important;
  border-radius:13px!important;
}
.dashboard-scale-75 .summary-card .label,
.dashboard-scale-75 .mini-label{
  font-size:10px!important;
  letter-spacing:.03em!important;
}
.dashboard-scale-75 .summary-card .value{
  font-size:20px!important;
  line-height:1.1!important;
  margin-top:7px!important;
  font-weight:750!important;
}
.dashboard-scale-75 .cards-toolbar{
  margin:16px 0 9px!important;
}
.dashboard-scale-75 .section-title{font-size:17px!important;}
.dashboard-scale-75 .cards-grid{
  grid-template-columns:repeat(auto-fit,minmax(305px,1fr))!important;
  gap:14px!important;
}
.dashboard-scale-75 .blue-slot,
.dashboard-scale-75 .instance-card{
  min-height:360px!important;
  padding:14px!important;
  border-radius:17px!important;
}
.dashboard-scale-75 .slot-head{
  gap:9px!important;
  padding-right:58px!important;
}
.dashboard-scale-75 .blue-slot h3,
.dashboard-scale-75 .instance-card h3{
  font-size:15px!important;
  line-height:1.25!important;
  font-weight:750!important;
}
.dashboard-scale-75 .slot-sub{
  font-size:11px!important;
  line-height:1.35!important;
  margin-top:3px!important;
}
.dashboard-scale-75 .slot-pill{
  padding:5px 8px!important;
  border-radius:999px!important;
  font-size:10px!important;
}
.dashboard-scale-75 .slot-actions{
  right:12px!important;
  top:12px!important;
  gap:6px!important;
}
.dashboard-scale-75 .icon-btn{
  padding:6px 8px!important;
  border-radius:8px!important;
  font-size:11px!important;
}
.dashboard-scale-75 .metrics-grid{
  margin-top:12px!important;
  gap:8px!important;
}
.dashboard-scale-75 .metric{
  padding:8px!important;
  border-radius:10px!important;
}
.dashboard-scale-75 .metric .big{
  font-size:14px!important;
  line-height:1.25!important;
  margin-top:5px!important;
  font-weight:750!important;
}
.dashboard-scale-75 .small-grid{
  margin-top:9px!important;
  gap:7px!important;
}
.dashboard-scale-75 .small-box{
  padding:8px!important;
  border-radius:10px!important;
}
.dashboard-scale-75 .small-box .num{
  font-size:13px!important;
  line-height:1.25!important;
  margin-top:5px!important;
  font-weight:750!important;
}
.dashboard-scale-75 .card-bottom{
  margin-top:11px!important;
  gap:8px!important;
}
.dashboard-scale-75 .plus-card{
  gap:10px!important;
}
.dashboard-scale-75 .plus-circle{
  width:58px!important;
  height:58px!important;
  border-width:3px!important;
  font-size:36px!important;
}
.dashboard-scale-75 .plus-text{font-size:21px!important;}
.dashboard-scale-75 .plus-note{font-size:13px!important;}
.dashboard-scale-75 .info-list{
  margin-top:15px!important;
  gap:8px!important;
}
.dashboard-scale-75 .info-row{
  padding:8px 0!important;
  gap:8px!important;
  font-size:13px!important;
}
.dashboard-scale-75 .info-row span:first-child{flex-basis:105px!important;}
.dashboard-scale-75 .info-row.claim-row span:last-child{
  font-size:15px!important;
}
.dashboard-scale-75 .placeholder-footer{
  padding-top:14px!important;
  gap:10px!important;
}

/* Monthly compact sharp sizing */
.monthly-scale-75 .topbar{
  padding:11px 14px!important;
  border-radius:14px!important;
}
.monthly-scale-75 h1{font-size:20px!important;line-height:1.2!important;}
.monthly-scale-75 .subline{font-size:12px!important;}
.monthly-scale-75 .month-nav{gap:7px!important;}
.monthly-scale-75 .ghost-btn,
.monthly-scale-75 .chip{
  padding:7px 10px!important;
  border-radius:9px!important;
  font-size:12px!important;
}
.monthly-scale-75 .summary-grid{
  margin-top:10px!important;
  grid-template-columns:repeat(auto-fit,minmax(145px,1fr))!important;
  gap:8px!important;
}
.monthly-scale-75 .summary-card{
  padding:9px 10px!important;
  border-radius:13px!important;
}
.monthly-scale-75 .summary-card .label{
  font-size:10px!important;
}
.monthly-scale-75 .summary-card .value{
  font-size:20px!important;
  margin-top:7px!important;
}
.monthly-scale-75 .monthly-grid-wrap{
  margin-top:10px!important;
}
.monthly-scale-75 .monthly-grid{
  gap:7px!important;
}
.monthly-scale-75 .day-cell{
  min-height:86px!important;
  padding:7px!important;
  border-radius:11px!important;
}
.monthly-scale-75 .day-num{
  font-size:17px!important;
  line-height:1.1!important;
}
.monthly-scale-75 .day-profit{
  font-size:16px!important;
  line-height:1.15!important;
  margin:7px 0!important;
}
.monthly-scale-75 .day-mini{
  font-size:10px!important;
  line-height:1.25!important;
}

/* ยกเลิก fallback scale เดิมในทุก browser */
@supports not (zoom: 1){
  .dashboard-scale-75 .page-wrap,
  .monthly-scale-75 .page-wrap{
    transform:none!important;
    width:auto!important;
  }
}


/* V25: News box on dashboard */
.news-panel{
  margin-top:10px;
  border:1px solid rgba(121,217,255,.28);
  background:linear-gradient(180deg,rgba(7,18,35,.96),rgba(6,15,28,.96));
  border-radius:14px;
  padding:10px 12px;
  box-shadow:0 0 18px rgba(0,0,0,.16);
}
.news-header{display:flex;justify-content:space-between;align-items:center;gap:12px;}
.news-title{font-size:15px;font-weight:800;color:#fff;}
.news-sub{font-size:11px;color:#9ec9ef;margin-top:2px;}
.news-badge{border:1px solid rgba(87,243,162,.45);color:#57f3a2;background:rgba(87,243,162,.08);border-radius:999px;padding:6px 9px;font-size:10px;font-weight:800;letter-spacing:.04em;}
.news-badge.muted{border-color:rgba(255,215,115,.35);color:#ffd773;background:rgba(255,215,115,.08);}
.news-list{margin-top:8px;display:grid;gap:7px;}
.news-item{border:1px solid rgba(121,217,255,.18);border-radius:11px;background:rgba(5,13,24,.6);overflow:hidden;}
.news-item summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:8px;padding:8px 10px;font-size:12px;}
.news-item summary::-webkit-details-marker{display:none;}
.news-time{color:#79d9ff;font-weight:800;min-width:42px;}
.news-impact{color:#ffd773;font-weight:800;min-width:72px;}
.news-headline{font-weight:700;color:#fff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.news-item pre{white-space:pre-wrap;margin:0;padding:9px 10px 10px;border-top:1px solid rgba(121,217,255,.14);font:12px/1.55 'Segoe UI',Tahoma,sans-serif;color:#dff3ff;background:rgba(0,0,0,.12);}
@media (max-width:900px){.news-header{align-items:flex-start;flex-direction:column}.news-item summary{align-items:flex-start;flex-direction:column}.news-headline{white-space:normal}.news-impact,.news-time{min-width:0}}

/* V26: News Popup / Compact bar - ไม่ดันเมนูหลักลงยาว */
.news-panel{
  margin-top:8px!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.news-compact{
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border:1px solid rgba(121,217,255,.26);
  background:linear-gradient(180deg,rgba(7,18,35,.96),rgba(6,15,28,.96));
  border-radius:12px;
  padding:8px 10px;
}
.news-compact-left{
  min-width:0;
  display:flex;
  align-items:center;
  gap:9px;
}
.news-dot{
  width:9px;
  height:9px;
  border-radius:50%;
  background:#57f3a2;
  box-shadow:0 0 10px rgba(87,243,162,.65);
  flex:0 0 auto;
}
.news-dot.muted{
  background:#ffd773;
  box-shadow:0 0 10px rgba(255,215,115,.45);
}
.news-compact .news-title{
  font-size:13px;
  line-height:1.2;
}
.news-compact .news-sub{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:10px;
  line-height:1.25;
}
.news-compact-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex:0 0 auto;
}
.news-open-btn{
  border:1px solid rgba(121,217,255,.35);
  background:rgba(32,196,255,.12);
  color:#dff3ff;
  border-radius:9px;
  padding:6px 10px;
  font-size:11px;
  font-weight:800;
  cursor:pointer;
}
.news-open-btn:hover{
  border-color:#79d9ff;
  color:#fff;
}
.news-modal{
  align-items:flex-start!important;
  padding-top:40px!important;
}
.news-modal-card{
  width:min(980px,calc(100vw - 32px))!important;
  max-height:82vh;
  display:flex;
  flex-direction:column;
}
.news-modal-body{
  margin-top:12px;
  overflow:auto;
  padding-right:4px;
}
.modal-news-list{
  max-height:calc(82vh - 110px);
  overflow:auto;
}
.news-empty{
  padding:16px;
  border:1px solid rgba(121,217,255,.18);
  border-radius:12px;
  color:#cbe8ff;
  background:rgba(5,13,24,.55);
}
.news-modal .news-item pre{
  max-height:none;
}
@media (max-width:900px){
  .news-compact{align-items:flex-start;flex-direction:column;}
  .news-compact-actions{width:100%;justify-content:space-between;}
  .news-compact .news-sub{white-space:normal;}
}


/* V27: แก้ popup ข่าวบนมือถือเลื่อนแล้วเด้งกลับด้านบน
   สาเหตุเดิมคือ realtime/polling render เนื้อข่าวซ้ำทุก 1 วิ ทำให้ scroll reset
   CSS นี้ทำให้มี scroll container เดียวและกัน scroll ทะลุไป body */
body.modal-open{
  overflow:hidden!important;
}
.news-modal.show{
  display:flex!important;
}
.news-modal{
  position:fixed!important;
  inset:0!important;
  overflow:hidden!important;
  align-items:center!important;
  justify-content:center!important;
  padding:16px!important;
  overscroll-behavior:contain;
}
.news-modal-card{
  width:min(980px,calc(100vw - 32px))!important;
  max-height:calc(100dvh - 32px)!important;
  display:flex!important;
  flex-direction:column!important;
}
.news-modal-body{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  touch-action:pan-y;
  padding-right:6px!important;
}
.modal-news-list{
  max-height:none!important;
  overflow:visible!important;
}
@media (max-width:900px){
  .news-modal{
    align-items:stretch!important;
    justify-content:center!important;
    padding:10px!important;
  }
  .news-modal-card{
    width:100%!important;
    max-height:calc(100dvh - 20px)!important;
    border-radius:14px!important;
  }
  .news-modal .modal-head{
    flex:0 0 auto!important;
  }
  .news-modal .news-item summary{
    position:sticky;
    top:0;
    z-index:1;
    background:rgba(5,13,24,.96);
  }
  .news-modal .news-item pre{
    font-size:11px!important;
    line-height:1.55!important;
  }
}
