/* ข่าวสาร - the server's news in the game (client-debug/js/news.js, src/map/news.js): its entries (the button beside
   เติมเงิน above the minimap - Noh 2026-11-06, the classic menu bar, the phone menu's tile) shown only once the server said it has the news
   (<html class="nw-sys">), their red dot while something is unread (<html class="nw-new">); the window ข่าวสาร - the list
   and a post. Linked by client/index.html and client-debug/index.html after style.css. */

html:not(.nw-sys) .nw-entry, html:not(.nw-sys) .mh-grid [data-w="!news"] { display: none !important; }
.nw-entry { position: relative; }
.nw-dot { display: none; position: absolute; top: 1px; right: 1px; width: 8px; height: 8px; border-radius: 50%; background: #ff3b3b; box-shadow: 0 0 0 1.5px #fff, 0 0 4px rgba(255, 40, 40, 0.8); pointer-events: none; }
html.nw-new .nw-entry .nw-dot { display: block; }
#menubar .nw-entry .nw-dot { top: 3px; right: 3px; }

/* the button beside เติมเงิน (ui.js buildMapButtons): a red-orange tile, its red dot like แชร์รับรางวัล's */
.sb-ic.sb-news { border-color: #a3341c; color: #fff; background: linear-gradient(#ffb59c, #ff6f43 52%, #e2491f); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 2px 4px rgba(0, 0, 0, 0.4);
	--gi-fill: rgba(255, 236, 200, 0.55); }
#map-btns .map-btn.map-news { position: relative; }
#map-btns .map-btn.map-news .nw-dot { top: -2px; right: 9px; width: 12px; height: 12px; box-sizing: border-box; border: 2px solid #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
@media (max-width: 700px) { #map-btns .map-btn.map-news .nw-dot { right: 0; } }

/* the window */
.win-news .win-body { padding: 8px; }
.nws { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.nws-wait { padding: 22px 0; text-align: center; }
.nws-empty { margin: 0; padding: 26px 8px; text-align: center; opacity: 0.75; }
.nws-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.win-news button.nws-item { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; align-items: center; width: 100%; min-height: 0; height: auto; padding: 6px; margin: 0;
	text-align: left; border-radius: 10px; border: 1px solid rgba(128, 128, 128, 0.32); background: rgba(128, 128, 128, 0.06); color: inherit; font: inherit; cursor: pointer; box-shadow: none; }
.win-news button.nws-item, .win-news button.nws-item * { white-space: normal; } /* (the theme's buttons: one line - a title wraps here) */
.win-news button.nws-item:hover { border-color: rgba(214, 150, 20, 0.7); background: rgba(255, 200, 80, 0.12); }
.win-news button.nws-item.pin { border-color: rgba(214, 150, 20, 0.55); background: linear-gradient(110deg, rgba(255, 214, 102, 0.22), rgba(255, 214, 102, 0.04)); }
.nws-th { display: block; width: 76px; height: 57px; border-radius: 7px; object-fit: cover; background: rgba(128, 128, 128, 0.15); }
.nws-th.none { background: rgba(128, 128, 128, 0.12) url('../../img/gieno-logo.png') 50% 50% / 80% auto no-repeat; }
.nws-it { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.nws-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 0; font-size: 11.5px; line-height: 1.4; }
.nws-day { opacity: 0.75; }
.nws-title { font-size: 14px; line-height: 1.35; font-weight: 700; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nws-cat { display: inline-block; padding: 0 7px; border-radius: 8px; font-size: 11px; font-weight: 700; line-height: 17px; color: #fff; background: #7a6a5c; white-space: nowrap; }
.nws-cat.c-update { background: #2e7dd7; }
.nws-cat.c-event { background: #d4498f; }
.nws-cat.c-notice { background: #c98a0e; }
.nws-cat.c-maint { background: #c4452c; }
.nws-pin { display: inline-block; padding: 0 7px; border-radius: 8px; font-size: 11px; font-weight: 700; line-height: 17px; color: #8a4b00; background: #ffe08a; white-space: nowrap; }
.nws-fresh { display: inline-block; padding: 0 6px; border-radius: 8px; font-size: 10.5px; font-weight: 700; line-height: 16px; color: #fff; background: #e5383b; }
.nws-more { margin: 2px 0 0; font-size: 12px; text-align: center; opacity: 0.8; }
.nws-post { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.nws-ptitle { margin: 2px 0 2px; font-size: 17px; line-height: 1.35; font-weight: 700; overflow-wrap: anywhere; }
.nws-pimg { display: block; max-width: 100%; max-height: 300px; margin: 2px auto 4px; border-radius: 9px; object-fit: contain; }
.nws-body { font-size: 13.5px; line-height: 1.7; overflow-wrap: anywhere; }
.nws-body p { margin: 0 0 9px; }
.nws-body p:last-child { margin-bottom: 0; }
.nws-body a, .nws-more a { color: #2f7fd8; text-decoration: underline; word-break: break-all; }
.theme-ro .nws-body a, .theme-ro .nws-more a { color: #1f5fb4; }

/* the phone */
html.mhud .win-news button.nws-item { grid-template-columns: 84px minmax(0, 1fr); padding: 8px; }
html.mhud .nws-th { width: 84px; height: 63px; }
html.mhud .nws-title { font-size: 15px; }
html.mhud .nws-body { font-size: 15px; }
html.mhud .nws-ptitle { font-size: 19px; }
html.mhud .win-news .win-foot button { min-height: 40px; }

/* the phone: the window at least 75 % (text to read, rows tapped - like แชร์รับรางวัล); its menu tile a round red badge as
   big as the painted pictures (like แชร์รับรางวัล's blue one, แชร์โปรไฟล์'s gold one) */
html.mhud .win.win-news { --wk: max(var(--uik, 1), 0.75); transform: scale(max(var(--uik, 1), 0.75)); max-height: calc((100% - 88px - var(--mh-wb)) / max(var(--uik, 1), 0.75)) !important; }
html.mhud .mh-grid svg.gi-news.mh-gic { width: 40px; height: 40px; padding: 7px; box-sizing: border-box; border-radius: 50%; color: #fff; --gi-fill: rgba(255, 255, 255, 0.3);
	background: linear-gradient(#ffb08a, #f0603f 52%, #d33f26); box-shadow: inset 0 1px 0 rgba(255, 236, 220, 0.8), 0 1px 2px rgba(0, 0, 0, 0.45); }
html.mhud.mh-land .mh-grid svg.gi-news.mh-gic { width: 34px; height: 34px; padding: 6px; }
