/* TV Screens (#/tv, #/tv-screen) */
.tvm { display: flex; flex-direction: column; gap: 4px; }
.tvm-sum { display: flex; gap: 14px; align-items: center; padding: 14px 16px; }
.tvm-sum-ic, .tvm-add-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); flex: none; }
.tvm-sum b, .tvm-add b { display: block; color: var(--text); }
.tvm-sum small, .tvm-add small { color: var(--text-2); font-size: var(--fs-xs, 12px); line-height: 1.45; }
.tvm .section-head h2 { display: flex; align-items: center; gap: 8px; }
.tvm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tvm-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.tvm-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2, 0 8px 24px rgba(27,33,89,.12)); }
.tvm-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; }
.tvm-card-body b { color: var(--text); font-size: var(--fs-md, 15px); }
.tvm-card-body small { color: var(--text-2); font-size: var(--fs-xs, 12px); }
.tvm-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
/* a TV: 16:9, black, image contained (exactly how the TV page draws it) */
.tvm-screen { position: relative; aspect-ratio: 16 / 9; background: #0b0d1a; display: grid; place-items: center; overflow: hidden; }
.tvm-screen > img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tvm-screen.is-dark { background: repeating-linear-gradient(135deg, #12152b 0 12px, #0f1225 12px 24px); }
.tvm-blank { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #8d93b8; text-align: center; padding: 12px; }
.tvm-blank small { font-size: 12px; }
.tvm-live { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(11,13,26,.72); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .3px; backdrop-filter: blur(4px); }
.tvm-live i { width: 7px; height: 7px; border-radius: 50%; background: #ff4d4f; box-shadow: 0 0 0 3px rgba(255,77,79,.25); animation: tvm-pulse 1.6s infinite; }
@keyframes tvm-pulse { 50% { opacity: .35; } }
.tvm-stack { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 4px; }
.tvm-stack img { width: 46px; height: 26px; object-fit: cover; border-radius: 4px; border: 1.5px solid rgba(255,255,255,.8); background: #000; }
/* player */
.tvm-player { padding: 0; overflow: hidden; }
.tvm-stage > img { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
.tvm-stage > img.on { opacity: 1; }
.tvm-stage:fullscreen { aspect-ratio: auto; width: 100vw; height: 100vh; }
.tvm-count { position: absolute; top: 10px; right: 10px; padding: 4px 10px; border-radius: 999px; background: rgba(11,13,26,.72); color: #fff; font-size: 11px; font-weight: 700; }
.tvm-dots { display: flex; justify-content: center; gap: 6px; padding: 10px 12px 0; flex-wrap: wrap; }
.tvm-dots button { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2, #cfd4e2); padding: 0; transition: width .2s, background .2s; }
.tvm-dots button.on { width: 22px; border-radius: 6px; background: var(--ink, #1B2159); }
.tvm-player-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px 4px; }
.tvm-hint { display: flex; align-items: center; gap: 6px; padding: 4px 14px 14px; }
/* add */
.tvm-add { display: flex; gap: 14px; align-items: center; padding: 14px 16px; margin-top: 12px; flex-wrap: wrap; }
.tvm-add > div { flex: 1; min-width: 200px; }
.tvm-add .btn.disabled { opacity: .55; pointer-events: none; }
.tvm .dev-lock-note { margin: 12px 0 0; }
/* slides */
.tvm-slides { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.tvm-slide { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.tvm-slide:not(.is-on) .tvm-thumb img { filter: grayscale(.6); opacity: .7; }
.tvm-thumb { position: relative; aspect-ratio: 16 / 9; background: #0b0d1a; padding: 0; display: grid; place-items: center; overflow: hidden; cursor: zoom-in; }
.tvm-thumb img { width: 100%; height: 100%; object-fit: contain; }
.tvm-pos { position: absolute; top: 8px; left: 8px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--ink, #1B2159); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.tvm-slide-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.tvm-slide-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tvm-slide-top b { color: var(--text); font-size: var(--fs-sm, 14px); }
.tvm-note { color: var(--text-2); background: var(--surface-2, #f6f7fb); padding: 6px 8px; border-radius: 8px; }
.tvm-del { align-self: flex-start; color: var(--coral-strong, #c2410c); display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; }
.tvm-del[disabled] { opacity: .45; pointer-events: none; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tvm-grid > .card, .tvm-slides > .card { margin: 0; }
