/* ==========================================================================
   Market Live TV – full-screen market news terminal
   ========================================================================== */

:root {
	--bg: #0a0e13;
	--bg-2: #0f141b;
	--panel: #131a23;
	--panel-2: #18212c;
	--line: #222d3a;
	--line-2: #2c3a4a;
	--text: #e6edf3;
	--muted: #8b98a8;
	--dim: #5f6d7e;
	--accent: #f5b301;
	--accent-ink: #1a1300;
	--live: #ff3b3b;
	--up: #1fd17a;

	--t-breaking: #ff4d4f;
	--t-press: #3d9bff;
	--t-announce: #b37dff;
	--t-deal: #19c6a7;
	--t-earnings: #ffb020;

	--radius: 10px;
	--gap: 12px;
	--cols: 5;
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body.mlt-body {
	background: var(--bg);
	color: var(--text);
	font: 14px/1.45 var(--font);
	-webkit-font-smoothing: antialiased;
	min-height: 100vh;
}

a { color: inherit; }
button { font: inherit; }
[hidden] { display: none !important; }

/* ---------- Buttons & inputs ---------- */
.mlt-btn {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 7px 12px;
	border: 1px solid var(--line-2);
	border-radius: 8px;
	background: var(--panel-2);
	color: var(--text);
	font-size: 13px; font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
	transition: background .15s, border-color .15s;
}
.mlt-btn:hover { background: #1f2a37; border-color: #3a4b60; }
.mlt-btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.mlt-btn-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.mlt-btn-accent:hover { background: #ffc633; border-color: #ffc633; }
.mlt-btn-sm { padding: 5px 9px; font-size: 12px; }
.mlt-btn-block { width: 100%; justify-content: center; }

.mlt-icon-btn {
	display: inline-grid; place-items: center;
	width: 26px; height: 26px;
	border: 1px solid transparent; border-radius: 6px;
	background: transparent; color: var(--muted);
	text-decoration: none; cursor: pointer; font-size: 14px;
}
.mlt-icon-btn:hover { color: var(--text); border-color: var(--line-2); background: var(--panel-2); }

.mlt-link-btn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-size: 12px; }
.mlt-link-btn:hover { text-decoration: underline; }

.mlt-input {
	width: 100%;
	padding: 8px 10px;
	background: var(--bg-2);
	border: 1px solid var(--line-2);
	border-radius: 8px;
	color: var(--text);
	font: 13px var(--font);
}
.mlt-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245,179,1,.15); }
.mlt-input-ticker { font-family: var(--mono); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.mlt-input-sm { width: auto; padding: 5px 8px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Top bar ---------- */
.mlt-topbar {
	position: sticky; top: 0; z-index: 50;
	display: flex; align-items: center; gap: 16px;
	padding: 10px 18px;
	background: rgba(10,14,19,.92);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--line);
}
.admin-bar .mlt-topbar { top: 32px; }
@media (max-width: 782px) { .admin-bar .mlt-topbar { top: 46px; } }

.mlt-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.mlt-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.mlt-logo-mark {
	width: 26px; height: 26px; border-radius: 7px;
	background:
		linear-gradient(135deg, transparent 45%, var(--accent-ink) 46%, var(--accent-ink) 54%, transparent 55%),
		var(--accent);
}
.mlt-logo-text { font-weight: 800; font-size: 16px; letter-spacing: -.01em; white-space: nowrap; }
.custom-logo { max-height: 36px; width: auto; display: block; }

.mlt-market-status {
	padding: 3px 8px; border-radius: 999px;
	font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
	background: var(--panel-2); color: var(--muted); border: 1px solid var(--line-2);
}
.mlt-market-status.is-open { color: var(--up); border-color: rgba(31,209,122,.4); background: rgba(31,209,122,.08); }
.mlt-market-status.is-pre { color: var(--accent); border-color: rgba(245,179,1,.4); background: rgba(245,179,1,.08); }
.mlt-clock { font-family: var(--mono); color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }

.mlt-nav ul { display: flex; gap: 14px; list-style: none; margin: 0; padding: 0; }
.mlt-nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 13px; }
.mlt-nav a:hover { color: var(--text); }

.mlt-top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.mlt-refresh-status { color: var(--dim); font-size: 12px; font-family: var(--mono); margin-right: 6px; white-space: nowrap; }
#mlt-filters-toggle { display: none; }

