* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.5 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f3f4f6; color: #111; }
header { background: #111827; color: #fff; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
header h1 { font-size: 16px; margin: 0; }
header .sp { flex: 1; }
header a { color: #9ca3af; }
main { padding: 16px; max-width: 1280px; margin: 0 auto; }
.card { background: #fff; border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.card h3 { margin: 0 0 8px; font-size: 14px; color: #374151; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grid { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
@media (max-width: 800px) { .grid { grid-template-columns: 1fr; } }
input, select, textarea { padding: 6px 8px; border: 1px solid #d1d5db; border-radius: 6px; font: inherit; }
button { padding: 6px 12px; border: 0; border-radius: 6px; background: #2563eb; color: #fff; cursor: pointer; font: inherit; }
button.sec { background: #e5e7eb; color: #111; }
button.danger { background: #dc2626; }
button:disabled { opacity: .5; cursor: default; }
video { width: 100%; background: #000; border-radius: 8px; aspect-ratio: 16/9; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin-top: 8px; }
.tile { position: relative; }
.tile .name { position: absolute; left: 6px; bottom: 6px; background: rgba(0,0,0,.6); color: #fff; padding: 2px 6px; border-radius: 4px; font-size: 12px; }
.chat { height: 360px; overflow-y: auto; border: 1px solid #e5e7eb; border-radius: 6px; padding: 8px; background: #fafafa; }
.msg { margin-bottom: 4px; word-break: break-all; }
.msg .n { color: #2563eb; cursor: pointer; }
.msg.sys { color: #6b7280; font-size: 13px; }
.msg.product { background: #fff7ed; border: 1px solid #fed7aa; padding: 6px; border-radius: 6px; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; background: #e5e7eb; }
.badge.live { background: #dcfce7; color: #166534; }
.badge.off { background: #fee2e2; color: #991b1b; }
.list > div { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid #f3f4f6; }
.list > div > span:first-child { flex: 1; }
.muted { color: #6b7280; font-size: 12px; }
.toast { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); background: #111827; color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 9; }
.hidden { display: none !important; }