.mlt-tape { min-height: 46px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.mlt-tape:empty { display: none; }

/* ---------- Dashboard shell ---------- */
.mlt-dashboard { padding: var(--gap) 18px 28px; width: 100%; max-width: none; }

/* ---------- Live TV ---------- */
.mlt-tv {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: var(--gap);
	margin-bottom: 18px;
}
.mlt-tv-stage {
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	min-width: 0;
}
.mlt-tv-bar {
	display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
	padding: 8px 12px;
	border-bottom: 1px solid var(--line);
}
.mlt-tv-title { font-size: 15px; }
.mlt-tv-spacer { flex: 1; }

.mlt-live-dot {
	width: 8px; height: 8px; border-radius: 50%;
	background: var(--live);
	box-shadow: 0 0 0 0 rgba(255,59,59,.7);
	animation: mlt-pulse 1.8s infinite;
	flex: none;
}
@keyframes mlt-pulse {
	0% { box-shadow: 0 0 0 0 rgba(255,59,59,.6); }
	70% { box-shadow: 0 0 0 7px rgba(255,59,59,0); }
	100% { box-shadow: 0 0 0 0 rgba(255,59,59,0); }
}
.is-paused .mlt-live-dot { animation: none; background: var(--dim); }

.mlt-player { background: #000; }
.mlt-player-ratio { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 58vh; margin: 0 auto; }
.mlt-player-ratio iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.mlt-player-note { margin: 0; padding: 6px 12px; font-size: 11px; color: var(--dim); background: var(--panel); border-top: 1px solid var(--line); }

.mlt-multi {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 4px; padding: 4px; background: #000;
}
.mlt-multi-tile { position: relative; aspect-ratio: 16 / 9; background: #05070a; }
.mlt-multi-tile iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mlt-multi-label {
	position: absolute; left: 6px; top: 6px; z-index: 2;
	padding: 2px 7px; border-radius: 4px;
	background: rgba(0,0,0,.7); font-size: 11px; font-weight: 700; pointer-events: none;
}
.mlt-multi-tile button.mlt-multi-open {
	position: absolute; right: 6px; top: 6px; z-index: 2;
	padding: 2px 7px; font-size: 11px; border-radius: 4px; border: 0;
	background: var(--accent); color: var(--accent-ink); font-weight: 700; cursor: pointer;
}

.mlt-channels {
	display: flex; flex-direction: column; gap: 6px;
	max-height: calc(58vh + 90px); overflow: auto;
}
.mlt-channel { display: flex; align-items: stretch; gap: 4px; }
.mlt-channel-btn {
	flex: 1; display: flex; align-items: center; gap: 10px;
	padding: 12px 12px;
	background: var(--panel); color: var(--text);
	border: 1px solid var(--line); border-radius: 8px;
	text-align: left; cursor: pointer; font-weight: 600;
	transition: border-color .15s, background .15s;
}
.mlt-channel-btn:hover { border-color: var(--line-2); background: var(--panel-2); }
.mlt-channel.is-active .mlt-channel-btn { border-color: var(--accent); background: rgba(245,179,1,.08); }
.mlt-channel-live {
	padding: 2px 6px; border-radius: 4px;
	background: var(--live); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .06em;
}
.mlt-channel-site {
	display: grid; place-items: center; width: 38px;
	background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
	color: var(--muted); text-decoration: none;
}
.mlt-channel-site:hover { color: var(--accent); border-color: var(--line-2); }

body.mlt-tv-hidden .mlt-tv { display: none; }

/* ---------- Main: news + right filters ---------- */
.mlt-main {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 290px;
	gap: var(--gap);
	align-items: start;
}

.mlt-news-head {
	display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
	margin-bottom: 10px;
}
.mlt-news-head h2 { margin: 0; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.mlt-pill {
	font-size: 12px; font-weight: 600; color: var(--muted);
	padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel);
	font-variant-numeric: tabular-nums;
}
.mlt-legend { display: flex; gap: 6px; flex-wrap: wrap; }

/* Badges */
.mlt-badge {
	display: inline-block;
	padding: 1px 6px; border-radius: 4px;
	font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
	line-height: 16px; white-space: nowrap;
	color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent);
	border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
}
.mlt-tag-breaking { --c: var(--t-breaking); }
.mlt-tag-press { --c: var(--t-press); }
.mlt-tag-announce { --c: var(--t-announce); }
.mlt-tag-deal { --c: var(--t-deal); }
.mlt-tag-earnings { --c: var(--t-earnings); }
.mlt-badge.mlt-new { --c: var(--up); }

/* Feed grid – 5 live columns per row by default */
.mlt-grid {
	display: grid;
	grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
	gap: var(--gap);
}

.mlt-card {
	display: flex; flex-direction: column;
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	min-width: 0;
	height: 520px;
	overflow: hidden;
}
.mlt-card.is-pinned { border-color: rgba(245,179,1,.55); }
.mlt-card.is-loading .mlt-card-head .mlt-icon-btn[data-role="reload"] { animation: mlt-spin 1s linear infinite; }
@keyframes mlt-spin { to { transform: rotate(360deg); } }

.mlt-card-head {
	display: flex; align-items: center; gap: 6px;
	padding: 9px 8px 9px 12px;
	border-bottom: 1px solid var(--line);
	background: var(--panel-2);
}
.mlt-card-head h3 {
	margin: 0; flex: 1; min-width: 0;
	font-size: 13px; font-weight: 800; letter-spacing: .01em;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mlt-card-time { font-size: 11px; color: var(--dim); font-family: var(--mono); white-space: nowrap; }

.mlt-list {
	list-style: none; margin: 0; padding: 0;
	overflow-y: auto; flex: 1;
	scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
	counter-reset: mlt;
}
.mlt-item {
	position: relative;
	padding: 9px 12px 9px 14px;
	border-bottom: 1px solid var(--line);
	border-left: 3px solid transparent;
}
.mlt-item:last-child { border-bottom: 0; }
.mlt-item:hover { background: rgba(255,255,255,.025); }
.mlt-item.is-hl { border-left-color: var(--hl); background: color-mix(in srgb, var(--hl) 7%, transparent); }
.mlt-item.is-hl:hover { background: color-mix(in srgb, var(--hl) 11%, transparent); }
.mlt-item.is-fresh { animation: mlt-flash 2.4s ease-out; }
@keyframes mlt-flash { 0% { background: rgba(245,179,1,.28); } 100% { background: transparent; } }

.mlt-item-badges { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 4px; }
.mlt-item-badges:empty { display: none; }
.mlt-item a.mlt-title {
	display: block;
	color: var(--text); text-decoration: none;
	font-size: 13.5px; font-weight: 600; line-height: 1.35;
}
.mlt-item a.mlt-title:hover { color: var(--accent); }
.mlt-item.is-hl a.mlt-title { font-weight: 700; }
.mlt-summary { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mlt-meta { display: flex; gap: 8px; margin-top: 4px; font-size: 11px; color: var(--dim); }
.mlt-meta .mlt-src { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.mlt-meta time { font-family: var(--mono); white-space: nowrap; }
mark.mlt-mark { background: rgba(245,179,1,.3); color: inherit; border-radius: 2px; padding: 0 1px; }

.mlt-empty, .mlt-error { padding: 22px 14px; color: var(--muted); font-size: 12.5px; text-align: center; }
.mlt-error { color: #ff9a9a; }
.mlt-skel {
	height: 58px; margin: 8px 12px; border-radius: 6px;
	background: linear-gradient(90deg, var(--panel-2) 0%, #1e2834 50%, var(--panel-2) 100%);
	background-size: 200% 100%; animation: mlt-shimmer 1.3s infinite;
}
@keyframes mlt-shimmer { to { background-position: -200% 0; } }

/* Ticker panel */
.mlt-ticker-panel {
	display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
	gap: var(--gap); margin-bottom: var(--gap);
}
.mlt-ticker-chart {
	min-height: 420px; background: var(--panel);
	border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.mlt-ticker-chart .tradingview-widget-container,
.mlt-ticker-chart .tradingview-widget-container__widget { height: 420px; }
.mlt-ticker-chart-fallback { padding: 24px; color: var(--muted); }
.mlt-ticker-news .mlt-card { height: 420px; border-color: rgba(245,179,1,.55); }

/* Right-side filters */
.mlt-filters { position: sticky; top: 64px; }
.admin-bar .mlt-filters { top: 96px; }
.mlt-filters-inner {
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 14px;
	max-height: calc(100vh - 84px);
	overflow-y: auto;
	scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.mlt-filter-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.mlt-filter-head h2 { margin: 0; font-size: 15px; }
.mlt-filters-close { display: none; }
.mlt-fgroup { padding: 12px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 7px; }
.mlt-fgroup:first-of-type { border-top: 0; }
.mlt-flabel { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.mlt-flabel-row { display: flex; justify-content: space-between; align-items: center; color: var(--dim); }
.mlt-check { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.mlt-check input { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; }
.mlt-check-strong { font-weight: 700; margin-top: 4px; }
.mlt-ticker-form { display: flex; gap: 6px; }
.mlt-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.mlt-quick { display: flex; flex-wrap: wrap; gap: 5px; }
.mlt-quick button {
	padding: 3px 7px; border-radius: 5px; border: 1px solid var(--line-2);
	background: var(--bg-2); color: var(--muted); font: 700 11px var(--mono); cursor: pointer;
}
.mlt-quick button:hover, .mlt-quick button.is-active { color: var(--accent); border-color: var(--accent); }
.mlt-sources { display: flex; flex-direction: column; gap: 6px; }
.mlt-src-count { margin-left: auto; color: var(--dim); font-size: 11px; font-family: var(--mono); }

/* ---------- Footer ---------- */
.mlt-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 26px 18px 30px; margin-top: 10px; }
.mlt-footer-grid { display: grid; grid-template-columns: 240px 300px 1fr; gap: 30px; }
.mlt-footer h3 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.mlt-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mlt-footer ul.mlt-footer-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px 18px; }
.mlt-footer a { color: var(--text); text-decoration: none; font-size: 13px; }
.mlt-footer a::after { content: " ↗"; color: var(--dim); }
.mlt-footer a:hover { color: var(--accent); }
.mlt-disclaimer { margin: 22px 0 6px; color: var(--dim); font-size: 12px; max-width: 900px; }
.mlt-copy { margin: 0; color: var(--dim); font-size: 12px; }

/* ---------- Generic content pages ---------- */
.mlt-content { max-width: 820px; margin: 30px auto; padding: 0 18px; }
.mlt-entry { padding: 20px 0; border-bottom: 1px solid var(--line); }
.mlt-entry-title a { text-decoration: none; }
.mlt-entry-body a { color: var(--accent); }

/* ---------- Full-screen mode ---------- */
:fullscreen body, body.is-fullscreen { overflow: auto; }
.mlt-player:fullscreen .mlt-player-ratio { max-height: none; height: 100%; aspect-ratio: auto; }
.mlt-player:fullscreen .mlt-player-note { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
	.mlt-tv { grid-template-columns: minmax(0, 1fr) 240px; }
	.mlt-multi { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
	.mlt-main { grid-template-columns: minmax(0, 1fr); }
	#mlt-filters-toggle { display: inline-flex; }
	.mlt-filters {
		position: fixed; top: 0; right: 0; bottom: 0; z-index: 100;
		width: min(340px, 92vw);
		transform: translateX(105%); transition: transform .25s ease;
		box-shadow: -20px 0 40px rgba(0,0,0,.5);
	}
	.mlt-filters.is-open { transform: none; }
	.mlt-filters-inner { height: 100%; max-height: none; border-radius: 0; }
	.mlt-filters-close { display: inline-grid; }
	.mlt-ticker-panel { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
	.mlt-tv { grid-template-columns: minmax(0, 1fr); }
	.mlt-channels { flex-direction: row; overflow-x: auto; max-height: none; }
	.mlt-channel { flex: none; }
	.mlt-multi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mlt-refresh-status, .mlt-nav { display: none; }
	.mlt-footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
	.mlt-card { height: 460px; }
	.mlt-topbar { flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
	.mlt-top-actions { margin-left: 0; width: 100%; }
	.mlt-clock { display: none; }
	.mlt-dashboard { padding: 10px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   v1.1 – YouTube live & playlists, All Latest News, member accounts
   ========================================================================== */

/* Live / Playlist toggle */
.mlt-seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; margin-left: 6px; }
.mlt-seg-btn { padding: 5px 10px; font-size: 12px; font-weight: 700; background: var(--panel-2); color: var(--muted); border: 0; cursor: pointer; }
.mlt-seg-btn + .mlt-seg-btn { border-left: 1px solid var(--line-2); }
.mlt-seg-btn.is-active { background: var(--accent); color: var(--accent-ink); }
.mlt-seg-btn:disabled { opacity: .4; cursor: not-allowed; }
.mlt-btn-yt { border-color: rgba(255,59,59,.5); }
.mlt-btn-yt:hover { border-color: var(--live); }

/* Channel list with live + playlist actions */
.mlt-channels-head { font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 2px 2px 4px; }
.mlt-channel { flex-direction: column; gap: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.mlt-channel.is-active { border-color: var(--accent); }
.mlt-channel-btn { border: 0; border-radius: 0; padding: 10px 12px 6px; background: transparent; }
.mlt-channel.is-active .mlt-channel-btn { background: transparent; border: 0; }
.mlt-channel-actions { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 10px 9px; }
.mlt-chip {
	padding: 2px 7px; border-radius: 5px; border: 1px solid var(--line-2);
	background: var(--bg-2); color: var(--muted); font-size: 11px; font-weight: 700;
	text-decoration: none; cursor: pointer; white-space: nowrap;
}
.mlt-chip:hover { color: var(--text); border-color: #3a4b60; }
.mlt-chip.is-active { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.mlt-chip-yt { color: #ff8a8a; border-color: rgba(255,59,59,.35); }
.mlt-channel.is-active { background: rgba(245,179,1,.05); }
@media (max-width: 860px) { .mlt-channel { min-width: 230px; } .mlt-channels-head { display: none; } }

/* All Latest News */
.mlt-all {
	background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
	margin-bottom: var(--gap); overflow: hidden;
}
.mlt-all-head {
	display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
	padding: 9px 12px; background: var(--panel-2); border-bottom: 1px solid var(--line);
}
.mlt-all-head h3 { margin: 0; font-size: 14px; font-weight: 800; }
.mlt-all-hint { font-size: 12px; color: var(--dim); }
.mlt-all-filter { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 700; }
.mlt-all-list {
	list-style: none; margin: 0; padding: 0;
	overflow-y: auto; max-height: 640px;
	scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.mlt-row-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; align-items: baseline; padding: 8px 14px; }
.mlt-row-item .mlt-item-badges { grid-column: 1 / -1; margin-bottom: 2px; }
.mlt-row-item .mlt-title { grid-column: 1; }
.mlt-row-item .mlt-summary { grid-column: 1; -webkit-line-clamp: 1; }
.mlt-row-item .mlt-meta { grid-column: 2; grid-row: 2; margin: 0; justify-content: flex-end; align-items: center; }
.mlt-row-item .mlt-meta .mlt-src { max-width: 160px; }
.mlt-row-feed {
	padding: 1px 6px; border-radius: 4px; background: var(--bg-2); border: 1px solid var(--line-2);
	color: var(--muted); font-weight: 700; white-space: nowrap; max-width: 190px; overflow: hidden; text-overflow: ellipsis;
}
.mlt-skel-row { height: 34px; }
body.mlt-view-all .mlt-grid { display: none; }
body.mlt-view-all .mlt-all-list { max-height: none; }
body.mlt-view-cols .mlt-all { display: none; }
@media (max-width: 860px) {
	.mlt-row-item { grid-template-columns: minmax(0, 1fr); }
	.mlt-row-item .mlt-meta { grid-column: 1; grid-row: auto; justify-content: flex-start; margin-top: 4px; }
	.mlt-all-hint { display: none; }
}

/* Footer YouTube list */
.mlt-footer-yt li { display: flex; flex-direction: column; gap: 2px; }
.mlt-footer-yt strong { font-size: 12.5px; }
.mlt-footer-yt span { display: flex; gap: 12px; }
.mlt-footer-yt a { font-size: 12px; color: var(--muted); }
@media (max-width: 1080px) { .mlt-footer-grid { grid-template-columns: 1fr 1fr; } .mlt-footer-wide { grid-column: 1 / -1; } }

/* Header account */
.mlt-account { display: inline-flex; align-items: center; gap: 8px; margin-left: 6px; padding-left: 12px; border-left: 1px solid var(--line); }
.mlt-user { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mlt-avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 12px; flex: none; }
@media (max-width: 560px) { .mlt-account { border-left: 0; padding-left: 0; margin-left: auto; } .mlt-user { display: none; } }

/* Account pages */
.mlt-auth { min-height: calc(100vh - 200px); display: grid; place-items: center; padding: 48px 16px; }
.mlt-auth-card {
	width: min(440px, 100%);
	background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
	padding: 28px; box-shadow: 0 30px 60px rgba(0,0,0,.35);
}
.mlt-auth-card h1 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.01em; }
.mlt-auth-sub { margin: 0 0 20px; color: var(--muted); font-size: 13.5px; }
.mlt-auth-tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 22px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; }
.mlt-auth-tabs a { flex: 1; text-align: center; padding: 8px; border-radius: 7px; text-decoration: none; font-weight: 700; font-size: 13px; color: var(--muted); }
.mlt-auth-tabs a.is-active { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.mlt-form { display: flex; flex-direction: column; gap: 14px; }
.mlt-field { display: flex; flex-direction: column; gap: 6px; }
.mlt-field > span:first-child { font-size: 12px; font-weight: 700; color: var(--muted); }
.mlt-field .mlt-input { padding: 11px 12px; font-size: 14px; }
.mlt-pw { position: relative; display: block; }
.mlt-pw .mlt-input { padding-right: 64px; }
.mlt-pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--accent); font-size: 12px; font-weight: 700; cursor: pointer; padding: 6px; }
.mlt-code { font-family: var(--mono); font-size: 22px !important; letter-spacing: .45em; text-align: center; font-weight: 700; }
.mlt-form-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.mlt-form-row a, .mlt-auth-foot a { color: var(--accent); text-decoration: none; font-weight: 600; }
.mlt-form-row a:hover, .mlt-auth-foot a:hover { text-decoration: underline; }
.mlt-btn-lg { padding: 12px 16px; font-size: 14px; margin-top: 4px; }
.mlt-auth-foot { margin: 18px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.mlt-alert { padding: 11px 13px; border-radius: 8px; font-size: 13px; margin-bottom: 18px; border: 1px solid; }
.mlt-alert-error { color: #ffb3b3; background: rgba(255,77,79,.1); border-color: rgba(255,77,79,.4); }
.mlt-alert-ok { color: #9ff0c6; background: rgba(31,209,122,.1); border-color: rgba(31,209,122,.4); }
.mlt-alert-info { color: #a8d1ff; background: rgba(61,155,255,.1); border-color: rgba(61,155,255,.4); }
.mlt-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.mlt-row-item .mlt-summary { display: none; }
/* One-line rows in All Latest News */
.mlt-row-item { display: flex; align-items: center; gap: 10px; padding: 7px 14px; }
.mlt-row-item .mlt-item-badges { margin: 0; flex: none; flex-wrap: nowrap; }
.mlt-row-item .mlt-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mlt-row-item .mlt-meta { flex: none; margin: 0; }
@media (max-width: 860px) {
	.mlt-row-item { flex-wrap: wrap; }
	.mlt-row-item .mlt-title { flex-basis: 100%; white-space: normal; }
}

.mlt-channel { flex: none; }
.mlt-opt { font-style: normal; font-weight: 500; color: var(--dim); margin-left: 4px; }

/* ==========================================================================
   v1.4 – Sticky members chat (bottom-right), filters at the bottom,
   5 feed columns stretched across the full screen
   ========================================================================== */

/* ---- Layout: news full width, filters below ---- */
.mlt-main { display: block; }
.mlt-grid { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
.mlt-filters, .admin-bar .mlt-filters { position: static; top: auto; margin-top: 22px; transform: none; box-shadow: none; width: auto; }
.mlt-filters-inner {
	max-height: none; overflow: visible;
	display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0 26px;
	padding: 16px 18px;
}
.mlt-filter-head { grid-column: 1 / -1; margin-bottom: 4px; }
.mlt-filters-inner > .mlt-fgroup { border-top: 0; padding: 10px 0; }
.mlt-filters-inner > .mlt-fgroup:has(#mlt-sources) { grid-column: 1 / -1; }
.mlt-sources { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 14px; }
#mlt-reset { grid-column: 1 / -1; justify-self: start; width: auto; margin-top: 6px; }
.mlt-filters-close { display: none !important; }
#mlt-filters-toggle { display: inline-flex; }

@media (max-width: 1080px) {
	.mlt-filters { position: static !important; transform: none !important; width: auto !important; box-shadow: none !important; }
	.mlt-filters-inner { height: auto; border-radius: var(--radius); }
}
@media (max-width: 860px) { .mlt-filters-inner > .mlt-fgroup:has(#mlt-sources) { grid-column: auto; } }

/* ---- Sticky chat, bottom-right ---- */
.mlt-sc { position: fixed; right: 16px; bottom: 16px; z-index: 90; font-size: 13px; }
.mlt-sc-panel {
	width: 360px; height: 560px; max-height: calc(100vh - 90px);
	display: flex; flex-direction: column;
	background: rgba(15,20,27,.97); backdrop-filter: blur(10px);
	border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden;
	box-shadow: 0 24px 60px rgba(0,0,0,.55);
}
.mlt-sc[data-state="max"] .mlt-sc-panel { width: min(640px, calc(100vw - 32px)); height: calc(100vh - 90px); }
.admin-bar .mlt-sc[data-state="max"] .mlt-sc-panel { height: calc(100vh - 122px); }
.mlt-sc[data-state="min"] .mlt-sc-panel { display: none; }
.mlt-sc-bubble {
	display: none; align-items: center; gap: 8px;
	padding: 11px 18px; border-radius: 999px; border: 0;
	background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 14px; cursor: pointer;
	box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
.mlt-sc[data-state="min"] .mlt-sc-bubble { display: inline-flex; }
.mlt-sc-unread { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--live); color: #fff; font-size: 11px; display: grid; place-items: center; }
.mlt-sc-head { display: flex; align-items: center; gap: 8px; padding: 9px 8px 9px 14px; background: var(--panel-2); border-bottom: 1px solid var(--line); cursor: default; user-select: none; }
.mlt-sc-head strong { font-size: 13.5px; }
.mlt-sc-online { font-size: 11px; color: var(--up); font-family: var(--mono); }
.mlt-sc-ctl {
	width: 28px; height: 28px; display: grid; place-items: center;
	border: 1px solid var(--line-2); border-radius: 6px; background: var(--bg-2);
	color: var(--text); font-size: 15px; line-height: 1; cursor: pointer;
}
.mlt-sc-ctl:hover { border-color: var(--accent); color: var(--accent); }

.mlt-sc-list { list-style: none; margin: 0; padding: 6px 0; flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.mlt-sc-sys, .mlt-sc-more { padding: 10px 14px; text-align: center; color: var(--dim); font-size: 12px; }
.mlt-sc-more { font-size: 11px; }
.mlt-sc-msg { position: relative; display: flex; gap: 9px; padding: 6px 14px; }
.mlt-sc-msg:hover { background: rgba(255,255,255,.03); }
.mlt-sc-av { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 12px; }
.mlt-sc-body { min-width: 0; flex: 1; }
.mlt-sc-meta { display: flex; align-items: baseline; gap: 6px; }
.mlt-sc-meta strong { font-size: 12.5px; }
.mlt-sc-meta time { margin-left: auto; font-size: 10.5px; color: var(--dim); font-family: var(--mono); }
.mlt-sc-msg.is-me .mlt-sc-meta strong::after { content: " (you)"; color: var(--dim); font-weight: 400; }
.mlt-sc-msg.is-me { background: rgba(245,179,1,.05); }
.mlt-sc-text { margin: 1px 0 0; line-height: 1.4; overflow-wrap: anywhere; color: #d8e0e8; }
.mlt-sc[data-state="max"] .mlt-sc-text { font-size: 14px; }
.mlt-sc-del { position: absolute; right: 8px; top: 6px; display: none; border: 0; background: rgba(0,0,0,.5); color: #fff; border-radius: 4px; cursor: pointer; font-size: 11px; padding: 1px 5px; }
.mlt-sc-msg:hover .mlt-sc-del { display: block; }
.mlt-sc-jump { align-self: center; margin: -36px 0 6px; position: relative; z-index: 2; padding: 4px 12px; border-radius: 999px; border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 12px; cursor: pointer; }
.mlt-sc-form { display: flex; gap: 6px; padding: 9px 10px; border-top: 1px solid var(--line); background: var(--panel); }
.mlt-sc-form .mlt-input { flex: 1; min-width: 0; }
.mlt-sc-status { padding: 0 12px 6px; font-size: 11px; color: var(--dim); background: var(--panel); min-height: 6px; }
.mlt-sc-status.is-err { color: #ff9a9a; }
@media (max-width: 560px) {
	.mlt-sc { right: 8px; bottom: 8px; }
	.mlt-sc-panel, .mlt-sc[data-state="max"] .mlt-sc-panel { width: calc(100vw - 16px); }
	.mlt-sc-panel { height: min(70vh, 520px); }
}
.mlt-sc-guest { display: flex; align-items: center; gap: 8px; padding: 8px 10px 0; border-top: 1px solid var(--line); background: var(--panel); font-size: 12px; color: var(--muted); }
.mlt-sc-guest .mlt-input { flex: 1; min-width: 0; }
.mlt-sc-guest a, .mlt-sc-login a { color: var(--accent); text-decoration: none; white-space: nowrap; }
.mlt-sc-guest + .mlt-sc-form { border-top: 0; }
.mlt-sc-login { margin: 0; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--panel); font-size: 13px; color: var(--muted); text-align: center; }

/* ==========================================================================
   v1.6 – Latest uploads (6 per channel) + live / off-air status
   ========================================================================== */
.mlt-channel-live.is-off { background: var(--panel-2); color: var(--muted); border: 1px solid var(--line-2); }
.mlt-uploads { border-top: 1px solid var(--line); padding: 10px 12px 12px; }
.mlt-uploads-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.mlt-uploads-head strong { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.mlt-uploads-ch { font-weight: 700; font-size: 13px; }
.mlt-uploads-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.mlt-up-btn { display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 0; border: 0; background: none; color: var(--text); text-align: left; cursor: pointer; }
.mlt-up-thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--bg-2); border: 2px solid transparent; transition: border-color .15s; }
.mlt-up-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mlt-up-play { position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; color: #fff; background: rgba(0,0,0,.35); opacity: 0; transition: opacity .15s; }
.mlt-up-btn:hover .mlt-up-thumb { border-color: var(--line-2); }
.mlt-up-btn:hover .mlt-up-play { opacity: 1; }
.mlt-up.is-playing .mlt-up-thumb { border-color: var(--accent); }
.mlt-up.is-playing .mlt-up-play { opacity: 1; background: rgba(0,0,0,.5); }
.mlt-up.is-playing .mlt-up-play::after { content: "Now playing"; position: absolute; bottom: 6px; left: 6px; font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 4px; background: var(--accent); color: var(--accent-ink); letter-spacing: .04em; text-transform: uppercase; }
.mlt-up-title { font-size: 12.5px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mlt-up-btn:hover .mlt-up-title { color: var(--accent); }
.mlt-up-meta { font-size: 11px; color: var(--dim); font-family: var(--mono); }
.mlt-up-skel { aspect-ratio: 16 / 9; border-radius: 8px; background: linear-gradient(90deg, var(--panel-2) 0%, #1e2834 50%, var(--panel-2) 100%); background-size: 200% 100%; animation: mlt-shimmer 1.3s infinite; }
.mlt-uploads-grid .mlt-empty { grid-column: 1 / -1; }
body.mlt-tv-hidden .mlt-uploads { display: none; }
@media (max-width: 1280px) { .mlt-uploads-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .mlt-uploads-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* v1.6.2 – grid fits the selected feeds */
.mlt-grid-empty { margin: 10px 0 0; padding: 10px 14px; border: 1px dashed var(--line-2); border-radius: 8px; color: var(--muted); font-size: 13px; }
.mlt-grid:has(.mlt-card:not([hidden])) + .mlt-grid-empty { margin-top: 10px; }

/* ==========================================================================
   v1.7 – Green blinking LIVE status + "Live now on YouTube" bar
   ========================================================================== */
:root { --onair: #1fd17a; }
@keyframes mlt-green-blink { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(31,209,122,.7); } 50% { opacity: .35; box-shadow: 0 0 0 5px rgba(31,209,122,0); } }
.mlt-green-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--onair); animation: mlt-green-blink 1.2s ease-in-out infinite; flex: none; }

/* Channel badges: checking → LIVE (green, blinking) / OFF AIR (grey) */
.mlt-channel-live.is-unknown { background: var(--panel-2); color: var(--dim); border: 1px solid var(--line-2); letter-spacing: .15em; }
.mlt-channel-live.is-live { background: var(--onair); color: #00230f; animation: mlt-green-blink 1.2s ease-in-out infinite; }
.mlt-channel.is-onair { border-color: rgba(31,209,122,.45); }
.mlt-channel.is-onair.is-active { border-color: var(--accent); }
.mlt-chip-yt.is-live { color: #b5f5d3; border-color: rgba(31,209,122,.55); background: rgba(31,209,122,.1); }

/* Player bar dot turns green & blinks while a live stream plays */
.mlt-tv.is-live .mlt-tv-bar .mlt-live-dot { background: var(--onair); animation: mlt-green-blink 1.2s ease-in-out infinite; }
.mlt-tv.is-live .mlt-tv-title { color: #b5f5d3; }

/* Live now bar */
.mlt-livebar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1 1 100%; order: 3;
	padding: 8px 12px; border: 1px solid rgba(31,209,122,.3); border-radius: 10px; background: rgba(31,209,122,.05); }
.mlt-livebar-label { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--onair); white-space: nowrap; }
.mlt-livebar-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mlt-livebar-empty { font-size: 12.5px; color: var(--muted); }
.mlt-livechip { display: inline-flex; align-items: stretch; border: 1px solid rgba(31,209,122,.45); border-radius: 999px; overflow: hidden; background: var(--panel); }
.mlt-livechip.is-current { border-color: var(--onair); box-shadow: 0 0 0 2px rgba(31,209,122,.2); }
.mlt-livechip-play { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px 5px 11px; border: 0; background: none; color: var(--text); font-weight: 700; font-size: 12.5px; cursor: pointer; }
.mlt-livechip-play:hover { background: rgba(31,209,122,.12); }
.mlt-livechip-yt { display: grid; place-items: center; padding: 0 10px; border-left: 1px solid rgba(31,209,122,.3); color: var(--onair); text-decoration: none; font-size: 13px; }
.mlt-livechip-yt:hover { background: rgba(31,209,122,.15); }
textarea.mlt-input { resize: vertical; min-height: 70px; font-family: var(--font); }
